Bug 106257 - kpowersave does not notice that cable was plugged
Summary: kpowersave does not notice that cable was plugged
Status: RESOLVED FIXED
: 114017 (view as bug list)
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Kernel (show other bugs)
Version: Beta 2
Hardware: Other All
: P5 - None : Major
Target Milestone: ---
Assignee: Thomas Renninger
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-22 18:41 UTC by Andreas Jaeger
Modified: 2006-01-03 15:00 UTC (History)
3 users (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Jaeger 2005-08-22 18:41:31 UTC
kpowersave reports that my battery is:
"plugged in -- 80 % charged (1:26 remaining hours) -- battery is charging"

But I unplugged the cable more than 10 minutes ago!

powersave -s -b -d -B reports:
Battery: 80 % -1 minutes.
NORMAL
Battery: 79 % 76 minutes
Battery: 79 % 76 minutes
Battery0: 78

$ cat /proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          discharging
present rate:            15028 mW
remaining capacity:      18680 mWh
present voltage:         15414 mV

lshal reports:
udi = '/org/freedesktop/Hal/devices/acpi_BAT0'
  info.udi = '/org/freedesktop/Hal/devices/acpi_BAT0'  (string)
  linux.hotplug_type = 4  (0x4)  (int)
  battery.charge_level.percentage = 78  (0x4e)  (int)
  battery.remaining_time = 4529  (0x11b1)  (int)
  battery.charge_level.rate = 15158  (0x3b36)  (int)
  battery.charge_level.last_full = 24380  (0x5f3c)  (int)
  battery.charge_level.current = 19070  (0x4a7e)  (int)
  battery.voltage.current = 15452  (0x3c5c)  (int)
  battery.reporting.rate = 15158  (0x3b36)  (int)
  battery.reporting.current = 19070  (0x4a7e)  (int)
  battery.rechargeable.is_discharging = true  (bool)
  battery.rechargeable.is_charging = false  (bool)
  battery.is_rechargeable = true  (bool)
  battery.alarm.unit = 'mWh'  (string)
  battery.alarm.design = 1368  (0x558)  (int)
  battery.charge_level.granularity_2 = 1  (0x1)  (int)
  battery.charge_level.granularity_1 = 1  (0x1)  (int)
  battery.charge_level.low = 273  (0x111)  (int)
  battery.charge_level.warning = 1368  (0x558)  (int)
  battery.charge_level.design = 27360  (0x6ae0)  (int)
  battery.voltage.design = 14400  (0x3840)  (int)
  battery.voltage.unit = 'mV'  (string)
  battery.reporting.granularity_2 = 1  (0x1)  (int)
  battery.reporting.granularity_1 = 1  (0x1)  (int)
  battery.reporting.low = 273  (0x111)  (int)
  battery.reporting.warning = 1368  (0x558)  (int)
  battery.reporting.design = 27360  (0x6ae0)  (int)
  battery.reporting.last_full = 24380  (0x5f3c)  (int)
  battery.reporting.unit = 'mWh'  (string)
  battery.technology = 'LION'  (string)
  battery.serial = '526'  (string)
  battery.model = 'IBM-92P0998'  (string)
  battery.vendor = 'SANYO'  (string)
  battery.present = true  (bool)
  info.capabilities = {'battery'} (string list)
  info.category = 'battery'  (string)
  battery.type = 'primary'  (string)
  info.product = 'Battery Bay'  (string)
  info.parent = '/org/freedesktop/Hal/devices/computer'  (string)
  linux.acpi_type = 0  (0x0)  (int)
  linux.acpi_path = '/proc/acpi/battery/BAT0'  (string)
Comment 1 Andreas Jaeger 2005-08-22 18:43:46 UTC
.xsession-errors shows:
filter_function
filter_function::SIGNAL=NameAcquired
filter_function::VALUE=:1.7
filter_function
filter_function::SIGNAL=AcpiEvent
filter_function::VALUE=battery BAT0 00000080 00000001
filter_function
filter_function::SIGNAL=PowersaveEvent
filter_function::VALUE=daemon.scheme.change
filter_function
filter_function::SIGNAL=PowersaveEvent
filter_function::VALUE=acadapter.offline
filter_function
filter_function::SIGNAL=PowersaveEvent
filter_function::VALUE=battery.info
filter_function
filter_function::SIGNAL=AcpiEvent
filter_function::VALUE=battery BAT0 00000080 00000001
filter_function
filter_function::SIGNAL=AcpiEvent
filter_function::VALUE=ac_adapter AC 00000080 00000001
filter_function
filter_function::SIGNAL=PowersaveEvent
filter_function::VALUE=daemon.scheme.change
filter_function
filter_function::SIGNAL=PowersaveEvent
filter_function::VALUE=acadapter.online
filter_function
filter_function::SIGNAL=AcpiEvent
filter_function::VALUE=processor CPU 00000080 00000000
filter_function
filter_function::SIGNAL=PowersaveEvent
filter_function::VALUE=other
filter_function
filter_function::SIGNAL=AcpiEvent
filter_function::VALUE=processor CPU 00000081 00000000
filter_function
filter_function::SIGNAL=PowersaveEvent
filter_function::VALUE=other
filter_function
filter_function::SIGNAL=AcpiEvent
filter_function::VALUE=battery BAT0 00000080 00000001
filter_function
filter_function::SIGNAL=PowersaveEvent
filter_function::VALUE=battery.info
filter_function
filter_function::SIGNAL=AcpiEvent
filter_function::VALUE=battery BAT0 00000080 00000001
filter_function
filter_function::SIGNAL=PowersaveEvent
filter_function::VALUE=battery.info
filter_function
filter_function::SIGNAL=AcpiEvent
filter_function::VALUE=battery BAT0 00000080 00000001
filter_function
filter_function::SIGNAL=PowersaveEvent
filter_function::VALUE=battery.info

So, it seems that it never received the info about the unplugging??? 

I booted without battery, plugged it in later, and then unplugged and it's still
unplugged.
Comment 2 Danny Al-Gaaf 2005-08-22 19:53:26 UTC
* What say the Icon? Is the icon correct or is only the tooltip wrong? 
* What say powersave -a?
* Was acpid running?
* what say lshal | grep ac_adapter.present ?

Tell me tomorrow if you are in house and we can take a short look at this 
problem.

 
Comment 3 Danny Al-Gaaf 2005-08-22 19:57:38 UTC
@holger: the difference between output of powersave -B and powersave -b looks 
like a little bug or different code paths for both. I can this problem reproduce 
here on two machines
Comment 4 Danny Al-Gaaf 2005-08-22 19:59:31 UTC
@holger: why give powersave -B if AC is online also the AC status but not if AC 
is offline? Should be always the same content of output.
Comment 5 Andreas Jaeger 2005-08-23 06:51:56 UTC
I'm in house and you can have a look at my system.

 ac_adapter.present says false.

acpid is running.

The icon is wrong as well.

Ok, I just resumed the system and now it's running on power - but showing
running on battery :-(
Comment 6 Danny Al-Gaaf 2005-08-23 08:03:43 UTC
I checked this. Looks like powersave sends no events to kpowersave. I also could 
not see any messages in dbus-monitor on the machine. (also hal,powersave,
kpowersave,acpid restart does not help).

hmacht: please take a look at aj's machine
Comment 7 Stefan Behlert 2005-08-23 08:05:35 UTC
What's with 
> filter_function::SIGNAL=PowersaveEvent 
> filter_function::VALUE=acadapter.offline 
from comment#1 ? Isn't that the 'unplut'-event? 
Comment 8 Andreas Jaeger 2005-08-23 08:53:42 UTC
one event seems to come - but then it's stuck.  There are no further
acadapter events coming at all...
Comment 9 Holger Macht 2005-08-23 15:10:25 UTC
So while debugging I found out that it is _no_ powersave problem. It seems to
work when ec_burst=0 as kernel parameter is given. With ec_burst enabled, the
acpi subsystem seems to freeze after some seconds/minutes, sometimes longer
sometimes shorter. Then no events are emitted through /proc/acpi/events anymore.
I also tried on another thinkpad, and there it works. It seems that it is only
not working with this x40. So it must be a kernel problem IMO.

Comment 10 Holger Macht 2005-08-26 09:55:19 UTC
So everything works fine when ec_burst is disabled?
Comment 11 Andreas Jaeger 2005-08-29 12:04:55 UTC
Seems to work now.
Comment 12 Holger Macht 2005-09-06 08:14:38 UTC
So ec_burst is not my buisiness... assigning to trenn.
Comment 13 Thomas Renninger 2005-09-06 10:47:06 UTC
I am planning a big ec_burst debug day tommorrow and also try to solve #61106.
Can I have the machine for a day then?
Comment 14 Andreas Jaeger 2005-09-06 11:25:13 UTC
You can have it for two hours - just ask me.
Comment 15 Pavel Machek 2005-09-21 20:33:27 UTC
*** Bug 114017 has been marked as a duplicate of this bug. ***
Comment 16 Thomas Renninger 2006-01-03 12:12:03 UTC
Is this still valid for 10.0 ?
Comment 17 Andreas Jaeger 2006-01-03 15:00:38 UTC
I'm running 10.1 alpha now and it's working fine there.

Let's close this...