Package: hdparm
Version: 9.60+ds-1

/lib/udev/rules.d/85-hdparm.rules invokes /lib/udev/hdparm when
block devices matching /dev/sdX or /dev/hdX are added.

/lib/udev/hdparm is supposed to extract options relevant to
$DEVNAME and battery-vs-ac status from /etc/hdparm.conf and apply
them using /sbin/hdparm.  According to the changelog, since version
9.58+ds-2 the script singles out APM options and delegates them to
/usr/lib/pm-utils/sleep.d/95hdparm-apm.

However, /usr/lib/pm-utils/sleep.d/95hdparm-apm includes the following fragment:

    # Do nothing when called via /etc/init.d/acpi-support; udev rules take care
    # of setting the initial hdparm policy for us.
    if ([ "$previous" ] && [ "$runlevel" ]) || [ "$runlevel" = S ]; then
        exit 0
    fi

When the condition is met (e.g. acpid handling resume-from-suspend),
APM options are not restored according to /etc/hdparm.conf.  Since udev
rules rely on /lib/udev/hdparm, the comment doesn't apply.

Please revert /lib/udev/hdparm to the previous version, so that it again
does just one thing: apply to device X all options configured for X
in /etc/hdparm.conf.

By the way, every now and then the hdparm package changes in surprising
ways: perhaps including a NEWS.Debian.gz could help.

Best regards,
        g.



-- System Information:
Debian Release: 11.0
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-8-amd64 (SMP w/4 CPU threads)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages hdparm depends on:
ii  libc6     2.31-13
ii  lsb-base  11.1.0

Versions of packages hdparm recommends:
pn  powermgmt-base  <none>

hdparm suggests no packages.

-- Configuration Files:
/etc/hdparm.conf changed:
quiet
/dev/sda {
    apm = 254
    apm_battery = 254
    spindown_time = 250
    write_cache = off
}


-- no debconf information

Reply via email to