[laptop-mode] Wrong hdparm setting applied after resume

Bart Samwel bart at samwel.tk
Wed Jul 16 13:51:45 CEST 2008


Hi Arthur,

Arthur A wrote:
>> Hi Joss,
>>
>> The problem is that pm-utils, the package that handles suspend on
>> Ubuntu, doesn't restart laptop-mode-tools after resuming from suspend.
>> This means that laptop-mode-tools won't be able to reapply its settings
>> at that point.
>>
>> In debian bug #473055 you find this file:
>>
>> http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=70;filename=66LTM;att=1;bug=473055
>>
>> If you put that in /etc/pm/sleep.d under the name "66LTM" (and make it
>> executable, I think!), it may work for you.
>>
>> In Ubuntu and Debian, there are also some cases in which the
>> acpi-support package handles suspend (for instance when you suspend
>> using a laptop's suspend button while not logged in to Gnome or KDE --
>> but the exact set of cases is a bit diffuse). In Debian, acpi-support
>> restarts laptop mode when resuming from suspend. I'm not sure about
>> Ubuntu though. If it so happens that you turn out to use acpi-support
>> for suspend, you may want to add a script to /etc/acpi/resume.d which
>> restarts the laptop-mode service (through the command "invoke-rc.d
>> laptop-mode-tools restart").
>>
>> Does this help?
>>
>> Cheers,
>> Bart
>>
> 
> Hi Bart,
> 
> Sorry, lost the other email account but I was the OP on this question. I had 
> incorrectly assumed that laptop-mode was being restarted correctly because the 
> hdparm values would respond correctly after cycling the power source. However, 
> restarting the service worked for me as well.
> 
> I'd previously had someone on the debian mailing list help me check if the 
> computer was running on AC and if so apply a hard-coded hdparm value, but 
> restarting the service is better.
> 
> Thanks for the answer.
> 
> Here is the script I used:
> ========================================
> #!/bin/sh
> 
> . "${PM_FUNCTIONS}"
> 
> case "$1" in
>     hibernate|suspend)
>         ;;
>     thaw|resume)
> 	invoke-rc.d laptop-mode restart
>         ;;
>     *) exit $NA
>         ;;
> esac

I sent something similar to this as a patch to pm-utils in Debian:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=481766

If they decide to pick that up, all this wouldn't be necessary anymore.
But it seems that the maintainers are a bit unresponsive, all they did
with the bug report initially was downgrade its severity to wishlist,
and then two months of nothing. A couple of days ago I bumped the
severity back to "normal" and included a plea to pleasepleaseplease
include it, but no response yet...

Cheers,
Bart


More information about the laptop-mode mailing list