Ubuntu: Setting SATA HDD spindown time for Western Digital Green drives [duplicate]



Question:

This question already has an answer here:

I am able to spindown my SATA HDDs by using

sudo hdparm -y /dev/sdc  

The state shown by

sudo hdparm -C /dev/sdc  

changes from active/idle to standby (and I can hear the HDD spin down).

However, using

sudo hdparm -S5 /dev/sdc  

doesn't spin down the drive after 5*5 = 25secs.

Some additional information:

  • AHCI is enabled.
  • I am using Western Digital Green drives.
  • APM_level = not supported
  • Filesystem is ext4

Edit: This question is not a duplicate to How can I control HDD spin down time? because it addresses Western Digital Green drives, which will not work with hdparm.


Solution:1

After more research, it seems that the -B and -S options of hdparm just doesn't work with certain Western Digital (and maybe other) drives.

This includes my WD10EADS, WD10EACS and WD20EARX.

I found a solution: hd-idle

To install hd-idle on Ubuntu:

wget https://downloads.sourceforge.net/project/hd-idle/hd-idle-1.04.tgz  tar xvfz hd-idle*.tgz  cd hd-idle  sudo apt-get install debhelper  sudo dpkg-buildpackage -uc -us -rfakeroot  cd ..  sudo dpkg -i hd-idle_*.deb  # To run at startup:  sudo update-rc.d hd-idle defaults  nano /etc/default/hd-idle  

/etc/default/hd-idle content:

START_HD_IDLE=true  # Optional, to limit to a specific drives:  # (leading '-i 0' to disable hd-idle on other disks)  HD_IDLE_OPTS="-i 0 -a /dev/disk/by-uuid/DRIVE1UID -i 600 -a /dev/disk/by-uuid/DRIVE2UID -i 600"  

Disable system-managed disk power management settings in Storage > Physical Disks > Disk properties (redundant).

sudo service hd-idle start  

Check:

sudo hdparm -C /dev/sd[a-z]  


Solution:2

The ubuntu way seems to be the laptop mode*

How to:

apt-get install laptop-mode-tools  

Afterwards you are able to configure individual power/standby settings through

vim /etc/hdparm.conf  

And check your current laptop mode state with:

cat /proc/sys/vm/laptop_mode  

If you want to know more:


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »