Bug 94618

Summary: [udisks2] APM level reset to default value 128 after resume from suspend
Product: udisks Reporter: Joachim Frieben <jfrieben>
Component: operationsAssignee: Martin Pitt <martin.pitt>
Status: NEW --- QA Contact:
Severity: normal    
Priority: medium CC: b3nmore, mcatanzaro
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
See Also: https://bugzilla.redhat.com/show_bug.cgi?id=1270838
i915 platform: i915 features:

Description Joachim Frieben 2016-03-18 21:00:19 UTC

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):

How reproducible:

Steps to Reproduce:
1. Set APM level to 255.
2. Suspend and resume.
3. Run 'hdparm -B /dev/sda'.

Actual results:
The APM level is 128.

Expected results:
The APM level is 255.

Additional info:
- 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
exit 0
Comment 1 b3nmore 2016-05-02 17:30:43 UTC
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.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.