9

In Ubuntu 12.04 the power management does not allow control of hard disk spinning preferences. As a result, when the laptop is on battery the hard disk continues to stop spinning to save power.

I could change manually the settings via the command

sudo hdparm -B 255 /dev/sda

that disables the hard disk power management and lets it spin continuously also on battery. But when I plug the laptop to power and then return to battery the manual setting is lost.

Is there a way to configure this permanently? I really don't care if the laptop consumes more power, but I don't like the disk stopping and starting when I am on battery.

3 Answers 3

7

an other option (I used myself) can be to edit the hdparm configuration file:

/etc/hdparm.conf

In there you find a commented line like this:

#apm = 255

Just delete the # to uncomment so that the hd power management will be disabled by default.

In my case I did it because my laptop disk was turned off and on several times in short time intervals. By the way I discovered that it is the BIOS that is doing that and not hdparm policies and the likes... It happens when I am on battery though.

1
  • What about apm_battery? Will it make sense to change only that setting?
    – int_ua
    Mar 31, 2014 at 19:23
1

If nothing else, you can do a dirty hack by using cron (the Linux task scheduler) to issue that command periodically. It's not exactly ideal though.

https://help.ubuntu.com/community/CronHowto

1
  • Yes, you're right. A cron schedule to use hdparm is not exactly the ideal solution. Thanks for the tip anyway.
    – planck2007
    May 9, 2012 at 20:41
0

You can put a script inisde /etc/pm/ folder. Check the info described here: https://help.ubuntu.com/community/PowerManagement/ReducedPower

Sorry for not providing a complete solution - I'm at work, pretending to be productive :)

1
  • I read the link and it is not exactly a piece of cake. It gives hints though. I found disappointing that in 12.04 the removed the possibility to configure hard disk power management in system settings. Thanks anyway for the suggestion, I will keep it in mind if I don't find anything more user friendly
    – planck2007
    May 9, 2012 at 20:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .