After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 497442 - g-p-m shows two batteries when only one exists.
g-p-m shows two batteries when only one exists.
Status: RESOLVED NOTGNOME
Product: gnome-power-manager
Classification: Deprecated
Component: applets
2.20.x
Other All
: Normal normal
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2007-11-16 18:22 UTC by Magnus Boman
Modified: 2009-03-04 14:46 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
g-p-m debug output (15.89 KB, text/plain)
2007-11-16 18:23 UTC, Magnus Boman
Details
lshal output (158.87 KB, text/plain)
2007-11-19 17:42 UTC, Magnus Boman
Details

Description Magnus Boman 2007-11-16 18:22:00 UTC
Please describe the problem:
When clicking on the g-p-m applet, it tells me that I have two batteries, when in fact, I only have one.
They don't always show the same charge status either.

This is on an IBM ThinkPad T43P

Will attach debug output from g-p-m

Steps to reproduce:
1. Click on g-p-m applet
2. 
3. 


Actual results:


Expected results:


Does this happen every time?
Yes

Other information:
Comment 1 Magnus Boman 2007-11-16 18:23:37 UTC
Created attachment 99221 [details]
g-p-m debug output
Comment 2 Richard Hughes 2007-11-19 17:30:23 UTC
Are you running a reall new kernel? Could you attach the output of lshal please. Thanks.
Comment 3 Magnus Boman 2007-11-19 17:42:25 UTC
Created attachment 99341 [details]
lshal output
Comment 4 Magnus Boman 2007-11-19 17:43:24 UTC
I'm on kernel 2.6.24-rc2-git4
Comment 5 Richard Hughes 2007-11-19 17:57:42 UTC
That's new :-)

The kernel is reporting two battery devices, one from /proc/acpi/battery/X (old interface) and one from /sys/class/power_supply (new interface):

udi = '/org/freedesktop/Hal/devices/computer_power_supply_0'
  battery.charge_level.current = 65260  (0xfeec)  (int)
  battery.charge_level.last_full = 65260  (0xfeec)  (int)
  battery.charge_level.percentage = 100  (0x64)  (int)
  battery.charge_level.rate = 0  (0x0)  (int)
  battery.current = 0  (0x0)  (int)
  battery.present = true  (bool)
  battery.rechargeable.is_charging = false  (bool)
  battery.rechargeable.is_discharging = false  (bool)
  battery.reporting.current = 65260  (0xfeec)  (int)
  battery.reporting.design = 77760  (0x12fc0)  (int)
  battery.reporting.last_full = 65260  (0xfeec)  (int)
  battery.reporting.technology = 'Li-ion'  (string)
  battery.reporting.unit = 'mWh'  (string)
  battery.technology = 'lithium-ion'  (string)
  battery.type = 'primary'  (string)
  battery.vendor = 'SANYO'  (string)
  battery.voltage.current = 12445  (0x309d)  (int)
  info.capabilities = {'battery'} (string list)
  info.category = 'battery'  (string)
  info.parent = '/org/freedesktop/Hal/devices/computer'  (string)
  info.product = 'Li-ion'  (string)
  info.udi = '/org/freedesktop/Hal/devices/computer_power_supply_0'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'power_supply'  (string)
  linux.sysfs_path = '/sys/devices/LNXSYSTM:00/device:00/PNP0A08:00/device:01/PNP0C09:00/PNP0C0A:00/power_supply/BAT0'  (string)

