[laptop-mode] Wrong hdparm setting applied after resume

Joss Winn joss at josswinn.org
Tue Jul 15 13:21:34 CEST 2008


Thanks, Bart. That's alarming, but I'm not surprised. I've asked for
advice on the smartmontools support list:

http://sourceforge.net/mailarchive/forum.php?thread_name=e3cd39280807150407u7e46ca88s48c3aff4a9530c21%40mail.gmail.com&forum_name=smartmontools-support

By the way, I reported to you that changing the laptop-mode.config file to:

BATT_HD_POWERMGMT=254
LM_AC_HD_POWERMGMT=254
LM_AC_HD_POWERMGMT=254
NOLM_AC_HD_POWERMGMT=254

the HDD still seemed to be spinning up and down like a YoYo.

And initially, changing to:

LM_READAHEAD=128
#LM_READAHEAD=3072
NOLM_READAHEAD=128

didn't seem to make any difference.

However, after a reboot, my drive is no longer making any discernible
clicking noises and the SMART Start_Stop_Count seems much more stable.

Of course, my battery is draining a little quicker, and I will
probably adjust these figures once I understand what's going on with
the drive a little better.

Cheers
Joss

On Tue, Jul 15, 2008 at 9:04 AM, Bart Samwel <bart at samwel.tk> wrote:
> 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