[ltp] ACPI sleep loses battery info - until KDE logout

Dimitris Kogias linux-thinkpad@linux-thinkpad.org
Tue, 24 Apr 2007 23:46:56 -0700


Hi all,

This is on a brand new X60 1709-CTO (BIOS is 2.09 - latest), Debian
unstable, Debian 2.6.20-1 kernel (which is based on 2.6.20.7).

I put the system to sleep (Fn-F4) while logged in to a KDE session.
After I wake the system back up, the KLaptop icon shows no battery info
and sure enough, there is nothing under /proc/acpi/battery.

At this point, the sleep event in /var/log/acpid looks like this:



--snip--
[Tue Apr 24 20:05:12 2007] received event "button/sleep SLPB 00000080
00000001"
[Tue Apr 24 20:05:12 2007] notifying client 2926[105:108]
[Tue Apr 24 20:05:12 2007] notifying client 3273[0:0]
[Tue Apr 24 20:05:12 2007] client has disconnected
[Tue Apr 24 20:05:12 2007] notifying client 3273[0:0]
[Tue Apr 24 20:05:12 2007] client has disconnected
[Tue Apr 24 20:05:12 2007] notifying client 3273[0:0]
[Tue Apr 24 20:05:12 2007] executing action "/etc/acpi/sleep.sh"
[Tue Apr 24 20:05:12 2007] BEGIN HANDLER MESSAGES
ERROR: Couldn't attach to DCOP server!
There is already a pid file /var/run/dhclient.eth1.pid with pid 5600
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth1/00:19:d2:d0:4f:c0
Sending on   LPF/eth1/00:19:d2:d0:4f:c0
Sending on   Socket/fallback
DHCPRELEASE on eth1 to 192.168.11.1 port 67
Stopping ipw3945 regulatory daemon: ipw3945d.
Shutting down ALSA...done.
Calling INT 0x15 (F000:5DB9)
 EAX is 80005F40
Leaving interrupt call.
Calling INT 0x15 (F000:5DB9)
 EAX is 80005F34
Leaving interrupt call.
Calling INT 0x15 (F000:5DB9)
 EAX is 80005F35
Leaving interrupt call.
Calling INT 0x10 (C000:0014)
 EAX is 80005F61
Leaving interrupt call.
Calling INT 0x10 (C000:0014)
 EAX is 80005F64
Leaving interrupt call.
Calling INT 0x10 (C000:0014)
 EAX is 80005F64
Leaving interrupt call.
Calling INT 0x10 (C000:0014)
 EAX is 80005F64
Leaving interrupt call.
Calling INT 0x10 (C000:0014)
 EAX is 80005F64
Leaving interrupt call.
Calling INT 0x10 (C000:0014)
 EAX is 3
Leaving interrupt call.
Function not supported
Restore video state failed
Function not supported
Starting ipw3945 regulatory daemon: ipw3945d.
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Setting up ALSA...done.
FATAL: Module fan is in use.
FATAL: Module thermal is in use.
grep: /proc/acpi/fan/*/state: No such file or directory
[Tue Apr 24 20:06:01 2007] END HANDLER MESSAGES
[Tue Apr 24 20:06:01 2007] action exited with status 0
[Tue Apr 24 20:06:01 2007] completed event "button/sleep SLPB 00000080
00000001"
[Tue Apr 24 20:06:01 2007] received event "processor CPU0 00000081 00000000"
[Tue Apr 24 20:06:01 2007] notifying client 2926[105:108]
[Tue Apr 24 20:06:01 2007] notifying client 3273[0:0]
[Tue Apr 24 20:06:01 2007] client has disconnected
[Tue Apr 24 20:06:01 2007] completed event "processor CPU0 00000081
00000000"
[Tue Apr 24 20:06:01 2007] client connected from 3273[0:0]
[Tue Apr 24 20:06:01 2007] 1 client rule loaded
[Tue Apr 24 20:06:01 2007] received event "processor CPU1 00000081 00000000"
[Tue Apr 24 20:06:01 2007] notifying client 2926[105:108]
[Tue Apr 24 20:06:01 2007] notifying client 3273[0:0]
[Tue Apr 24 20:06:01 2007] completed event "processor CPU1 00000081
00000000"
Listening on LPF/eth1/00:19:d2:d0:4f:c0
Sending on   LPF/eth1/00:19:d2:d0:4f:c0
Sending on   Socket/fallback
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
DHCPOFFER from 192.168.11.1
DHCPREQUEST on eth1 to 255.255.255.255 port 67
DHCPACK from 192.168.11.1
bound to 192.168.11.202 -- renewal in 17715 seconds.
--snip--



After I log out of the KDE session, /var/log/acpid has these extra entries:



--snip--
[Tue Apr 24 20:09:40 2007] client connected from 3273[0:0]
[Tue Apr 24 20:09:40 2007] 1 client rule loaded
[Tue Apr 24 20:09:52 2007] client connected from 3273[0:0]
[Tue Apr 24 20:09:52 2007] 1 client rule loaded
--snip--



and the battery has "returned" under /proc/acpi/battery.

The whole event from the kernel log looks like this:



--snip--
Apr 24 20:06:01 detritus kernel: input: Power Button (FF) as
/class/input/input13
Apr 24 20:06:01 detritus kernel: ACPI: Power Button (FF) [PWRF]
Apr 24 20:06:01 detritus kernel: input: Lid Switch as /class/input/input14
Apr 24 20:06:01 detritus kernel: ACPI: Lid Switch [LID]
Apr 24 20:06:01 detritus kernel: input: Sleep Button (CM) as
/class/input/input15
Apr 24 20:06:01 detritus kernel: ACPI: Sleep Button (CM) [SLPB]
Apr 24 20:06:01 detritus kernel: ADDRCONF(NETDEV_CHANGE): eth1: link
becomes ready
Apr 24 20:06:01 detritus kernel: ACPI: AC Adapter [AC] (on-line)
Apr 24 20:06:01 detritus kernel: remove_proc_entry: acpi/battery busy,
count=1
Apr 24 20:06:01 detritus kernel: ACPI: Battery Slot [BAT0] (battery present)
Apr 24 20:06:05 detritus kernel: ata1: SATA link up 1.5 Gbps (SStatus
113 SControl 300)
Apr 24 20:06:05 detritus kernel: ata1.00: configured for UDMA/100
Apr 24 20:06:05 detritus kernel: SCSI device sda: 234441648 512-byte
hdwr sectors (120034 MB)
Apr 24 20:06:05 detritus kernel: sda: Write Protect is off
Apr 24 20:06:05 detritus kernel: sda: Mode Sense: 00 3a 00 00
Apr 24 20:06:05 detritus kernel: SCSI device sda: write cache: enabled,
read cache: enabled, doesn't support DPO or FUA
Apr 24 20:06:11 detritus kernel: eth1: no IPv6 routers present
Apr 24 20:09:50 detritus kernel: de_put: deferred delete of battery
--snip--




Does anyone have any idea what's causing this?  I smell something in
KDE/hal that induces acpid to do something bad to the battery module,
but I'm not familiar enough with the workings of ACPI to look much
further...

D.