Various laptop mode problems

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

Bug Description

Binary package hint: laptop-mode

Dapper 6.06 + updates on a Thinkpad t60p.

$ sudo /usr/sbin/laptop_mode start
disabled, not active [unchanged].

$ sudo /usr/sbin/laptop_mode status | less
Mounts:
   /dev/mapper/main-root on / type ext3 (rw,errors=remount-ro)
   proc on /proc type proc (rw)
   /sys on /sys type sysfs (rw)
   varrun on /var/run type tmpfs (rw)
   varlock on /var/lock type tmpfs (rw)
   procbususb on /proc/bus/usb type usbfs (rw)
   udev on /dev type tmpfs (rw)
   devpts on /dev/pts type devpts (rw,gid=5,mode=620)
   devshm on /dev/shm type tmpfs (rw)
   lrm on /lib/modules/2.6.15-26-686/volatile type tmpfs (rw)
   /dev/sda2 on /boot type ext3 (rw)
   /dev/mapper/main-home on /home type ext3 (rw)
   /dev/sda1 on /media/sda1 type ntfs (rw,nls=utf8,umask=007,gid=46)
   /dev/sda4 on /media/sda4 type vfat (rw,utf8,umask=007,gid=46)
   /dev/mapper/main-usr on /usr type ext3 (rw)
   /dev/mapper/main-usr_local on /usr/local type ext3 (rw)
   /dev/mapper/main-var on /var type ext3 (rw)
   /dev/mapper/main-var_log on /var/log type ext3 (rw)

Drive power status:

   /dev/hda:
    drive state is: unknown

(NOTE: drive settings affected by Laptop Mode cannot be retrieved.)

Readahead states:
/dev/mapper/main-root: Permission denied
/usr/sbin/laptop_mode: line 280: / 2: syntax error: operand expected (error token is "/ 2")

Laptop Mode is NOT allowed to run: /var/run/laptop-mode-enabled does not exist.

-----

I don't know why it's detecting /dev/hda. Maybe that's the cdrom?

There are at least two problems:

1. the "syntax error". I think this is an incompatibility between laptop_mode and LVM, but I can't be 100% sure.

2. The installation of laptop-mode is not creating /var/run/laptop-mode-enabled

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Thanks for your bug report, which unfortunately has been left unanswered.

1. Is this still a problem in Feisty or Gutsy? If yes, please run:
 sudo bash -x /usr/sbin/laptop_mode status 2>output.txt
and attach the file output.txt. You can also try "sudo /sbin/blockdev --getra /dev/mapper/main-root" and see what that gives.

2. The file /var/run/laptop-mode-enabled is created by /etc/init.d/laptop_mode at boot, but only if laptop_mode is enabled in
/etc/default/laptop-mode or /etc/default/acpi-support.

Changed in laptop-mode-tools:
assignee: nobody → tormodvolden
status: New → Incomplete
Revision history for this message
DaveAbrahams (boostpro) wrote :

In Feisty, there's no detection of /dev/hda, and there's no syntax error. However, /var/run/laptop-mode-enabled still doesn't exist and thus "Laptop Mode is NOT allowed to run."

/etc/default/laptop-mode contains only these lines:

  # To disable laptop-mode, set the following variable to "no"
  ENABLE_LAPTOP_MODE="yes"

AND, /etc/default/acpi-support ends with this line:

  ENABLE_LAPTOP_MODE=true

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Hmm, /var/lib/dpkg/info/laptop-mode-tools.postinst doesn't install rc.d links for /etc/init.d/laptop_mode, so it's not even run at boot...

Changed in laptop-mode-tools:
assignee: tormodvolden → nobody
status: Incomplete → Confirmed
Revision history for this message
DaveAbrahams (boostpro) wrote :

My guess is that as a result, laptop mode has hardly been tested, at least by ubuntu users. If you have a workaround, I'd like to apply it locally so I can start exercising it here.

Thanks.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

This should create the start-up links:
 sudo update-rc.d laptop-mode defaults

I think the step-child treatment of laptop-mode-tools is due to the focus on gnome-power-manager and acpid who should take care of some of these things. And that the Ubuntu developers don't leave their house very often to enjoy mobile computing :)

Revision history for this message
Tormod Volden (tormodvolden) wrote :

I'll make this a duplicate of bug #95247, since the original issues here are mostly resolved, and the remaining issue is related to the other bug.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Or rather bug #127273. BTW, mjg59 says laptop-mode-tools will be replaced by ubuntu-laptop-mode in Gutsy.

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.