Author Topic: [SOLVED] harddrive spin when running on battery  (Read 510 times)

Offline AnotherUser

  • Full Member
  • ***
  • Posts: 90
[SOLVED] harddrive spin when running on battery
« on: January 09, 2013, 07:13:27 PM »
My laptop has a fully updated installation. I have an annoying problem when running on battery - the laptop makes a barely audible but very annoying noise which goes something like: beep followed by a sound of something spinning up (i.e. a fan or a harddrive). This happens at apparently random intervals when running on battery (there seems to be a correlation to my activity on the laptop) and never happens when running from a power supply.

As far as I can tell, Configure Your Desktop --> Power Management does not have any settings for CPU, fan, or harddrive, which are the things I would associate with a sound of something spinning up.

Besides the fact that this sound is very annoying, I am concerned that some motor in my hardware is constantly having to spin up and down, thus reducing it's lifecycle. Does anyone know what this could be? Or better still, how to stop it from happening?
« Last Edit: January 11, 2013, 08:10:16 PM by AnotherUser »

Offline µT6

  • Hero Member
  • *****
  • Posts: 1841
Re: harddrive spin when running on battery
« Reply #1 on: January 09, 2013, 08:52:54 PM »
is it a toshiba?

what kernel are you using?  uname -r in konsole to get the kernel version
"A question that sometimes drives me hazy: am I or are the others crazy?"

Albert Einstein

Offline agmg

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1886
  • Certified Windows Hater
Re: harddrive spin when running on battery
« Reply #2 on: January 10, 2013, 01:29:43 AM »
Maybe this odd noise is related to power management and more specific to the hard disk spinning or shutting down when idle, to extend battery life?

As root, type in terminal:

hdparm /dev/sda -C (change your drive's letter if needed).

You will get an output similar to this:

Code: [Select]
/dev/sda:
 drive state is:  active/idle

This command will check your drive's power mode state. Possible outputs:
unknown (drive does not support this command)
active/idle (normal operation)
standby (low power mode, drive has spun down)
sleeping (lowest power mode, drive is completely shut down)

Issue the command right after the noise is heard to check if your drive is going for a downspin or a complete shut down.

You should also do a check on your drive's SMART data (gsmartcontrol is the tool for this) and maybe provide us with a screenshot.
For the whole world, you are someone.
For someone, you are the whole world.

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3979
Re: harddrive spin when running on battery
« Reply #3 on: January 10, 2013, 07:14:10 AM »
As agmg says, it might be annoying, but it's what you should want when on battery. It causes a slight lag when accessing the disc, but it stops it draining the battery when not in use.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline AnotherUser

  • Full Member
  • ***
  • Posts: 90
Re: harddrive spin when running on battery
« Reply #4 on: January 10, 2013, 04:54:04 PM »
is it a toshiba?
No, it's a Dell Inspiron 15R 5520

what kernel are you using?
I have observed this under 3.2.18-pclos2.pae.bfs (from standard Synaptic sections), 3.4.11-pclos1.bfs (from testing), and 3.7.1-myown.pae.bfs (my own kernel compile)

As for running hdparm -C /dev/sda, this was the key. When on battery power, it goes into standby. When I hear this noise, the mode changes to active/idle.

If this is normal, does it not hurt the motors in the harddrive to constantly start/stop? If I don't care about the batery life, how can I disable (or at least minimize this) when running on battery power?

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3979
Re: harddrive spin when running on battery
« Reply #5 on: January 10, 2013, 05:36:27 PM »
It shouldn't. Drives used in laptops should be designed for frequent stops and starts just as drives designed for servers are built to run continuously for years and not to stop very often. Some laptop drives can be damaged if they run continuously for several hours because the bearings can't retain lubrication that long. Of course, this assumes you have the original manufacturer's drive in there or you've replaced it with the correct type.

Head parking can cause wear and tear but again, a laptop drive should be built to take it.

If you really want to stop this, look into the settings of hdparm. You might need to write it into a little script to run when power states change.
« Last Edit: January 10, 2013, 05:38:14 PM by kjpetrie »
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline agmg

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1886
  • Certified Windows Hater
Re: harddrive spin when running on battery
« Reply #6 on: January 11, 2013, 01:32:31 AM »
You can play with the APM (Advanced Power Management) feature of the drive, if your drive supports it.

As root, issue the command hdparm -B /dev/sda

You will see a numerical value.
A low value means aggressive power management and a high value means better performance.

Values 1 through 127 permit spin-down.
Values 128 through 254 do not permit spin-down.
Value of 255 completely disables APM (not all drives support it).

I had used the value of 255 on my old mechanical disk to disable APM as I was never using the laptop on battery.
« Last Edit: January 11, 2013, 01:56:22 AM by agmg »
For the whole world, you are someone.
For someone, you are the whole world.

Offline AnotherUser

  • Full Member
  • ***
  • Posts: 90
Re: harddrive spin when running on battery
« Reply #7 on: January 11, 2013, 08:09:59 PM »
You can play with the APM (Advanced Power Management) feature of the drive, if your drive supports it.

As root, issue the command hdparm -B /dev/sda

You will see a numerical value.
A low value means aggressive power management and a high value means better performance.

Values 1 through 127 permit spin-down.
Values 128 through 254 do not permit spin-down.
Value of 255 completely disables APM (not all drives support it).

I had used the value of 255 on my old mechanical disk to disable APM as I was never using the laptop on battery.

I modified my /etc/laptop-mode/laptop-mode.conf to change BATT_HD_POWERMGMT from 1 to 128. Now I'm happy. Thanks!