udi = '/org/freedesktop/Hal/devices/acpi_BAT0'
  battery.alarm.design = 3263  (0xcbf)  (int)
  battery.alarm.unit = 'mWh'  (string)
  battery.charge_level.capacity_state = 'ok'  (string)
  battery.charge_level.current = 65260  (0xfeec)  (int)
  battery.charge_level.design = 77760  (0x12fc0)  (int)
  battery.charge_level.granularity_1 = 1  (0x1)  (int)
  battery.charge_level.granularity_2 = 1  (0x1)  (int)
  battery.charge_level.last_full = 65260  (0xfeec)  (int)
  battery.charge_level.low = 200  (0xc8)  (int)
  battery.charge_level.percentage = 100  (0x64)  (int)
  battery.charge_level.rate = 0  (0x0)  (int)
  battery.charge_level.unit = 'mWh'  (string)
  battery.charge_level.warning = 3263  (0xcbf)  (int)
  battery.is_rechargeable = true  (bool)
  battery.model = 'IBM-92P1077'  (string)
  battery.present = true  (bool)
  battery.rechargeable.is_charging = false  (bool)
  battery.rechargeable.is_discharging = false  (bool)
  battery.reporting.current = 65260  (0xfeec)  (int)
  battery.reporting.design = 77760  (0x12fc0)  (int)
  battery.reporting.granularity_1 = 1  (0x1)  (int)
  battery.reporting.granularity_2 = 1  (0x1)  (int)
  battery.reporting.last_full = 65260  (0xfeec)  (int)
  battery.reporting.low = 200  (0xc8)  (int)
  battery.reporting.rate = 0  (0x0)  (int)
  battery.reporting.technology = 'LION'  (string)
  battery.reporting.unit = 'mWh'  (string)
  battery.reporting.warning = 3263  (0xcbf)  (int)
  battery.serial = '113'  (string)
  battery.technology = 'lithium-ion'  (string)
  battery.type = 'primary'  (string)
  battery.vendor = 'SANYO'  (string)
  battery.voltage.current = 12445  (0x309d)  (int)
  battery.voltage.design = 10800  (0x2a30)  (int)
  battery.voltage.unit = 'mV'  (string)
  info.capabilities = {'battery'} (string list)
  info.category = 'battery'  (string)
  info.parent = '/org/freedesktop/Hal/devices/computer'  (string)
  info.product = 'Battery Bay'  (string)
  info.udi = '/org/freedesktop/Hal/devices/acpi_BAT0'  (string)
  linux.acpi_path = '/proc/acpi/battery/BAT0'  (string)
  linux.acpi_type = 0  (0x0)  (int)
  linux.hotplug_type = 4  (0x4)  (int)

Solution:

If you are defining CONFIG_POWER_SUPPLY in your .config then please unselect CONFIG_ACPI_BATTERY, or vice versa.

Does that fix things?
Comment 6 Magnus Boman 2007-11-19 18:39:41 UTC
Unloading the power_supply module reduces it to one battery. I'll talk to the openSUSE kernel devs and see what they want to do about this. Leaving this in NEEDINFO meanwhile.
Comment 7 Cyril Jaquier 2007-12-14 21:47:18 UTC
Hi all,

Same problem here since I upgraded to 2.6.24-rc5 yesterday on a Thinkpad T61. I removed CONFIG_ACPI_PROCFS_POWER and I now have only one battery again. Sadly, battery information is rather poor now. But I can live with this ;) Thanks
Comment 8 Cyril Jaquier 2007-12-14 22:30:12 UTC
Mmmhhh... It seems that no power information is available while running on battery. This is lshal output while running on battery:

udi = '/org/freedesktop/Hal/devices/computer_power_supply_0'
  battery.charge_level.current = 50570  (0xc58a)  (int)
  battery.charge_level.last_full = 68760  (0x10c98)  (int)
  battery.charge_level.percentage = 73  (0x49)  (int)
  battery.charge_level.rate = 0  (0x0)  (int)
  battery.current = 34961  (0x8891)  (int)
  battery.present = true  (bool)
  battery.rechargeable.is_charging = false  (bool)
  battery.rechargeable.is_discharging = true  (bool)
  battery.remaining_time = 9364  (0x2494)  (int)
  battery.reporting.current = 50570  (0xc58a)  (int)
  battery.reporting.design = 65520  (0xfff0)  (int)
  battery.reporting.last_full = 68760  (0x10c98)  (int)
  battery.reporting.technology = 'Li-ion'  (string)
  battery.reporting.unit = 'mWh'  (string)
  battery.technology = 'lithium-ion'  (string)
  battery.type = 'primary'  (string)
  battery.vendor = 'SANYO'  (string)
  battery.voltage.current = 15566  (0x3cce)  (int)
  info.capabilities = {'battery'} (string list)
  info.category = 'battery'  (string)
  info.parent = '/org/freedesktop/Hal/devices/computer'  (string)
  info.product = 'Li-ion'  (string)
  info.udi = '/org/freedesktop/Hal/devices/computer_power_supply_0'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'power_supply'  (string)
  linux.sysfs_path = '/sys/devices/LNXSYSTM:00/device:00/PNP0A08:00/device:01/PNP0C09:00/PNP0C0A:00/power_supply/BAT0'  (string)

Cheers,
Comment 9 Magnus Boman 2008-02-12 10:03:18 UTC
CONFIG_POWER_SUPPLY is no longer used. I'm happy to close this bug.
Comment 10 Cyril Jaquier 2008-02-12 18:51:59 UTC
(In reply to comment #9)
> CONFIG_POWER_SUPPLY is no longer used. I'm happy to close this bug.
> 

What does this mean exactly? Do you have disable CONFIG_POWER_SUPPLY in your kernel?