Guidance-power-manager stopped working after upgrade to Gutsy

Bug #220324 reported by RickKnight
10
Affects Status Importance Assigned to Milestone
dbus (Ubuntu)
Invalid
Undecided
Unassigned
hal (Ubuntu)
Expired
Undecided
Unassigned
kde-guidance (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Guidance-power-manager worked well under Dapper and Feisty on this notebook PC. After upgrade from Feisty to Gutsy, the power manager/battery monitor icon is not available. When I manually start guidance-power-manager I get several error messages

Output of $ guidance-power-manager

guidance-power-manager &
[2] 9208
[1] Done guidance-power-manager
rick@rick-laptop:~$ No battery found.
No AC adapter found - assume that we are on batteries.
Warning: While setting SystemPowerManagement to True : org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported: No powersave method found
No AC adapter found - assume that we are on batteries.
No AC adapter found - assume that we are on batteries.
Traceback (most recent call last):
  File "/usr/share/python-support/kde-guidance-powermanager/guidance-power-manager.py", line 1120, in <module>
    mainWindow = PowermanagerApp(None, "main window")
  File "/usr/share/python-support/kde-guidance-powermanager/guidance-power-manager.py", line 1064, in __init__
    self.pmwidget.prepare()
  File "/usr/share/python-support/kde-guidance-powermanager/guidance-power-manager.py", line 101, in prepare
    self._initLid()
  File "/usr/share/python-support/kde-guidance-powermanager/guidance-power-manager.py", line 140, in _initLid
    self.powerHasBeenUnplugged()
  File "/usr/share/python-support/kde-guidance-powermanager/guidance-power-manager.py", line 927, in powerHasBeenUnplugged
    msg = self.checkCpuFreq()
  File "/usr/share/python-support/kde-guidance-powermanager/guidance-power-manager.py", line 902, in checkCpuFreq
    if not policy in self.cb_freq:
AttributeError: cb_freq
Error in sys.excepthook:
Traceback (most recent call last):
  File "/var/lib/python-support/python2.5/apport_python_hook.py", line 42, in apport_excepthook
    binary = os.path.realpath(os.path.join(os.getcwdu(), sys.argv[0]))
IndexError: list index out of range

Original exception was:
Traceback (most recent call last):
  File "/usr/share/python-support/kde-guidance-powermanager/guidance-power-manager.py", line 1120, in <module>
    mainWindow = PowermanagerApp(None, "main window")
  File "/usr/share/python-support/kde-guidance-powermanager/guidance-power-manager.py", line 1064, in __init__
    self.pmwidget.prepare()
  File "/usr/share/python-support/kde-guidance-powermanager/guidance-power-manager.py", line 101, in prepare
    self._initLid()
  File "/usr/share/python-support/kde-guidance-powermanager/guidance-power-manager.py", line 140, in _initLid
    self.powerHasBeenUnplugged()
  File "/usr/share/python-support/kde-guidance-powermanager/guidance-power-manager.py", line 927, in powerHasBeenUnplugged
    msg = self.checkCpuFreq()
  File "/usr/share/python-support/kde-guidance-powermanager/guidance-power-manager.py", line 902, in checkCpuFreq
    if not policy in self.cb_freq:
AttributeError: cb_freq

Output of $ dmesg attached

Thanks,
Rick Knight

Revision history for this message
RickKnight (rick-knight) wrote :
Revision history for this message
Guillaume Martres (smarter) wrote :

Hi,
Do you have the same problem with gnome-power-manager? Could you please try with Hardy too?

Revision history for this message
RickKnight (rick-knight) wrote :

I was able to run gnome-power-manager 1 time. It reported my cordless mouse battery was at 14%. After I replaced the batteries in the mouse the gnome-power-manager went away. It did not give my laptop's battery condition or indicate whether the unit was plugged in or not.

I don't yet have Hardy installed. I'll have to download the RC first.

Revision history for this message
RickKnight (rick-knight) wrote :

It seems I need acpid running, but when I try to install acpid I get powersaved errors...

rick@rick-laptop:/etc/init.d$ sudo apt-get install acpid
Reading package lists... Done
Building dependency tree
Reading state information... Done
acpid is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
Setting up powersaved (0.14.0-7ubuntu1) ...
 * Starting power management daemon powersaved [fail]
##########################################################
# ACPI system but acpid not running. #
# Please install acpid package, then restart powersaved! #
##########################################################
invoke-rc.d: initscript powersaved, action "start" failed.
/var/lib/dpkg/info/powersaved.postinst: 11: check_return_code: not found
dpkg: error processing powersaved (--configure):
 subprocess post-installation script returned error exit status 127
Errors were encountered while processing:
 powersaved
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
RickKnight (rick-knight) wrote :

ACPID was set to Not start at boot. Changed that and now power management starts, but it still does not give any information about the notebook battery. It assumes the battery is not present. The attached screen capture shows the Power Manager window with all "Battery Powered" functions disabled.

Revision history for this message
RickKnight (rick-knight) wrote :

After removing powersaved and restarting my notebook, guidance-power-manager is working again, however I am still not seeing my battery status. The problem now seems to be that acpid is doing it's job and reporting status for 2 batteries...

rick@rick-laptop:~$ grep -r "" /proc/acpi/battery/*
/proc/acpi/battery/C170/alarm:present: no
/proc/acpi/battery/C170/state:present: no
/proc/acpi/battery/C170/info:present: no
/proc/acpi/battery/C171/alarm:alarm: unsupported
/proc/acpi/battery/C171/state:present: yes
/proc/acpi/battery/C171/state:capacity state: ok
/proc/acpi/battery/C171/state:charging state: charged
/proc/acpi/battery/C171/state:present rate: 0 mA
/proc/acpi/battery/C171/state:remaining capacity: 3764 mAh
/proc/acpi/battery/C171/state:present voltage: 16715 mV
/proc/acpi/battery/C171/info:present: yes
/proc/acpi/battery/C171/info:design capacity: 3764 mAh
/proc/acpi/battery/C171/info:last full capacity: 3764 mAh
/proc/acpi/battery/C171/info:battery technology: rechargeable
/proc/acpi/battery/C171/info:design voltage: 14400 mV
/proc/acpi/battery/C171/info:design capacity warning: 189 mAh
/proc/acpi/battery/C171/info:design capacity low: 38 mAh
/proc/acpi/battery/C171/info:capacity granularity 1: 100 mAh
/proc/acpi/battery/C171/info:capacity granularity 2: 100 mAh
/proc/acpi/battery/C171/info:model number: Primary
/proc/acpi/battery/C171/info:serial number: 16425 2005/05/26
/proc/acpi/battery/C171/info:battery type: LIon
/proc/acpi/battery/C171/info:OEM info: Hewlett-Packard

Notice this at the top ...
/proc/acpi/battery/C170/alarm:present: no
/proc/acpi/battery/C170/state:present: no
/proc/acpi/battery/C170/info:present: no

/proc/acpi/battery/C170 is for an optional external battery (that I don't have). /proc/acpi/battery/C171 is for the standard internal battery. I believe guidance-power-manage is showing the status for C170 and not for C171. Prior to upgrading from Feisty to Gutsy the power-manager worked correctly and showed status for the internal battery and showed the external battery as not present. Something was changed during the upgrade that now makes guidance-power-manage not show status for the correct battery. Is this a bug or a configuration issue?

How can this be adjusted? If it can't, how can I make guidance-power-manage show both C171 and C170.

Rick Knight

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

Hi Rick

Please check if the command "hal-device `hal-find-by-capability --capability battery`" shows both your batteries. If it does, just attach the output. If not, please provide the output of the lshal command.

Revision history for this message
RickKnight (rick-knight) wrote :

Here's the output of "hal-device `hal-find-by-capability --capability battery`"...

udi = '/org/freedesktop/Hal/devices/usb_device_46d_c501_noserial'
  info.capabilities = { 'battery' } (string list)
  battery.command_interface = 'csr' (string)
  linux.subsystem = 'usb' (string)
  info.product = 'Mouse Receiver' (string)
  usb_device.device_revision_bcd = 2320 (0x910) (int)
  battery.csr.has_sms = false (bool)
  info.category = 'battery' (string)
  usb_device.product = 'USB Receiver' (string)
  battery.csr.is_dual = false (bool)
  usb_device.product_id = 50433 (0xc501) (int)
  usb_device.speed = 1.5 (double)
  usb_device.vendor = 'Logitech' (string)
  usb_device.can_wake_up = true (bool)
  usb_device.configuration_value = 1 (0x1) (int)
  usb_device.linux.device_number = 3 (0x3) (int)
  battery.charge_level.design = 7 (0x7) (int)
  battery.charge_level.current = 7 (0x7) (int)
  info.linux.driver = 'usb' (string)
  battery.is_rechargeable = true (bool)
  usb_device.device_class = 0 (0x0) (int)
  info.addons = { 'hald-addon-usb-csr' } (string list)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_0_0_0000_00_1d_1' (string)
  usb_device.bus_number = 2 (0x2) (int)
  battery.csr.has_res = false (bool)
  usb_device.device_protocol = 0 (0x0) (int)
  usb_device.is_self_powered = false (bool)
  info.subsystem = 'usb_device' (string)
  info.vendor = 'Logitech' (string)
  usb_device.version = 1.1 (double)
  usb_device.num_interfaces = 1 (0x1) (int)
  usb_device.vendor_id = 1133 (0x46d) (int)
  usb_device.speed_bcd = 336 (0x150) (int)
  usb_device.version_bcd = 272 (0x110) (int)
  battery.present = true (bool)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_46d_c501_noserial' (string)
  usb_device.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-1' (string)
  usb_device.num_configurations = 1 (0x1) (int)
  info.bus = 'usb_device' (string)
  battery.type = 'mouse' (string)
  linux.device_file = '/dev/2-1' (string)
  battery.charge_level.last_full = 7 (0x7) (int)
  battery.charge_level.percentage = 100 (0x64) (int)
  usb_device.num_ports = 0 (0x0) (int)
  usb_device.max_power = 50 (0x32) (int)
  linux.hotplug_type = 2 (0x2) (int)
  usb_device.device_subclass = 0 (0x0) (int)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-1' (string)

If I'm reading this right, this command is showing the 2 AA batteries in my cordless mouse!

I am also attaching the output of lshal

Rick

Revision history for this message
RickKnight (rick-knight) wrote :

I've run "hal-device `hal-find-by-capability --capability battery`" again, this time with my wireless mouse disconnected. Output attached.

Rick

Revision history for this message
RickKnight (rick-knight) wrote :

Here is the output of "hal-device `hal-find-by-capability --capability battery`" after restarting hal "sudo /etc/init.d/hal restart".

rick@rick-laptop:/etc/init.d$ hal-device `hal-find-by-capability --capability battery`
udi = '/org/freedesktop/Hal/devices/acpi_C171'
  battery.serial = '16425' (string)
  info.capabilities = { 'battery' } (string list)
  battery.charge_level.warning = 2721 (0xaa1) (int)
  info.category = 'battery' (string)
  info.product = 'Battery Bay' (string)
  battery.technology = 'lithium-ion' (string)
  battery.reporting.warning = 189 (0xbd) (int)
  battery.rechargeable.is_discharging = false (bool)
  battery.model = 'Primary' (string)
  battery.charge_level.granularity_1 = 1440 (0x5a0) (int)
  battery.charge_level.granularity_2 = 1440 (0x5a0) (int)
  linux.acpi_path = '/proc/acpi/battery/C171' (string)
  battery.charge_level.design = 54201 (0xd3b9) (int)
  battery.charge_level.low = 547 (0x223) (int)
  battery.reporting.last_full = 3764 (0xeb4) (int)
  battery.reporting.technology = 'LIon' (string)
  battery.charge_level.current = 54201 (0xd3b9) (int)
  battery.reporting.granularity_1 = 100 (0x64) (int)
  battery.is_rechargeable = true (bool)
  battery.reporting.current = 3764 (0xeb4) (int)
  battery.reporting.granularity_2 = 100 (0x64) (int)
  battery.voltage.unit = 'mV' (string)
  battery.charge_level.capacity_state = 'ok' (string)
  info.parent = '/org/freedesktop/Hal/devices/computer' (string)
  battery.rechargeable.is_charging = false (bool)
  battery.reporting.rate = 0 (0x0) (int)
  battery.charge_level.rate = 0 (0x0) (int)
  battery.reporting.design = 3764 (0xeb4) (int)
  battery.present = true (bool)
  info.udi = '/org/freedesktop/Hal/devices/acpi_C171' (string)
  linux.acpi_type = 0 (0x0) (int)
  battery.voltage.design = 14400 (0x3840) (int)
  battery.reporting.low = 38 (0x26) (int)
  battery.type = 'primary' (string)
  battery.reporting.unit = 'mAh' (string)
  battery.voltage.current = 16713 (0x4149) (int)
  battery.charge_level.last_full = 54201 (0xd3b9) (int)
  battery.charge_level.percentage = 100 (0x64) (int)
  battery.vendor = 'Hewlett-Packard' (string)
  linux.hotplug_type = 4 (0x4) (int)
  battery.charge_level.unit = 'mWh' (string)

Revision history for this message
RickKnight (rick-knight) wrote :

I have found that if kill guidance-power-manager, restart hal and then start guidance-power-manager everything works. So, is this then a hal error? It seems it may be related to or the same as bug 145611.

Rick Knight

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

@Rick
The output indicates that it is a HAL-bug. I don't know if it is related to the bug you mention; for now i'm just marking this as a hal-bug.

Changed in kde-guidance:
status: New → Invalid
Revision history for this message
Jeremy Wilkins (wjeremy) wrote :

I am having a similar problem. My battery will report for a while and suddenly it says my battery is disconnected. It is still connected though. Sometimes if I shutdown and restart guidance-power-manager it shows up again and sometimes it doesn't run again and running it from the terminal crashes with:
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoServer: Failed to connect to socket /var/run/dbus/system_bus_socket: Connection refused

Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 220324] Re: Guidance-power-manager stopped working after upgrade to Gutsy

These are symptoms of a dbus problem. I recommend you report that against
dbus.

...... Original Message .......
On Wed, 07 May 2008 23:14:21 -0000 DaFlame <email address hidden> wrote:
>I am having a similar problem. My battery will report for a while and
suddenly it says my battery is disconnected. It is still connected though.
 Sometimes if I shutdown and restart guidance-power-manager it shows up
again and sometimes it doesn't run again and running it from the terminal
crashes with:
>dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoServer: Failed
to connect to socket /var/run/dbus/system_bus_socket: Connection refused
>
>--
>Guidance-power-manager stopped working after upgrade to Gutsy
>https://bugs.launchpad.net/bugs/220324
>You received this bug notification because you are subscribed to kde-
>guidance in ubuntu.
>

Revision history for this message
Jeremy Wilkins (wjeremy) wrote :

Where should I go to report against dbus properly?

Revision history for this message
Scott Kitterman (kitterman) wrote :

Done.

Revision history for this message
Jeremy Wilkins (wjeremy) wrote :

where do I go to track the progress of the bug?

Revision history for this message
Scott Kitterman (kitterman) wrote :

Right here. In Ubuntu a single bug can affect multiple packages.

Revision history for this message
Randall Reese (rreese6) wrote :

I also have the same issue with Gutsy. To get it to work, I quit the applet then restart hal, 'sudo /etc/init.d/hal restart', then I need run 'guidance-power-manager'.

Then I can see the battery (actually see two, but the second one is bogus and I am not worried about that).

I was wondering if hal is starting too soon in the boot up sequence? WHy would it not fuction from boot up.

After boot up the command, ' hal-find-by-capability --capability "battery"' showed nothing, but it shows this after I restart hal and gmp.

/org/freedesktop/Hal/devices/acpi_BAT0
/org/freedesktop/Hal/devices/acpi_BAT1

I know I could write a script to restart hal and then gpm after boot up, but I am worried that there may be other issues affected by this than I am aware of.
such as overheating or not charing the battery correctly. I doubt it, but I just don't know.

BTW I am running Kubuntu 7.10 Gutsy on a Dell Latitude D800, Pent-M 600-2000 Mhz, with 1 Gb of ram. A great laptop for Linux IMHO.

Thanks for any help..

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

No evidence that this a D-Bus problem

Changed in dbus (Ubuntu):
status: New → Invalid
Revision history for this message
Thomas Hotz (thotz-deactivatedaccount) wrote :

Is this still an issue for you? What Ubuntu version do you use? Thank you for telling us!

Changed in hal (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for hal (Ubuntu) because there has been no activity for 60 days.]

Changed in hal (Ubuntu):
status: Incomplete → Expired
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.