laptop-mode-tools not setting /proc/sys/vm/laptop_mode

Bug #532431 reported by Ákos Maróy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
laptop-mode-tools (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: laptop-mode-tools

it seems the laptop-mode-tools services is not seting /proc/sys/vm/laptop_mode properly:

$ sudo /etc/init.d/laptop-mode start
$ cat /proc/sys/vm/laptop_mode
0
$ cat /etc/laptop-mode/laptop-mode.conf | grep ENABLE
ENABLE_LAPTOP_MODE_ON_BATTERY=1
ENABLE_LAPTOP_MODE_ON_AC=1
ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED=1

I'd expect /proc/sys/vm/laptop_mode to contain 5 there instead of 0

Revision history for this message
Ritesh Raj Sarraf (rrs) wrote : Re: [Bug 532431] [NEW] laptop-mode-tools not setting /proc/sys/vm/laptop_mode

Can you enable VERBOSE_OUTPUT in /etc/laptop-mode/laptop-mode.conf and then
try restarting ?

On Friday 05 Mar 2010 11:30:51 you wrote:
> it seems the laptop-mode-tools services is not seting
> /proc/sys/vm/laptop_mode properly:
>
> $ sudo /etc/init.d/laptop-mode start
> $ cat /proc/sys/vm/laptop_mode
> 0
> $ cat /etc/laptop-mode/laptop-mode.conf | grep ENABLE
> ENABLE_LAPTOP_MODE_ON_BATTERY=1
> ENABLE_LAPTOP_MODE_ON_AC=1
> ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED=1
>

--
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."

Revision history for this message
Ákos Maróy (akos-maroy) wrote :

I did, but there's no additional output - would it be in dmesg or syslog?

$ grep VERBOSE /etc/laptop-mode/laptop-mode.conf
VERBOSE_OUTPUT=1
$ sudo /etc/init.d/laptop-mode restart
$ cat /proc/sys/vm/laptop_mode
0
$ tail /var/log/messages
Mar 5 09:13:51 tonkachi kernel: [ 158.716022] Registered led device: iwl-phy0::radio
Mar 5 09:13:51 tonkachi kernel: [ 158.716052] Registered led device: iwl-phy0::assoc
Mar 5 09:13:51 tonkachi kernel: [ 158.716067] Registered led device: iwl-phy0::RX
Mar 5 09:13:51 tonkachi kernel: [ 158.716084] Registered led device: iwl-phy0::TX
Mar 5 09:13:51 tonkachi kernel: [ 158.791866] ADDRCONF(NETDEV_UP): wlan0: link is not ready
Mar 5 09:14:27 tonkachi kernel: [ 194.740198] compiz.real[2731]: segfault at 29b1000 ip 00007fcafc4fe8f0 sp 00007fff31e34c88 error 4 in libc-2.10.1.so[7fcafc47c000+166000]
Mar 5 09:14:27 tonkachi kernel: [ 194.947346] Registered led device: iwl-phy0::radio
Mar 5 09:14:27 tonkachi kernel: [ 194.947376] Registered led device: iwl-phy0::assoc
Mar 5 09:14:27 tonkachi kernel: [ 194.947403] Registered led device: iwl-phy0::RX
Mar 5 09:14:27 tonkachi kernel: [ 194.947416] Registered led device: iwl-phy0::TX
$ dmesg | tail
[ 158.716067] Registered led device: iwl-phy0::RX
[ 158.716084] Registered led device: iwl-phy0::TX
[ 158.791866] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 194.740198] compiz.real[2731]: segfault at 29b1000 ip 00007fcafc4fe8f0 sp 00007fff31e34c88 error 4 in libc-2.10.1.so[7fcafc47c000+166000]
[ 194.947346] Registered led device: iwl-phy0::radio
[ 194.947376] Registered led device: iwl-phy0::assoc
[ 194.947403] Registered led device: iwl-phy0::RX
[ 194.947416] Registered led device: iwl-phy0::TX
[ 195.001203] wlan0: Selected IBSS BSSID 02:18:41:93:62:2f based on configured SSID
[ 205.397553] wlan0: no IPv6 routers present

Revision history for this message
Ritesh Raj Sarraf (rrs) wrote : Re: [Bug 532431] Re: laptop-mode-tools not setting /proc/sys/vm/laptop_mode

On Friday 05 Mar 2010 13:47:54 you wrote:
> I did, but there's no additional output - would it be in dmesg or
> syslog?

sorry. I meant was to enable VERBOSE_OUTPUT and then send the output of the
following 2 commands:

