#1120480 pm-utils: pm-suspend won't run after molly-guard

Package:
pm-utils
Source:
pm-utils
Submitter:
Alessandro Vesely
Date:
2025-11-10 18:05:01 UTC
Severity:
normal
Tags:
#1120480#5
Date:
2025-11-10 17:02:57 UTC
From:
To:
Dear Maintainer,

after upgrading to Devuan Excalibur (equivalent to Debian Trixie),
pm-suspend was not running any more.  Running DEBUG_PM=true pm-suspend
produced an output containing the following lines:

+ command_exists check_suspend.no_molly_guard
+ type check_suspend.no_molly_guard
+ return 1
+ log 'pm-utils does not know how to suspend.no_molly_guard on this system.'

The following change fixed it:
--- /old/pm-action      2025-11-10 17:55:09.078432257 +0100
+++ /usr/lib/pm-utils/bin/pm-action     2025-11-10 17:49:09.814631753 +0100
@@ -26,7 +26,7 @@

 # The rule here? Simplicity.
 export STASHNAME=pm-suspend
-export METHOD="$(echo ${0##*pm-} |tr - _)"
+export METHOD="$(echo ${0##*pm-} |tr - _|sed 's/\.no_molly_guard$//')"
 . "/usr/lib/pm-utils/pm-functions"

 # return code tracking for when suspend fails

#1120480#10
Date:
2025-11-10 17:24:52 UTC
From:
To:
Alessandro Vesely writes ("Bug#1120480: pm-utils: pm-suspend won't run after molly-guard"):
...

Hi.  Thanks for the report.  IMO this configuration ought to work.
I agree with you that Debian is the right place for the fix.

I confess I don't fully understand evertthing that's going on here,
but I woinder if pm-utils is the right place to fix this.

I think you have molly-guard installed?

pm-action is documented to iterate through /etc/pm/sleep.d.  Does your
system have something in that directory put there by molly-guard?

This encodes specific knowledge of molly-guard into pm-utils.  Would
it not be better if molly-guard somehow declared how to "suspend" it?

I'm CCing the molly-guard maintainers to see what they think.

(I see we do have some special code for the benefit of molly-guard,
since 2018, due to usrmerge.  #812545.  That doesn't seem relevant to
this bug.)

Regards,
Ian.

#1120480#15
Date:
2025-11-10 17:54:11 UTC
From:
To:
Hi,


Yes, I do.  I don't know what pulled it in.  I didn't even know it was a
separate package.  I have now purged it and reinstalled pm-utils.


No.


I agree the patch makes no sense, given that molly-guard is an separate
package.  pm-utils works fine as is.  This is a molly-guard bug.  Perhaps they
could patch pm-action in postinst, if they cannot find a better way...


Best
Ale

#1120480#20
Date:
2025-11-10 18:03:34 UTC
From:
To:
Alessandro Vesely writes ("Bug#1120480: pm-utils: pm-suspend won't run after molly-guard"):

Gosh.  I definitely wouldn't want us to do that.  I'm hoping the
molly-guard maintainer will be able to advise...

Ian.