Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

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.

share|improve this answer
    
Thank you! Helped me. –  Dmitriy Ugnichenko Feb 7 '13 at 23:02
    
What about apm_battery? Will it make sense to change only that setting? –  int_ua Mar 31 at 19:23

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

share|improve this answer
    
Yes, you're right. A cron schedule to use hdparm is not exactly the ideal solution. Thanks for the tip anyway. –  planck2007 May 9 '12 at 20:41

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 :)

share|improve this answer
    
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 '12 at 20:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.