Bug#880008: hdparm sets -B for all drives, despite what it says in hdparm.conf
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.
Bug#880008: hdparm sets -B for all drives, despite what it says in hdparm.conf
On 10/28/2017 12:07 PM, Ralf Jung wrote: > Package: hdparm > Version: 9.51+ds-1 > Severity: normal > > 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 > -- Configuration Files: > /etc/hdparm.conf changed: > quiet > /dev/sdb { > #apm = 254 > #apm_battery = 254 > # spin-down time of 4:10 min (=50*5 seconds) > spindown_time = 50 > } 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
Bug#880008: hdparm sets -B for all drives, despite what it says in hdparm.conf
Package: hdparm Version: 9.51+ds-1 Severity: normal 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 -- System Information: Debian Release: buster/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (100, 'unstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.13.0-1-amd64 (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages hdparm depends on: ii libc6 2.24-17 ii lsb-base 9.20170808 Versions of packages hdparm recommends: ii powermgmt-base 1.31+nmu1 Versions of packages hdparm suggests: pn apmd -- Configuration Files: /etc/hdparm.conf changed: quiet /dev/sdb { #apm = 254 #apm_battery = 254 # spin-down time of 4:10 min (=50*5 seconds) spindown_time = 50 } -- no debconf information