[laptop-mode] Wrong hdparm setting applied after resume

Bart Samwel bart at samwel.tk
Tue Jul 15 10:04:19 CEST 2008


Hi Joss,

Joss Winn wrote:
> Well, trying values of 200, 220 and 192 all return a value of 128.  A
> value of 127 returns a value of 1.
> 
> The drive, for the record, is:
> 
> ATA device, with non-removable media
> 	Model Number:       SAMSUNG HS082HB
> 	Serial Number:      S17QJ16Q602989
> 	Firmware Revision:  NL100-01
> Standards:
> 	Used: ATA/ATAPI-6 T13 1410D revision 1
> 	Supported: 7 6 5 4 & some of 7

Sounds like a hardware issue to me! This drive apparently has only three
levels -- 1, 128 and 254.

>>>> 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").
>>>>
>>> The default for Ubuntu in /etc/default/acpi-support is ENABLE_LAPTOP_MODE=false
>>>
>>> Changing that to 'true', seems to work for me without the additional
>>> script you mention above.
>> That's probably true. The option makes the acpi-support try to control
>> laptop mode, in a bad way which only sort-of works if you have the
>> Ubuntu version of laptop-mode-tools. One of the side effects is that it
>> tries to start or stop laptop mode when resuming, which MIGHT have the
>> desired effect.
>>
> 
> If you want me to test anything related to this, just let me know. You
> say it's "probably true" and "might have the desired effect". If you
> want to be sure of anything, please reiterate and I'll be happy to
> help :-)

Well, if it seems to work, I'm quite happy with that. :-)

>>> 3). I'm still finding that my HDD is spinning down way too frequently.
>>> smartmontools/smart-notifer still reports errors such as: 'Device:
>>> /dev/sda, ATA error count increased from 483 to 485'
>> Interestingly, that may mean anything. Most importantly, that line
>> doesn't mean that the drive spun up or down, it means that some *other*
>> I/O error occurred. Could you check your syslog for lines like:
>>
>> "kernel: sda: dma_intr: status=0x51 { DriveReady SeekComplete Error }"
>>
>> and surrounding lines? Those might give a hint at what's going on here.
>>
> 
> I'm not getting an error message like this in syslog. My syslog is attached.

I think your drive is dying, and dying fast. These lines give it away:

Jul 13 12:15:15 joss-laptop smartd[5218]: Device: /dev/sda, 6768778
Currently unreadable (pending) sectors
Jul 13 20:03:59 joss-laptop smartd[5218]: Device: /dev/sda, 6791550
Currently unreadable (pending) sectors
Jul 13 20:45:15 joss-laptop smartd[5218]: Device: /dev/sda, 6828014
Currently unreadable (pending) sectors
Jul 14 07:42:48 joss-laptop smartd[5223]: Device: /dev/sda, 6858986
Currently unreadable (pending) sectors

This looks like your drive is getting new unreadable sectors at a rate
of 100000 sectors = 50 MB per day. No wonder the number of errors is
increasing. For comparison, see this:

http://forums.fedoraforum.org/showthread.php?t=123227

The guy in this thread gets 9 bad sectors after 3 years of use. 6858986
bad sectors after two weeks is definitely not normal!

Cheers,
Bart


More information about the laptop-mode mailing list