Alessandro Vesely writes ("Bug#1120480: pm-utils: pm-suspend won't run after
molly-guard"):
> Package: pm-utils
> Version: 1.4.1-21
> Severity: normal
> Tags: patch
...
> 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:
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?
> 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"
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.