! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-power-manager receives a DeviceAdded signal when removing battery
Status:
RESOLVED: FIXED
Product:
Xfce4-power-manager
Component:
General

Comments

Description Henry Gebhardt 2012-02-27 02:52:51 CET
Weirdly, it appears that xfce4-power-manager receives the following sequence of signals when removing a battery: DeviceRemoved, DeviceAdded, DeviceRemoved. This is in contrast to what "upower --monitor" reports, which only gets a single "removed" event.

I was trying to debug bugs #8424 and #7603, and this is in the way of getting a clearer picture on what happens. It also gives some critical warnings from glib.

Steps to reproduce:
1. Execute "xfce4-power-manager --no-daemon"
2. Remove the battery.
3. The output to stderr (shown below) is not very clear on what happens. However, I inserted some additional printf's (not shown) that clearly show that for the battery just removed the "DeviceAdded" callback function is executed, giving rise to some critical warnings.

$ xfce4-power-manager --no-daemon

(xfce4-power-manager:7885): xfce4-power-manager-WARNING **: Unable to connect to session managet : Failed to connect to the session manager: SESSION_MANAGER environment variable not defined

(xfce4-power-manager:7885): xfce4-power-manager-WARNING **: could not map keysym 1008ffa8 to keycode

** (xfce4-power-manager:7885): DEBUG: Brightness controlled by xrandr, min_level=0 max_level=15

(xfce4-power-manager:7885): xfce4-power-manager-WARNING **: Unable to get property Type on interface  org.freedesktop.UPower.Device : Method "Get" with signature "ss" on interface "org.freedesktop.DBus.Properties" doesn't exist


(xfce4-power-manager:7885): GLib-GObject-CRITICAL **: g_value_get_uint: assertion `G_VALUE_HOLDS_UINT (value)' failed

(xfce4-power-manager:7885): xfce4-power-manager-WARNING **: Unable to monitor unkown power device with object_path : /org/freedesktop/UPower/devices/battery_BAT0

(xfce4-power-manager:7885): xfce4-power-manager-CRITICAL **: xfpm_power_show_adapter_icon: assertion `power->priv->adapter_icon == NULL' failed
Comment 1 Henry Gebhardt 2012-02-27 03:10:09 CET
I should add that while I am mostly using lxpanel, this issue also appears in a pure XFCE session.
Comment 2 Harald Judt 2014-11-18 15:25:27 CET
Please reopen if this is still an issue with >=1.4.1.

Bug #8510

Reported by:
Henry Gebhardt
Reported on: 2012-02-27
Last modified on: 2014-11-18

People

Assignee:
Ali Abdallah
CC List:
1 user

Version

Version:
1.0.10

Attachments

Additional information