Bug 954059 - Quirk for 'hdparm -B 254' on resume doesn't work
Summary: Quirk for 'hdparm -B 254' on resume doesn't work
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: pm-utils
Version: 18
Hardware: i686
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-20 09:20 UTC by carasin
Modified: 2014-02-05 20:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-05 20:43:57 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
The 'pm-utils-bugreport-info.sh' output. (10.89 KB, application/octet-stream)
2013-04-20 09:20 UTC, carasin
no flags Details

Description carasin 2013-04-20 09:20:25 UTC
Created attachment 737942 [details]
The 'pm-utils-bugreport-info.sh' output.

Description of problem:

I have two quirks for hdparm. The first one is located in /etc/rc.d/rc.local. The second one is located in /usr/lib/pm-utils/sleep.d/99hdparm. Quirks contain the following strings:
------------------------------------------------

[user@localhost]$ cat /etc/rc.d/rc.local

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
hdparm -B254 /dev/sda
hdparm -S0 /dev/sda
------------------------------------------------

[user@localhost]$ cat /usr/lib/pm-utils/sleep.d/99hdparm

#!/bin/bash
#
# This quirk switches the HDD PM mode to 254 when resume working
# after "sleeping".

case "$1" in
        resume|thaw)
                hdparm -B254 /dev/sda
                hdparm -S0 /dev/sda
                ;;
        *)
                ;;
esac

exit $?
------------------------------------------------

They both belong to "root" user and have +x bit. This quirks worked well after I've installed F18. But now the command 'hdparm -B /dev/sda' says "APM_level = off" (=255) after hibernation and resuming. The script '/etc/rc.d/rc.local' works well. '/var/log/pm-suspend.log' has the date 20.02.2013, although the laptop has sleeped / waked up several times since that date. So, the log is useless.
_______________________

Version-Release number of selected component (if applicable):

kernel-PAE-3.8.7-201.fc18.i686
pm-utils-1.4.1-22.fc18.i686
hdparm-9.42-1.fc18.i686
systemd-197-1.fc18.2.i686
kde = 4.10.2-1
_______________________

How reproducible:

always
_______________________

Steps to reproduce:

1. Put the '99hdparm' quirk (with 'hdparm -B254 /dev/sda' inside) into '/usr/lib/pm-utils/sleep.d/'.
2. Hibernate / resume the machine.
_______________________

Actual results:

'hdparm -B /dev/sda' says "APM_level = off" (=255) after hibernation and resuming.
_______________________

Expected results:

'hdparm -B /dev/sda' says "APM_level = 254" after hibernation and resuming.
_______________________

Additional info:

Maybe this is related to systemd in any way?

Comment 1 carasin 2013-04-20 10:13:34 UTC
The work around is described here: https://bugzilla.redhat.com/show_bug.cgi?id=382061#c41
It works with help of systemd.
>I found this solution:
>
>It's possible to write a script and save it in /usr/lib/systemd/system-sleep/
>
>like this:
>
>#!/bin/sh
>case $1 in
>   pre)
>   ;;
>   post)
>   hdparm -B [APM_PARAMETER] /dev/sda
>       ;;
>esac
>
>So, after resume hdparm is correctly recalled. 
>Btw, I think the best way would be that this setting can be automatically >enabled through Gnome Disk (when user modify Advanced power management).
>

Comment 2 Fedora End Of Life 2013-12-21 12:54:46 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. 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 WONTFIX if it remains open with a Fedora 
'version' of '18'.

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 prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 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 to Fedora 18's end of life.

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.

Comment 3 Fedora End Of Life 2014-02-05 20:43:57 UTC
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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