This bug was originally as
Description of problem:
After setting the APM level of my hard disk to 255 by means of gnomedisk-utility, the APM level is actually set to 255 as verifified by means of executing 'hdparm -B /dev/sda'. However, after suspend and resume, the APM level is set to 128 as verified by executing 'hdparm -B /dev/sda' again.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Set APM level to 255.
2. Suspend and resume.
3. Run 'hdparm -B /dev/sda'.
The APM level is 128.
The APM level is 255.
- The hard disk is a Hitachi HTS723216L9SA60 installed in a Lenovo ThinkPad T400.
- Moreover, after resume from suspend, gnome-disk-utility erroneously reports the target value 255 instead of the real value 128.
- It seems that udisk2 needs to provide systemd support with a script in /usr/lib/systemd/system-sleep/ similar to the following which resets the APM level to 254 after resume from suspend:
[ "$1" = "post" ] && exec /usr/sbin/hdparm -B 255 /dev/sda
It seems, that gnomedisk-utility is reading the conf files in /etc/udisks2/ while udisksd isn't. At least not after resume, since after a fresh boot it is working.