* /etc/init.d/laptop-mode status
* /etc/init.d/laptop-mode restart

Regards,
Ritesh
--
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."

Revision history for this message
Ákos Maróy (akos-maroy) wrote :
Download full text (6.0 KiB)

here you go - still nothing:

# grep VERBOSE /etc/laptop-mode/laptop-mode.conf
VERBOSE_OUTPUT=1
# /etc/init.d/laptop-mode status
# /etc/init.d/laptop-mode restart

but, looking into the init.d script above, it starts with:

# Check that laptop-mode is enabled
if [ -f /etc/default/laptop-mode ]; then
       . /etc/default/laptop-mode;
fi

hm, I don't have such a file - should it have come from the package?

looking on:

# FIXME: this shouldn't be configured there
if [ -f /etc/default/acpi-support ]; then
       . /etc/default/acpi-support;
fi

I have this file, but here, laptop mode is disabled:

# grep ENABLE /etc/default/acpi-support
ENABLE_LAPTOP_MODE=false

this file comes from the acpi-support package. I removed it, actually had to purge it so that the this config file is removed. now I get:

# /etc/init.d/laptop-mode status
Laptop mode status:

Mounts:
   /dev/mapper/isw_cdfcbdcfed_RAID-05 on / type ext4 (rw,noatime,errors=remount-ro)
   proc on /proc type proc (rw)
   none on /sys type sysfs (rw,noexec,nosuid,nodev)
   none on /sys/fs/fuse/connections type fusectl (rw)
   none on /sys/kernel/debug type debugfs (rw)
   none on /sys/kernel/security type securityfs (rw)
   udev on /dev type tmpfs (rw,mode=0755)
   none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
   none on /dev/shm type tmpfs (rw,nosuid,nodev)
   none on /var/run type tmpfs (rw,nosuid,mode=0755)
   none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
   none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
   /dev/mapper/isw_cdfcbdcfed_RAID-01 on /mnt/windows type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
   /dev/mapper/isw_cdfcbdcfed_RAID-02 on /mnt/recovery type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
   binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
   gvfs-fuse-daemon on /home/maroy/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=maroy)

Drive power status:

   /dev/sda:
    drive state is: active/idle

   /dev/sdb:
    drive state is: active/idle

   /dev/sdc:
    drive state is: unknown

   /dev/mapper/isw_cdfcbdcfed_RAID-0:
    drive state is: unknown

   /dev/mapper/isw_cdfcbdcfed_RAID-01:
    drive state is: unknown

   /dev/mapper/isw_cdfcbdcfed_RAID-02:
    drive state is: unknown

   /dev/mapper/isw_cdfcbdcfed_RAID-03:
    drive state is: unknown

   /dev/mapper/isw_cdfcbdcfed_RAID-05:
    drive state is: unknown

   /dev/mapper/isw_cdfcbdcfed_RAID-06:
    drive state is: unknown

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

Readahead states:
   /dev/mapper/isw_cdfcbdcfed_RAID-05: 128 kB
   /dev/mapper/isw_cdfcbdcfed_RAID-01: 128 kB
   /dev/mapper/isw_cdfcbdcfed_RAID-02: 128 kB

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

/proc/sys/vm/laptop_mode:
   0

/proc/sys/vm/dirty_ratio:
   20

/proc/sys/vm/dirty_background_ratio:
   10

/proc/sys/vm/dirty_expire_centisecs:
   3000

/proc/sys/vm/dirty_writeback_centisecs:
   500

/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq:
   1600000

/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_fre...

Read more...

Revision history for this message
Ritesh Raj Sarraf (rrs) wrote :

On Saturday 06 Mar 2010 19:41:15 you wrote:
> so the question is, why is acpi-support sabotaging laptop mode? or,
> actually the init script itself says:
>
> # FIXME: this shouldn't be configured there
> if [ -f /etc/default/acpi-support ]; then
> . /etc/default/acpi-support;
> fi

It is not really a sabotage. The ubuntu integration of laptop-mode-tools is
something like this way. I think they trigger laptop-mode-tools through pm-
utils.

As upstream we don't do this, but ubuntu as part of their integration, must
have designed it to be triggered differently.

I think you should just check it thoroughly and report on this bug. Someone
from the ubuntu team could have a look at it.

Regards,
Ritesh
--
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."

Revision history for this message
Ákos Maróy (akos-maroy) wrote :

I see. other then filing a bug at the ubuntu bug tracker, how would I have someone from the ubuntu team looking into it?

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.