/etc/hdparm.conf is ignored after resuming from hibernation or sleep in 15.04

Bug #1448542 reported by Serhiy
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
hdparm (Debian)
Fix Released
Unknown
hdparm (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

I have

/dev/sda {
    apm = 255
    apm_battery = 255
}

in the /etc/hdparm.conf file because otherwise the disk parks every ~10 seconds. And after upgrading to 15.04 it no longer works after resuming from hibernation, APM level is set to 1 every time.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: hdparm 9.43-1ubuntu3
ProcVersionSignature: Ubuntu 3.19.0-15.15-generic 3.19.3
Uname: Linux 3.19.0-15-generic x86_64
ApportVersion: 2.17.2-0ubuntu1
Architecture: amd64
CurrentDesktop: KDE
Date: Sun Apr 26 00:07:24 2015
Dependencies:
 gcc-5-base 5.1~rc1-0ubuntu1
 libc6 2.21-0ubuntu4
 libgcc1 1:5.1~rc1-0ubuntu1
 multiarch-support 2.21-0ubuntu4
 powermgmt-base 1.31+nmu1
SourcePackage: hdparm
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile..etc.hdparm.conf: 2015-04-25T12:52:55.717071

Revision history for this message
Serhiy (xintx-ua) wrote :
Revision history for this message
Serhiy (xintx-ua) wrote :

Changed the config to

/dev/sda {
        apm = 255
        apm_battery = 255
}

and it worked.

Changed in hdparm (Ubuntu):
status: New → Invalid
Revision history for this message
Serhiy (xintx-ua) wrote : Re: /etc/hdparm.conf is ingored after resuming from hibernation in 15.04

No, it's really ignored after resuming from hibernation.

Changed in hdparm (Ubuntu):
status: Invalid → New
summary: - /etc/hdparm.conf is ingored in 15.04
+ /etc/hdparm.conf is ingored after resuming from hibernation in 15.04
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in hdparm (Ubuntu):
status: New → Confirmed
Changed in hdparm (Ubuntu):
importance: Undecided → Medium
tags: added: systemd-boot
Serhiy (xintx-ua)
summary: - /etc/hdparm.conf is ingored after resuming from hibernation in 15.04
+ /etc/hdparm.conf is ignored after resuming from hibernation in 15.04
Revision history for this message
Serhiy (xintx-ua) wrote :

It's also reset after putting machine to sleep.

summary: - /etc/hdparm.conf is ignored after resuming from hibernation in 15.04
+ /etc/hdparm.conf is ignored after resuming from hibernation or sleep in
+ 15.04
Revision history for this message
Martin Pitt (pitti) wrote :

Just about the only thing that would call hdparm on resuming is /usr/lib/pm-utils/sleep.d/95hdparm-apm . So this is a consequence of not using pm-utils any more, and hdparm now needs to ship a hook in /lib/systemd/system-sleep/ in addition (or instead).

Changed in hdparm (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Serhiy (xintx-ua) wrote :

Workaround:
Adding /lib/systemd/system-sleep/hdparm.sh
with

#!/bin/sh
/usr/lib/pm-utils/sleep.d/95hdparm-apm true

and making it executable worked, thanks.

Revision history for this message
Serhiy (xintx-ua) wrote :

Somehow the workaround no longer works.

no longer affects: hdparm
Changed in hdparm (Debian):
status: Unknown → New
Revision history for this message
Milon Krejca (irox-lp) wrote :

I confirm the problem on Ubuntu 15.10.

In my case I solved it by:
cd /lib/systemd/system-sleep/
vi hdparm_set
>
#!/bin/sh
hdparm -B 254 /dev/sda
>
chmod +x hdparm_set

Check by:
journalctl -u systemd-suspend.service

Changed in hdparm (Debian):
status: New → Fix Released
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

FYI the Debian upload has this and many more issues fixed (package was out of maintainer for a while).
Eventually they picked the solution to:
   * d/hdparm.install: Install systemd sleep and udev scripts,
     thanks to Michael Biebl, Closes: #725284

Too bad it is so late in the cycle while we at least have no delta on this package.
Maybe picking "just" the part that fixes the bug is the safer option?

Changed in hdparm (Ubuntu):
status: Triaged → Fix Committed
Changed in hdparm (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.