laptop-mode.conf inconsistency

Bug #124125 reported by nglnx
4
Affects Status Importance Assigned to Milestone
laptop-mode-tools (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: laptop-mode-tools

In Ubuntu Feisty,

If a user chooses to use laptop-mode on battery AND on AC power, by making the following changes to /etc/laptop-mode/laptop-mode.conf

# Enable laptop mode when on battery power.
ENABLE_LAPTOP_MODE_ON_BATTERY=1

# Enable laptop mode when on AC power.
ENABLE_LAPTOP_MODE_ON_AC=1

# Enable laptop mode when the laptop's lid is closed, even when we're on AC
# power? (ACPI-ONLY)
ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED=1

he expects laptop-mode to be run at boot, but it isn't. You have to do a sudo update-rc.d laptop-mode defaults. This happens because Ubuntu relies on battery events to initiate laptop-mode, instead of symlinking /etc/init.d/laptop-mode to the corresponding runlevels.

To avoid this inconsistency, there should be a warning in the config file that the above manual step has to be performed, or the symlinks should be created in the corresponding runlevel (this last option would not raise any problems to those not using laptop mode, because /etc/init.d/laptop-mode first checks if the user turned on laptop-mode in /etc/defaults/acpi-support before proceeding).

(You might argue why someone would run laptop-mode on AC power. However, there are some valid use cases).

 Thank you for reading my bug report.

Revision history for this message
Nic (ntetreau) wrote :

This issue is really problematic. In fact, it diesn't matter is one decides to enable laptop-mode on both the AC and the Battery or only on the Battery. What I mean is that if the latop is booted unplugged, laptop-mode won't start because it relies, as you said, on the unplugging event to be turned on. As you said you need to manually run this:

To use laptop-mode by default:

Code:

sudo gedit /etc/default/acpi-support

Scroll down change laptop-mode to true:

Code:

ENABLE_LAPTOP_MODE=true

For some reason, laptop-mode is only started when the AC is unplugged. This might seem fine unless you bootup the laptop on the battery, in which case laptop-mode never gets started. Thus, to enable laptop-mode at boot (taken from a lost thread):

Code:

sudo update-rc.d laptop-mode multiuser

Couldn't laptop-mode be added to the init but still check is it is set to "true" in the /etc/default/acpi-support file? This way at least, when someone goes through the trouble of changing that file, laptop-mode will indeed be activated!

Nic

Changed in laptop-mode-tools:
assignee: nobody → tormodvolden
status: New → Confirmed
Changed in laptop-mode-tools:
assignee: tormodvolden → nobody
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.