Resuming after suspend, wrong settings from /etc/hdparm.conf are applied
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
hdparm (Ubuntu) |
Fix Released
|
Medium
|
Brian Murray |
Bug Description
I have a new installation of Ubuntu 13.10 amd64 with hdparm 9.43-1ubuntu2.
I have 3 harddisks and I want 1 and only 1 of these disks to spindown after a minute on inactivity.
My /etc/hdparm.conf looks like this:
*******
/dev/disk/
spindown_time = 12
}
*******
Resuming after a suspend, in pm-suspend.log I found:
*******
Running hook /usr/lib/
/dev/sda:
setting Advanced Power Management level to 0xfe (254)
APM_level = 254
/dev/sdb:
setting Advanced Power Management level to 0xfe (254)
APM_level = 254
/dev/sda:
setting standby to 12 (1 minutes)
/dev/sdb:
setting standby to 12 (1 minutes)
/usr/lib/
*******
Notice that /dev/disk/
After a reboot, /dev/disk/
*******
Running hook /usr/lib/
/dev/sda:
setting Advanced Power Management level to 0xfe (254)
APM_level = 254
/dev/sdc:
setting Advanced Power Management level to 0xfe (254)
APM_level = 254
/dev/sda:
setting Advanced Power Management level to 0xfe (254)
APM_level = 254
/dev/sdc:
setting standby to 12 (1 minutes)
/usr/lib/
*******
So in the 1st instance the spindown setting was applied also to a second disk ( the 3rd disk does not support AdvancedPM so it doesn't appear in the log and, BTW, this is another bug now reported in bug #1225169 ). In the 2nd instance, -B254 was applied a second time to /dev/sda.
IMHO, the problem lies in the variable apm_opt used in /usr/lib/
So a possible solution is to initialize apm_opt at the beginning of each "for" cycle: a patch is attached.
Now in pm-suspend.log I correctly find:
*******
Running hook /usr/lib/
/dev/sda:
setting Advanced Power Management level to 0xfe (254)
APM_level = 254
/dev/sdc:
setting Advanced Power Management level to 0xfe (254)
APM_level = 254
/dev/sdc:
setting standby to 12 (1 minutes)
/usr/lib/
*******
Changed in hdparm (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
The attachment "hdparm.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]