I opened this bug because I believe that bug bug 327443 did not fix what it was supposed to fix, because upstream is talking about power.d directory, not sleep.d directory. I'm not sure, what the current policy on wrongly closed bugs is, so please advise if necessary. Brief description of the problem (for further details visit bug 327443 ) That upstream note on the pm-utils homepage mentions doubling functionality laptop-mode-tools vs. pm-utils. This refers to the laptop-mode hook in the /usr/lib/pm-utils/power.d/ directory which is run by the pm-powersave script, but that files/laptop-mode-tools-*-pm-utils-1.4.0.patch deals with the hook in the /usr/lib/pm-utils/sleep.d directory which is responsible for re-checking the power state after resume. And pm-utils don't provide any 99laptop-mode hook in the sleep.d directory anymore (which is what the patch could theoretically fix), so unless we let laptop-mode-tools to install its 01laptop-mode hook into the sleep.d directory, there will be no attempt to recheck the power state after resuming in a different power state. Proposed resolution: unless the pm-powersave script is run at the same time as the laptop-mode script (which is unlikely), these two packages don't actually conflict, however, it may be a good idea to warn the users that they should blacklist the offending hook in power.d if the plan to run both scripts at once the patch in laptop-mode-tools-1.55-r1 results in loss of functionality, so it should be removed from the laptop-mode-tools ebuild Reproducible: Always Steps to Reproduce: 1. install laptop-mode-tools and pm-utils 2. suspend or hibernate using the respective pm-* script 3. resume Actual Results: if one suspends/hibernates on AC power and resumes on battery, this change slips unnoticed and laptop-mode is not triggered by the laptop-mode-tools daemon Expected Results: The power state should be checked after resume. The 01laptop-mode hook in the /etc/pm-utils/sleep.d is responsible for that. I've reported this already in bug 327443, comment 3 , but there it would go most likely unnoticed.
Created attachment 297555 [details, diff] proposed resolution for laptop-mode-tools-1.60-r1.ebuild This is my proposed solution: simply remove the useless patch directive from the ebuild and remove the patches in the files subdir
The new patch at bug 327443 includes the patch for this bug as I believe both fixes should be included together in the next revbump as these two fixes don't conflict (tested on my setup and logically there is no reason for a conflict).
+*laptop-mode-tools-1.60-r1 (16 Jan 2012) + + 16 Jan 2012; Samuli Suominen <ssuominen@gentoo.org> + +laptop-mode-tools-1.60-r1.ebuild: + Stop using -pm-utils-1.4.0.patch and install file containing + HOOK_BLACKLIST="00powersave" to /etc/pm/config.d instead wrt #327443 and + #396703 by Ondrej Grover. Install 99-laptop-mode.rules to /lib/udev/rules.d + instead of /etc/udev/rules.d.