Friday, June 12, 2015

hdparm fix for ubuntu 15.04

https://www.linux.org.ru/forum/general/8726915

> cat /etc/systemd/system/fix-hdparm@.service 
[Unit]
Description=Fix some hdparm settings after suspend/restore
After=dev-%i.device suspend.target hibernate.target sysinit.target hybrid-sleep.target
Requires=dev-%i.device

[Service]
Type=oneshot
ExecStart=/sbin/hdparm -B 254 /dev/%i

[Install]
WantedBy=suspend.target
WantedBy=hibernate.target
WantedBy=hybrid-sleep.target
WantedBy=sysinit.target
# systemctl enable fix-hdparm@sda
ln -s '/etc/systemd/system/fix-hdparm@.service' '/etc/systemd/system/suspend.target.wants/fix-hdparm@sda.service'
ln -s '/etc/systemd/system/fix-hdparm@.service' '/etc/systemd/system/hibernate.target.wants/fix-hdparm@sda.service'
ln -s '/etc/systemd/system/fix-hdparm@.service' '/etc/systemd/system/hybrid-sleep.target.wants/fix-hdparm@sda.service'
ln -s '/etc/systemd/system/fix-hdparm@.service' '/etc/systemd/system/sysinit.target.wants/fix-hdparm@sda.service'
vasily_pupkin ★★★★★ ()