Disable spinning down of hdd in 16.04
Solution 1
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
.
Solution 2
In "Disks" utility, choose your relevant drive, then press Ctrl + e to open Drive Settings, in Standby tab, you can edit standby timeout settings.
Solution 3
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.
Solution 4
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.
Related videos on Youtube
Ekoji
Updated on September 18, 2022Comments
-
Ekoji almost 2 years
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 over 7 yearsthanks. but it is not switched on. Does that mean it is disabled?
-
kurja over 7 yearsif it's "OFF", your disk should not spin down - it's possible that your hardware is not properly supported :/ All I can think of is to use the Disks gui or
hdparm
to try and set your spin down time to some huge length so it's less of an issue. -
oarfish about 5 yearsDrive settings do not seem to exist for external drives in 18.04 :/
-
Muhammed Kadir over 3 yearsThanks for the answer, Linux GUI stuff should be reworked again, everything is everywhere...