#880008 hdparm sets -B for all drives, despite what it says in hdparm.conf

Package:
hdparm
Source:
hdparm
Description:
tune hard disk parameters for high performance
Submitter:
Ralf Jung
Date:
2017-11-12 10:15:06 UTC
Severity:
normal
#880008#5
Date:
2017-10-28 10:07:37 UTC
From:
To:
Dear Maintainer,

hdparm.conf says:

## /sbin/hdparm is not run unless a block of the form:
##      DEV {
##         option
##         option
##         ...
##      }
## exists.

However, thta turns out to be wrong.  My hdparm.conf only contains a block for
/dev/sdb, and yet:

# /lib/systemd/system-sleep/hdparm post

/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/sdb:
 setting standby to 50 (4 minutes + 10 seconds)

As you can see, hdparm is called for /dev/sda as well.

Kind regards,
Ralf

#880008#10
Date:
2017-11-11 23:29:13 UTC
From:
To:
block for


You are right, hdparm shouldn't be touching all disk in the system, but
there is a reason. The issue is summarized here:

https://wiki.ubuntu.com/DanielHahler/Bug59695
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/59695

Currently -B 254 on AC power and -B 128 on battery seem to be the
sensible default values for the vast majority of disks and are set for
every disk supporting APM.

These defaults are defined in /lib/hdparm/hdparm-functions in
hdparm_option() function.

The (ancient) documentation of hdparm need to be updated to note
these defaults.

Best regards,
Alex

#880008#15
Date:
2017-11-12 10:11:39 UTC
From:
To:
See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=448673
It's not a bug, it's a feature! :)
Thank you for brining this up, I wasn't aware of it.