Bug 1270838 - [udisks2] APM level reset to default value 128 after resume from suspend
[udisks2] APM level reset to default value 128 after resume from suspend
Status: NEW
Product: Fedora
Classification: Fedora
Component: udisks2 (Show other bugs)
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Vojtech Trefny
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2015-10-12 09:40 EDT by Joachim Frieben
Modified: 2017-07-25 15:35 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
FreeDesktop.org 94618 None None None 2016-03-18 17:02 EDT

  None (edit)
Description Joachim Frieben 2015-10-12 09:40:16 EDT
Description of problem:
After setting the APM level of my hard disk to 255 by means of gnome-disk-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.
Comment 1 Joachim Frieben 2016-03-18 02:13:03 EDT
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 254 /dev/sda
exit 0
Comment 2 Joachim Frieben 2016-03-18 02:15:19 EDT
This issue affects Fedora 23 but likewise Fedora 24 including package udisks2-2.1.7-1.fc24.
Comment 3 Michael Catanzaro 2016-03-18 14:40:18 EDT
Do you have a freedesktop Bugzilla account? This would be good to report upstream. Ideally you would do that, so you stay CCed on the issue, but I can forward it if you prefer.
Comment 4 Michael Catanzaro 2016-09-02 15:07:38 EDT
udisks is retired. Reassigning to storaged maintainers to assess whether the bug might affect storaged.
Comment 5 Joachim Frieben 2016-09-02 23:26:02 EDT
Fedora 24 is using udisks2 by default unlike Fedora 25 which is why I have reported the present issue a second time for storaged and Fedora 25 (storaged just behaves the same): bug 1270838 for udisks2 and Fedora 24 and bug 1357190 for storaged and Fedora 25.
What is needed for Fedora 24 is a new build of the existing package storaged which obsoletes udisks2; only then it is justified to set the component from udisks2 to storaged.
Comment 6 Fedora Admin XMLRPC Client 2016-10-03 09:15:08 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 7 Tomas Smetana 2016-10-04 02:18:36 EDT
There's been some discussion about this upstream: I have even created some workaround in storaged to re-set the APM level on resume. However storaged/udisks2 is a D-Bus activated service and nothing guarantees it would be running at the time tha APM level needs to be set (e.g., on boot).
Comment 8 Joachim Frieben 2016-10-04 03:00:44 EDT
(In reply to Tomas Smetana from comment #7)
According to my comment from 2016-07-22 at https://github.com/storaged-project/storaged/issues/72, the test build storaged-2.6.2-2.6.fc23  does restore the correct APM level after resume from suspend. However, there was an issue regarding the precise moment when drive settings got applied.
Comment 9 Fedora End Of Life 2017-07-25 15:21:33 EDT
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Note You need to log in before you can comment on or make changes to this bug.