[Bug 904828] New: systemd no longer calls pm-utils's sleep.d scripts on suspend/hibernate/resume
http://bugzilla.opensuse.org/show_bug.cgi?id=904828 Bug ID: 904828 Summary: systemd no longer calls pm-utils's sleep.d scripts on suspend/hibernate/resume Classification: openSUSE Product: openSUSE Distribution Version: 13.2 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: systemd-maintainers@suse.de Reporter: gber@opensuse.org QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Removing pm-utils was discussed on the opensuse-factory list (http://lists.opensuse.org/opensuse-factory/2013-11/msg00911.html) and several cases were pointed out where sleep.d scripts are still used. pm-utils was not removed and still exists in 13.2 and Factory and it is installed by default, but back in March the pm-utils support was removed from systemd so that now sleep.d scripts are silently ignored. Dependent packages such as storage-fixup were not fixed either even though I explicitly pointed out in http://lists.opensuse.org/opensuse-factory/2013-11/msg00916.html that it is used and needed, even with recent hardware. Please either fix systemd to call pm-utils so sleep.d scripts get executed or remove pm-utils properly and ensure that all dependent packages such as storage-fixup get fixed so that they use the corresponding systemd facilities on suspend/hibernate/resume. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=904828 David Kerkhof <dutchkind@txoriaskea.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dutchkind@txoriaskea.org --- Comment #3 from David Kerkhof <dutchkind@txoriaskea.org> --- So how can we now run commands on suspend? I need to close an encrypted container before the system suspends -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=904828 --- Comment #5 from David Kerkhof <dutchkind@txoriaskea.org> --- Thanks, that helps. Would be nice to have read this change in the Release Notes. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=904828 Guido Berhörster <gber@opensuse.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vdziewiecki@suse.com --- Comment #6 from Guido Berhörster <gber@opensuse.org> --- (In reply to David Kerkhof from comment #5)
Thanks, that helps. Would be nice to have read this change in the Release Notes.
Just to clarify since you seem to misunderstand the problem, this bug is not about that one mechanism was replaced by another but that there was no followup to the opensuse-factory@ discussion and the systemd package just dropped pm-utils support leading to silent failure not only of user scripts but also dependent packages. So what needs to be done in the long term is a followup to the discussion, addressing of the issues raised, assessment of the fixes delivered by pm-utils to avoid regressions, adaptation of any dependent packages to use systemd hooks instead, removal of pm-utils from patterns and finally removal of pm-utils from Factory. I was under the impression Vojtěch intended take care of that but it seems nothing has happened. In the short term there needs to be a fix for 13.2 and current Tumbleweed users, I was lucky enough to notice the constant head-parking and to remember the pm-utils discussion but you can't expect that from regular users who will likely not read the release notes. We could either re-enable the patch for pm-utils integration or drop a wrapper shell script into /usr/lib/systemd/system-sleep/ which calls /usr/lib/pm-utils/sleep.d with pm-utils semantics and takes /etc/pm/sleep.d into account and issue a maintenance update. I'd be willing to take care of that since I want this to be fixed ASAP. @Werner, Thomas Does that sound ok? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=904828 --- Comment #20 from Guido Berhörster <gber@opensuse.org> --- I've just created a new maintenancerequest backporting the workaround that reactivates the patch which calls pm-utils for suspend/hibernate (just as in 13.1), this should resolve the issue for 13.2. Please do not close this bug since the underlying issue, i.e. the proper removal of pm-utils, still needs to be addressed for Factory. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=904828 --- Comment #22 from Wolfgang Bauer <wbauer@tmo.at> --- (In reply to Guido Berhörster from comment #20)
I've just created a new maintenancerequest backporting the workaround that reactivates the patch which calls pm-utils for suspend/hibernate (just as in 13.1), this should resolve the issue for 13.2.
Ok, but I still have one question regarding this update: At the moment, in 13.2 and Factory, systemd-hibernate.service (and systemd-hybrid-sleep.service) calls /usr/bin/systemd-sleep-grub before and after hibernation (independent of the hibernate/resume scripts). Will this still be called after the update? If yes, then again the same work will be done _twice_, by /usr/bin/systemd-sleep-grub _and_ by pm-utils' 99Zgrub script, probably leading to problems. In this case, 99Zgrub should probably be removed from pm-utils in the same update. If no, and only 99Zgrub is called, there's this bug: bug#856391 In short, grub2 is not able to reset the entry to boot on btrfs. The hibernate script sets this to prevent booting a different OS before the resume (dataloss) and should revert this to restore the boot menu on resume. But 99Zgrub has a bug which breaks this restoration, and as btrfs is the default filesystem in 13.2 we probably will get many complaints from users that "lost" their boot menu after hibernation. I have a fix for 99Zgrub, but we should release that one before (or at least together with) this update in that case IMHO. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=904828 --- Comment #23 from Guido Berhörster <gber@opensuse.org> --- Yes, it just restores the behavior as it was in 13.1 and earlier (and as it is now again in Factory). The above needs to be fixed in pm-utils, so please do that and send a corresponding maintenancerequest. It should be possible to coordinate with the maintenance team to have both released simultaneously or to combine them into a single incident. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=904828 --- Comment #24 from Benjamin Brunner <bbrunner@suse.com> --- I'll combine the update as soon as there is a submission for pm-utils. Thanks for the clarifications! -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=904828 --- Comment #25 from Guido Berhörster <gber@opensuse.org> --- (In reply to Wolfgang Bauer from comment #22)
I have a fix for 99Zgrub, but we should release that one before (or at least together with) this update in that case IMHO.
Wolfgang, will you take care of pushing that to Factory and sending a maintenancerequest? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=904828 --- Comment #26 from Wolfgang Bauer <wbauer@tmo.at> --- (In reply to Guido Berhörster from comment #25)
Wolfgang, will you take care of pushing that to Factory and sending a maintenancerequest?
I already created a SR for base:utils (devel project for Factory) earlier today: https://build.opensuse.org/request/show/263073 Submitted a maintenance request now as well: https://build.opensuse.org/request/show/263102 I included packages for 12.3 and 13.1 as well, I hope that's ok. It's not that critical there, as btrfs is not the default, but should be fixed too I think. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=904828 --- Comment #27 from Wolfgang Bauer <wbauer@tmo.at> --- (In reply to Wolfgang Bauer from comment #26)
I already created a SR for base:utils (devel project for Factory) earlier today: https://build.opensuse.org/request/show/263073 Oops, sorry. The repo is called "utilities" of course... ;)
-- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=904828 --- Comment #28 from Wolfgang Bauer <wbauer@tmo.at> --- PS: I tried out that pending systemd update now. It does indeed use pm-utils again, but systemd-sleep-grub is still called as well (in addition to 99Zgrub). I see its output in the systemd journal. So the update doesn't completely revert the state to 13.1... As I already hinted at, systemd-sleep-grub is called by systemd-hibernate.service (and systemd-hybrid-sleep.service), via this lines: ExecStart=/usr/bin/systemd-sleep-grub pre ExecStart=/usr/lib/systemd/systemd-sleep hibernate ExecStopPost=/usr/bin/systemd-sleep-grub post But just removing it there is also no option I think, as it is needed when pm-utils is not installed. Hm. Maybe calling both doesn't pose a problem anyway? I hope so. At least I didn't see any problem right now. But I haven't tested with btrfs. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=904828 --- Comment #29 from Wolfgang Bauer <wbauer@tmo.at> --- (In reply to Wolfgang Bauer from comment #28)
As I already hinted at, systemd-sleep-grub is called by systemd-hibernate.service (and systemd-hybrid-sleep.service), via this lines: ExecStart=/usr/bin/systemd-sleep-grub pre ExecStart=/usr/lib/systemd/systemd-sleep hibernate ExecStopPost=/usr/bin/systemd-sleep-grub post
I don't understand even why it was done this way. Actually just removing the lines that call systemd-sleep-grub and moving systemd-sleep-grub to /usr/lib/systemd/system-sleep/ (it is written as a sleep script in the first place anyway) should work as well and make it not be called in case pm-utils is used. Maybe this would be the best way to go forward? A side-note: those lines are not part of upstream's unit files, they get added by prepare-suspend-to-disk.patch. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=904828 --- Comment #31 from Wolfgang Bauer <wbauer@tmo.at> --- (In reply to Thomas Blume from comment #30)
See:
bug 856392 comment #18
for an explanation. Hm, I don't see any comment#18 there?
But apparently all scripts in there are called in parallel, I guess this is the reason, right? Then it's no good idea anyway, ignore my comment#29 then please. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=904828 Matthias Grießmeier <mgriessmeier@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |mgriessmeier@suse.com Resolution|--- |FIXED --- Comment #33 from Matthias Grießmeier <mgriessmeier@suse.com> --- Update released for openSUSE 13.2 - resolved fixed -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com