[LMDE UP5] laptop-mode-tools enabling Laptop Mode even if disabled in LMT config

Bug #1054152 reported by Jasmine Hassan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linux Mint
In Progress
Undecided
Unassigned
Debian
Fix Released
Unknown

Bug Description

# apt policy laptop-mode-tools pm-utils
laptop-mode-tools:
  Installed: 1.61-1
  Candidate: 1.61-1
  Version table:
 *** 1.61-1 0
        500 http://mirror.rts-informatique.fr/linuxmint/debian/incoming/ testing/main amd64 Packages
        100 /var/lib/dpkg/status
pm-utils:
  Installed: 1.4.1-9
  Candidate: 1.4.1-9
  Version table:
 *** 1.4.1-9 0
        500 http://mirror.rts-informatique.fr/linuxmint/debian/incoming/ testing/main amd64 Packages
        100 /var/lib/dpkg/status

----

# grep ENABLE_LAPTOP_MODE_TOOLS /etc/laptop-mode/laptop-mode.conf
ENABLE_LAPTOP_MODE_TOOLS=0

# ls -l /var/run/laptop-mode-tools/enabled
ls: cannot access /var/run/laptop-mode-tools/enabled: No such file or directory

# /etc/init.d/laptop-mode start
[ ok ] Enabling laptop mode...done (Warning: Configuration file /etc/laptop-mode/conf.d/board-specific/*.conf is not readable, skipping.
laptop-mode-tools is disabled in config file. Exiting).

# ls -l /var/run/laptop-mode-tools/enabled
-rw-r--r-- 1 root root 0 Sep 21 17:12 /var/run/laptop-mode-tools/enabled

----

I can see at least two problems with this:

1. /usr/lib/pm-utils/power.d/95hdparm-apm checks for the presence of /var/run/laptop-mode-tools/enabled , and when found, the pm-utils hook immediately exits because it assumes laptop-mode-tools is managing HDD PM (by checking for CONTROL_HD_POWERMGMT in /etc/laptop-mode/laptop-mode.conf).
This also affects suspend/resume/hibernate/thaw modes, due to symlink from /usr/lib/pm-utils/sleep.d/95hdparm-apm
This effectively prevents hdparm from managing HDD's APM.

2. /usr/lib/pm-utils/sleep.d/01laptop-mode , when it finds /usr/sbin/laptop_mode, runs it with the arguments "auto force". This results in error: laptop-mode-tools is disabled in config file. Exiting

Revision history for this message
Jasmine Hassan (jasmine-aura) wrote :
Changed in linuxmint:
status: New → In Progress
Changed in debian:
status: Unknown → New
Changed in debian:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.