Comment 652 for bug 59695

Revision history for this message
Steve Langasek (vorlon) wrote :

I've had a look at the acpi-support diff, and the reason this fix isn't taking effect is this code:

DO_HDPARM=y
if [ -e /usr/sbin/laptop_mode ] ; then
  LMT_CONTROL_HD_POWERMGMT=$(. /etc/laptop-mode/laptop-mode.conf && echo "$CONTROL_HD_POWERMGMT")
  if [ "$LMT_CONTROL_HD_POWERMGMT" != 0 ] ; then
    # Laptop mode controls hdparm -B settings, we don't.
    DO_HDPARM=n
  fi
fi

This checks whether laptop-mode is configured to use hdparm, but fails to check whether laptop-mode is *enabled* on the system, which it isn't by default.

Will integrate an additional check for /var/run/laptop-mode-tools/enabled, which is what laptop-mode itself uses at runtime.