[laptop-mode] Wrong hdparm setting applied after resume

Arthur A arthur.machlas at gmail.com
Wed Jul 16 13:39:01 CEST 2008


> 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



More information about the laptop-mode mailing list