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.

This question already has an answer here:

if I run my notebook on battery mode, ubuntu spindown my hardrive every few seconds. How can I fix that? I have tried it with sudo hdparm -S 127 /dev/sda* but I am not able to disable the spindown and can´t find the reason for this "bug". Running Ubuntu 12.04 - Bug is since 12.04


Recent updates are installed, the problem is still recent. I can change the settings via. sudo hdparm -B 127 but if I change hdparm.conf, Ubuntu does not recognize it.

/dev/sda {
  apm_battery=127
}
share|improve this question

marked as duplicate by Eric Carvalho, guntbert, Jorge Castro, user68186, karel Apr 2 at 0:03

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers 2

I think this is the bug affecting you:

https://bugs.launchpad.net/ubuntu/+source/hdparm/+bug/952556

It's supposed to be solved in updates, so please check for updates and apply the latest ones (the one you want is hdparm (9.37-0ubuntu3.1) ). I suggest you reboot after applying them to be on the safe side.

If that doesn't help, the bug has some more suggestions to try. For instance, open a terminal and:

sudo gedit /etc/hdparm.conf

At the very end add this (on a new line):

apm_battery = 128

Then save the file.

You can try this manually by running

sudo hdparm -B 128 /dev/sda

but this will not persist once you've rebooted, so if it works for you, add it to the file as explained above.

share|improve this answer

The bug is/was caused the laptop_mode-tools. laptop_mode-tools ignores your /etc/hdparm.conf settings. To fix it, edit sudo gedit /etc/laptop-mode. Find this part:

#
# Power management for HD (hdparm -B values)
#
BATT_HD_POWERMGMT=1

And change it to:

 #
 # Power management for HD (hdparm -B values)
 #
 BATT_HD_POWERMGMT=127

To check if your new config is in use, disconnect from Power-Supply run:

sudo hdparm -I /dev/sda
share|improve this answer

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