Summary: | sys-power/pm-utils-1.4.1*always succeeds, ignores hook exit codes | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Gerard Neil <xyzzy> |
Component: | [OLD] Core system | Assignee: | Freedesktop bugs <freedesktop-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | tomka |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.freedesktop.org/show_bug.cgi?id=32210 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Patch |
Description
Gerard Neil
2011-03-27 00:08:54 UTC
Created attachment 267333 [details, diff]
Patch
That's important! Please apply the patch freedesktop. someone reported it upstream yet ? Appearently not. The bug is still present in their git master at git://anongit.freedesktop.org/git/pm-utils Hmmm... on second thoughts, preventing a suspend or hibernate from succeeding is a pretty nasty thing to do. At least without checking on the power situation... some time after I fixed this bug, my laptop battery ran down, my hook prevented hibernation, and so the machine simply ran out of power. So much for my data-loss-preventing hook. Perhaps this is why the bug hasn't been noticed/fixed earlier; the hook fail capability is in itself a bit questionable and rarely used. In my case (prevent hibernating with mounted ntfs-3g partition), forcibly unmounting in the hook is a better idea than allowing a power fail to occur. It seems to me pm-utils would be better off if it supported a "forced" hibernation/suspend (seeing as the client of pm_utils presumably knows whether the hibernation is due to a critical power situation). Also, if a hook can fail, a means of passing the reason it failed back up to the client is a good idea. In any case a note about the potential power loss situation in the HOWTO.hooks document wouldn't go astray. Looks like this is, http://bugs.freedesktop.org/show_bug.cgi?id=32210 And it's applied in Debian as 26-inhibit-on-right-status.patch inside http://ftp.de.debian.org/debian/pool/main/p/pm-utils/pm-utils_1.4.1-14.debian.tar.xz Fix applied as pm-utils-1.4.1-r3 |