0

I am using ubuntu 16.04. I want to disable the spinning down of hard disks. I do not see this option in the power management settings. Where can I find these options?

Ekoji
  • 415

4 Answers4

5

In "Disks" utility, choose your relevant drive, then press Ctrl + e to open Drive Settings, in Standby tab, you can edit standby timeout settings.

kurja
  • 681
2

I am not aware of any GUI tools to do this, but I do not claim that such tools do not exist.

I use the program hdparm to configure this value.

sudo apt install hdparm

How can I control HDD spin down time? goes into more detail.

Sadly, some hard drive brands are not supported in hdparm. Most notably, certain generations of Western Digital Green and Blue drives require use of a proprietary DOS binary wdidle3.

David Foerster
  • 36,890
  • 56
  • 97
  • 151
Rick
  • 881
2

After spending few hours of digging how to perform this in the best way, I want to share my findings.

Short guide how to set spin down time for Your disk:

go gnome-disk-utility in Your system, then select Your disk and leftclick in the right corner, select disk settings.

now in the first tab adjust the value.

The problem is, when you suspend your system and resume this stops working.

To get it working even after resume You need hdparm installed, so:

$ sudo apt install hdparm

now You have to create a script

#!/bin/sh
case $1/$2 in
  pre/*)
    echo "Going to $2..."
     ;;
  post/*)
    echo "Waking up from $2..."
    hdparm -S 30 /dev/sdb
    ;;
esac

The most important line here is hdparm -S 30 /dev/sdb which defines 2minutes + 30 seconds spin down time for disk sdb. Now move script to /lib/systemd/system-sleep and give it executable rights `chmod a+x yourscriptname'.

Voila, now even after resume system will stop the disk.

derHugo
  • 3,376
  • 5
  • 34
  • 52
hugs
  • 21
1

Crucial SSDs do not like to be shut of, so I too am searching for the solution. I found this website, which seems to give the answer but is a little confusing:
Tune Your Hard Disk

My Ubuntu 16.04 reports my timeout is set to 254, which the article states is not used.

fey42
  • 11