I have a laptop with the accursed Western Digital hard drive. I have used SMART to look at Load/Unload cycles (
smartctl -a|grep Load
). They increase too fast towards the 300,000 lifetime limit.
I use GNOME Disks to change the hard drive APM to 254, and they stop increasing. This wasn't a solution on its own: I also had to create /usr/lib/systemd/system-sleep/harddrive.sh
which does systemctl restart udisks2
- to handle resume from suspend, when this drive settings is lost.
But some months later, I noticed the drive was clicking again and indeed Load/Unload were increasing. What went wrong?
Also I went to look in GNOME Disks. I can no longer find either SMART data, nor the drive APM setting! What happened?!
I have no SELinux alerts in SELinux Troubleshooter.
$ rpm -q gnome-disk-utility
gnome-disk-utility-3.22.1-1.fc25.x86_64
$ rpm -q --whatprovides /usr/libexec/udisks2/udisksd
storaged-2.6.2-2.fc25.x86_64
$ systemctl status udisks2
● udisks2.service - Disk Manager
Loaded: loaded (/usr/lib/systemd/system/udisks2.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2017-02-23 14:10:47 GMT; 3min 55s ago
Docs: man:udisks(8)
Main PID: 6416 (udisksd)
Tasks: 5 (limit: 4915)
CGroup: /system.slice/udisks2.service
└─6416 /usr/libexec/udisks2/udisksd --no-debug
Feb 23 14:10:47 alan-laptop systemd: Starting Disk Manager...
Feb 23 14:10:47 alan-laptop udisksd: udisks daemon version 2.6.2 starting
Feb 23 14:10:47 alan-laptop udisksd: Acquired the name org.freedesktop.UDisks2 on the system message bus
Feb 23 14:10:47 alan-laptop systemd: Started Disk Manager.
$ journalctl -b |grep udisks.*sda
Feb 21 09:05:42 alan-laptop udisksd: Applying configuration from /etc/udisks2/WDC-WD5000LPLX-75ZNTT0-WX71A958AN1Y.conf to /dev/sda
Feb 21 09:05:42 alan-laptop udisksd: Set APM level to 254 on /dev/sda [WDC-WD5000LPLX-75ZNTT0-WX71A958AN1Y]
Feb 21 10:20:56 alan-laptop udisksd: Applying configuration from /etc/udisks2/WDC-WD5000LPLX-75ZNTT0-WX71A958AN1Y.conf to /dev/sda
Feb 21 10:20:56 alan-laptop udisksd: Set APM level to 254 on /dev/sda [WDC-WD5000LPLX-75ZNTT0-WX71A958AN1Y]
...
Feb 23 10:07:16 alan-laptop udisksd: Applying configuration from /etc/udisks2/WDC-WD5000LPLX-75ZNTT0-WX71A958AN1Y.conf to /dev/sda
Feb 23 10:07:17 alan-laptop udisksd: Set APM level to 254 on /dev/sda [WDC-WD5000LPLX-75ZNTT0-WX71A958AN1Y]
Feb 23 12:31:36 alan-laptop udisksd: Applying configuration from /etc/udisks2/WDC-WD5000LPLX-75ZNTT0-WX71A958AN1Y.conf to /dev/sda
Feb 23 12:31:36 alan-laptop udisksd: Set APM level to 254 on /dev/sda [WDC-WD5000LPLX-75ZNTT0-WX71A958AN1Y]
$ date
Thu 23 Feb 14:25:05 GMT 2017
My particular workaround for the suspend problem is not effective right now. The configuration was not applied when it resumed at this time:
Feb 23 13:02:55 alan-laptop systemd-sleep: System resumed.
This is despite udisks being started at this time:
Feb 23 13:02:55 alan-laptop udisksd: udisks daemon version 2.6.2 starting
Feb 23 13:02:55 alan-laptop udisksd: Acquired the name org.freedesktop.UDisks2 on the system message bus
Some version of storaged (udisks) is [supposed to be re-applying the setting on resume](https://github.com/storaged-project/udisks/issues/72) , but that doesn't seem to be the case on my system. I tried disabling my script in case it broke something, but again, after resume from suspend, hdparm -B /dev/sda
shows 128
.
Asked by sourcejedi
(53232 rep)
Feb 23, 2017, 02:27 PM
Last activity: May 8, 2017, 01:53 PM
Last activity: May 8, 2017, 01:53 PM