Laptop Hard Disk Load Cycle

Issues related to hardware problems
my_linux
Posts: 62
Joined: 2008/09/04 07:40:34
Location: London, England

Laptop Hard Disk Load Cycle

Post by my_linux » 2009/04/26 18:48:57

Good evening all,

A while back I decided to use CentOS as my main day to day operating system :) Previously I was mainly using Fedora (old Red Hat <9.x) and occasionally Debian / Debian based distros.

Since I am running CentOS on a Dell M1530 laptop I am concerned by the Load Cycle issue that plagues many laptop hard disks due to aggressive default power management. For those of you who are not aware of the Load Cycle issue please refer to the following link from Ubuntu forums which documents it really well:

http://ubuntuforums.org/showthread.php?t=805570 - *** Please be careful if applying this sort change with respect to hard disk temp! ***

In Fedora and various other distros I have successfully used Laptop Mode Tools http://samwel.tk/laptop_mode/ to help set the hard disk APM value meaning the hard disk would stop rapidly increasing the Load Cycle value when running on mains. The setting I choose to use was hdparm -B 254 /dev/sda when the laptop is running off of mains power and set in scripts supplied with the Laptop Mode Tools RPM which will run as a service.

The problem I am having with CentOS is I can't get Laptop Mode Tools to run as a service either from the RPMForge repo (old version) or by installing the latest Fedora version from Laptop Mode Tools site above. I am therefore having to manually set hdparm -B 254 /dev/sda when running which I occasionally forget :oops:

An error is seen during boot but which changes the CentOS boot to verbose mode but I am unable to locate the error in any of the /var/log files so I can put it in here :(

Can anyone suggest a way of creating a script suitable for CentOS which will auto apply the above (or other) power saving value for when a laptop is running off of mains power?

If anyone can also advise how I can confirm what the error is I can also forward it to the author of Laptop Mode Tools.

Thanks

Edit
I have sent an email to the author of Laptop Mode Tools the link to this post; hopefully it will help :)

User avatar
AlanBartlett
Forum Moderator
Posts: 9324
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: Laptop Hard Disk Load Cycle

Post by AlanBartlett » 2009/04/26 19:33:46

[quote]An error is seen during boot but which changes the CentOS boot to verbose mode[/quote]
I'm not sure if you [i]are[/i] asking a question here -- I'll pretend you are and just say remove the [i]quiet[/i] parameter from the relevant line in your [b]/etc/grub.conf[/b] file.

If you have a video camera, I guess you could focus it on the screen as the system boots . . . ;-)

my_linux
Posts: 62
Joined: 2008/09/04 07:40:34
Location: London, England

Re: Laptop Hard Disk Load Cycle

Post by my_linux » 2009/04/26 20:02:29

[quote]
AlanJBartlett wrote:
I'm not sure if you [i]are[/i] asking a question here -- I'll pretend you are and just say remove the [i]quiet[/i] parameter from the relevant line in your [b]/etc/grub.conf[/b] file.

If you have a video camera, I guess you could focus it on the screen as the system boots . . . ;-)[/quote]

Yeah I guess I am in a way ;-) I will try to take a picture with the Fedora version install from the Laptop Modes Tools website. It'll not be easy due to the reflective screen :( so be prepped for a lot of noise :)

my_linux
Posts: 62
Joined: 2008/09/04 07:40:34
Location: London, England

Re: Laptop Hard Disk Load Cycle

Post by my_linux » 2009/04/26 20:31:05

Here's the boot up image showing Laptop Mode Tools error hope it shows enough to be of some use.

The version installed is available at: http://samwel.tk/laptop_mode/tools/downloads/rpm/laptop-mode-tools-1.45-1.noarch.rpm. Another observation for CentOS 5.3 is after installing Laptop Mode Tools when shutting down ntpd always fails - weird.

Edit
I have tried three time to attach the image but I keep getting write errors :( so I've uploaded to tinypic.com http://tinypic.com/view.php?pic=259xy4p&s=5

User avatar
AlanBartlett
Forum Moderator
Posts: 9324
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: Laptop Hard Disk Load Cycle

Post by AlanBartlett » 2009/04/26 22:46:18

No problem in viewing the image. As for the cause of the start-up error . . . :-?

It's almost an instinctive reaction to say that the latest [i]Fedora[/i] package should not be expected to run on [i]RHEL 5[/i] / [i]CentOS 5[/i]. Be prepared to perform a re-install of the OS if that [i]Fedora[/i] package cannot be removed cleanly.

I've had a look at the site and I would recommend that you give due consideration to the [url=http://samwel.tk/laptop_mode/packages/tarball]tarball[/url] (version 1.47). As everything is written as [i]bash[/i] scripts, it should be relatively easy to find the functionality you require, see how it has been scripted and use it as a basis of your own custom script. ;-)

As I do not own nor use a laptop, it is somewhat difficult for me to make any other suggestion.

my_linux
Posts: 62
Joined: 2008/09/04 07:40:34
Location: London, England

Re: Laptop Hard Disk Load Cycle

Post by my_linux » 2009/04/27 05:09:29

I've uninstalled the Fedora version with out problem. Unfortunately the tarball causes the same error to appear :( and as the Fedora version although Laptop Mode Tools is running as a service the change in hard disk power management is not applied and Load Cycle is increasing :(

I will try to look in to this more... Thanks for your comments Alan.

User avatar
AlanBartlett
Forum Moderator
Posts: 9324
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: Laptop Hard Disk Load Cycle

Post by AlanBartlett » 2009/04/27 11:38:39

[quote]I've uninstalled the Fedora version with out problem. Unfortunately the tarball causes the same error to appear :( and as the Fedora version although Laptop Mode Tools is running as a service the change in hard disk power management is not applied and Load Cycle is increasing :([/quote]
Oh . . . [i]bother[/i]! ;-)

Actually I wasn't suggesting that you install and run the contents of the tarball -- just that you could extract it's contents and see what's what.

An "[i]off the top of my head[/i]" idea. Check the files in the [b]/proc[/b] directory. Is there anything that will reliably indicate when the laptop is running on battery or on mains power? If yes, you should be able to create your own daemon process (service) to check the power supply status and issue the appropriate [b]hdparm -B[/b] command.

my_linux
Posts: 62
Joined: 2008/09/04 07:40:34
Location: London, England

Re: Laptop Hard Disk Load Cycle

Post by my_linux » 2009/04/27 13:17:59

:oops: Well not too worry I should be able to remove the files with out an issue and find out what's what in the tarball and RPM.

I will also look in to /proc directory to see if there is anything obvious there and feedback in the evening.

Thanks

User avatar
AlanBartlett
Forum Moderator
Posts: 9324
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: Laptop Hard Disk Load Cycle

Post by AlanBartlett » 2009/04/27 13:32:34

On this mains-powered workstation, I have a [b]/proc/acpi/power_resource/[/b] directory -- for me, it's empty. For your laptop, who knows?

Also, it might be an idea to check for a [b]/proc/apm/[/b] directory.

my_linux
Posts: 62
Joined: 2008/09/04 07:40:34
Location: London, England

Re: Laptop Hard Disk Load Cycle

Post by my_linux » 2009/04/27 19:23:57

The /proc/acpi/power_resource location is empty and there is no /proc/apm. However, there is a /proc/acpi/ac_adapter/AC/state file. :-?

Post Reply

Return to “CentOS 5 - Hardware Support”