Spindown hdd after boot, tried systemd or hdparm.conf, does not work @ubuntu20.04
by Johannes33 from LinuxQuestions.org on (#5P5P2)
Hi, I'm trying to get my hdd:s to spin down after boot. Arch Linux wiki suggest using systemd:
Quote:
Code:[Unit]
Description=hdparm sleep
[Service]
Type=oneshot
ExecStart=/usr/bin/hdparm -q -S 120 -y /dev/sdb
[Install]
WantedBy=multi-user.target
After that I make the service start after every reboot by:
Quote:
That did not work. Does anyone know what is wrong?
Then I edited the settings file /etc/hdparm.conf. In the end I appended
Code:/dev/sda {
standby
quiet
spindown_time = 24
}
/dev/sdb {
standby
quiet
spindown_time = 20
}It did not work. I also tried to put standby at the end, i.e.:
Code:/dev/sdb {
quiet
spindown_time = 20
standby
}but it did not work either. Does anyone know what is wrong?
The only thing that works is to type in the terminal:
Quote:
@ubuntu 20.04
Quote:
Putting a drive to sleep directly after boot A device which is rarely needed can be put to sleep directly at the end of the boot process. This does not work with the above udev rule because it happens too early. In order to issue the command when the boot is completed, just create a systemd service and enable it: /etc/systemd/system/hdparm.service |
Description=hdparm sleep
[Service]
Type=oneshot
ExecStart=/usr/bin/hdparm -q -S 120 -y /dev/sdb
[Install]
WantedBy=multi-user.target
After that I make the service start after every reboot by:
Quote:
$ sudo systemctl enable hdparm.service |
Then I edited the settings file /etc/hdparm.conf. In the end I appended
Code:/dev/sda {
standby
quiet
spindown_time = 24
}
/dev/sdb {
standby
quiet
spindown_time = 20
}It did not work. I also tried to put standby at the end, i.e.:
Code:/dev/sdb {
quiet
spindown_time = 20
standby
}but it did not work either. Does anyone know what is wrong?
The only thing that works is to type in the terminal:
Quote:
$sudo hdparm -S 1 /dev/sda |