Ok, I'm reporting a formal bug. I do have permissions to suspend (they are listed in pkaction) yet xfpm says I can't, and won't let me chose it. Before xfpm noticed that and changed my actions for SuspendButton/LidClose/PowerButton, I did manage to suspend the laptop. gnome-power-manager is able to suspend to, so I guess there's a problem when contacting consolekit about that. Feel free to ask more information if needed.
Just to add my 2 cents: same here on both Debian unstable and Xubuntu lucid (consolekit 0.4.1, xfpm 0.9.98).
Can you please start xfpm with xfce4-power-manager --debug and attach the full output here.
(In reply to comment #2) > Can you please start xfpm with xfce4-power-manager --debug and attach the full > output here. Here it is: corsac@hidalgo: xfce4-power-manager --debug TRACE[xfpm-main.c:205] xfpm_start(): Starting the power manager TRACE[xfpm-xfconf.c:154] xfpm_xfconf_load(): Using default configuration for show-brightness-popup TRACE[xfpm-xfconf.c:154] xfpm_xfconf_load(): Using default configuration for spin-down-on-ac TRACE[xfpm-xfconf.c:154] xfpm_xfconf_load(): Using default configuration for spin-down-on-ac-timeout TRACE[xfpm-xfconf.c:154] xfpm_xfconf_load(): Using default configuration for spin-down-on-battery-timeout TRACE[xfpm-power.c:949] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/line_power_AC TRACE[xfpm-power.c:949] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/battery_BAT0 TRACE[xfpm-power.c:906] xfpm_power_add_device(): Battery device detected at : /org/freedesktop/UPower/devices/battery_BAT0: ((XfpmDeviceType) XFPM_DEVICE_TYPE_BATTERY) TRACE[xfpm-battery.c:135] xfpm_battery_refresh_visible(): visible=TRUE: ((XfpmShowIcon) SHOW_ICON_ALWAYS) TRACE[xfpm-battery.c:165] xfpm_battery_refresh_icon(): Battery state 4 TRACE[xfpm-power.c:1048] xfpm_power_refresh_adaptor_visible(): Tray icon configuration: : ((XfpmShowIcon) SHOW_ICON_ALWAYS) TRACE[xfpm-power.c:1013] xfpm_power_hide_adapter_icon(): Hide adaptor icon TRACE[xfpm-polkit.c:273] xfpm_polkit_init_data(): Using ConsoleKit session Polkit subject TRACE[xfpm-polkit.c:407] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.upower.suspend is authorized=FALSE TRACE[xfpm-polkit.c:407] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.upower.hibernate is authorized=FALSE TRACE[xfpm-power.c:1048] xfpm_power_refresh_adaptor_visible(): Tray icon configuration: : ((XfpmShowIcon) SHOW_ICON_ALWAYS) TRACE[xfpm-power.c:1013] xfpm_power_hide_adapter_icon(): Hide adaptor icon TRACE[xfpm-button.c:187] xfpm_button_xevent_key(): Grabbed key 124 : ((XfpmButtonKey) BUTTON_POWER_OFF) (xfce4-power-manager:21964): xfce4-power-manager-WARNING **: could not map keysym 1008ffa8 to keycode TRACE[xfpm-button.c:187] xfpm_button_xevent_key(): Grabbed key 213 : ((XfpmButtonKey) BUTTON_HIBERNATE) TRACE[xfpm-button.c:187] xfpm_button_xevent_key(): Grabbed key 150 : ((XfpmButtonKey) BUTTON_SLEEP) TRACE[xfpm-button.c:187] xfpm_button_xevent_key(): Grabbed key 233 : ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP) TRACE[xfpm-button.c:187] xfpm_button_xevent_key(): Grabbed key 232 : ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_DOWN) TRACE[xfpm-polkit.c:407] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.udisks.drive-set-spindown is authorized=FALSE TRACE[xfpm-disks.c:170] xfpm_disks_get_is_auth_to_spin(): Is auth to spin down disks : 0 ** (xfce4-power-manager:21964): DEBUG: Brightness controlled by xrandr, min_level=0 max_level=15 TRACE[xfpm-backlight.c:319] xfpm_backlight_brightness_on_ac_settings_changed(): Alarm on ac timeout changed 9 TRACE[xfpm-backlight.c:340] xfpm_backlight_brightness_on_battery_settings_changed(): Alarm on battery timeout changed 9 TRACE[xfpm-dpms.c:74] xfpm_dpms_set_timeouts(): Settings dpms: standby=0 suspend=0 off=900
in xfpm-polkit.c, can you comment out line 275 (//subject_created = TRUE;) i want to force it to not use consolekit subject. Attach also the output here please.
Here we go: corsac@hidalgo: src/xfce4-power-manager --debug TRACE[xfpm-main.c:205] xfpm_start(): Starting the power manager (xfce4-power-manager:28496): libxfce4ui-WARNING **: Unable to open "/usr/local/etc/xdg/autostart/xfce4-power-manager.desktop" TRACE[xfpm-xfconf.c:154] xfpm_xfconf_load(): Using default configuration for show-brightness-popup TRACE[xfpm-xfconf.c:154] xfpm_xfconf_load(): Using default configuration for spin-down-on-ac TRACE[xfpm-xfconf.c:154] xfpm_xfconf_load(): Using default configuration for spin-down-on-ac-timeout TRACE[xfpm-xfconf.c:154] xfpm_xfconf_load(): Using default configuration for spin-down-on-battery-timeout TRACE[xfpm-power.c:949] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/line_power_AC TRACE[xfpm-power.c:949] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/battery_BAT0 TRACE[xfpm-power.c:906] xfpm_power_add_device(): Battery device detected at : /org/freedesktop/UPower/devices/battery_BAT0: ((XfpmDeviceType) XFPM_DEVICE_TYPE_BATTERY) TRACE[xfpm-battery.c:135] xfpm_battery_refresh_visible(): visible=TRUE: ((XfpmShowIcon) SHOW_ICON_ALWAYS) TRACE[xfpm-battery.c:165] xfpm_battery_refresh_icon(): Battery state 4 TRACE[xfpm-power.c:1048] xfpm_power_refresh_adaptor_visible(): Tray icon configuration: : ((XfpmShowIcon) SHOW_ICON_ALWAYS) TRACE[xfpm-power.c:1013] xfpm_power_hide_adapter_icon(): Hide adaptor icon TRACE[xfpm-polkit.c:273] xfpm_polkit_init_data(): Using ConsoleKit session Polkit subject TRACE[xfpm-polkit.c:320] xfpm_polkit_init_data(): Using unix session polkit subject TRACE[xfpm-polkit.c:407] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.upower.suspend is authorized=TRUE TRACE[xfpm-polkit.c:407] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.upower.hibernate is authorized=TRUE TRACE[xfpm-power.c:1048] xfpm_power_refresh_adaptor_visible(): Tray icon configuration: : ((XfpmShowIcon) SHOW_ICON_ALWAYS) TRACE[xfpm-power.c:1013] xfpm_power_hide_adapter_icon(): Hide adaptor icon TRACE[xfpm-button.c:187] xfpm_button_xevent_key(): Grabbed key 124 : ((XfpmButtonKey) BUTTON_POWER_OFF) (xfce4-power-manager:28496): xfce4-power-manager-WARNING **: could not map keysym 1008ffa8 to keycode TRACE[xfpm-button.c:187] xfpm_button_xevent_key(): Grabbed key 213 : ((XfpmButtonKey) BUTTON_HIBERNATE) TRACE[xfpm-button.c:187] xfpm_button_xevent_key(): Grabbed key 150 : ((XfpmButtonKey) BUTTON_SLEEP) TRACE[xfpm-button.c:187] xfpm_button_xevent_key(): Grabbed key 233 : ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP) TRACE[xfpm-button.c:187] xfpm_button_xevent_key(): Grabbed key 232 : ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_DOWN) TRACE[xfpm-polkit.c:407] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.udisks.drive-set-spindown is authorized=TRUE TRACE[xfpm-disks.c:170] xfpm_disks_get_is_auth_to_spin(): Is auth to spin down disks : 1 TRACE[xfpm-disks.c:147] xfpm_disks_set_spin_timeouts(): On Battery=0 spin_down_enabled=0 timeout=800 TRACE[xfpm-manager.c:403] xfpm_manager_set_idle_alarm_on_ac(): setting inactivity sleep timeout on ac to never TRACE[xfpm-manager.c:429] xfpm_manager_set_idle_alarm_on_battery(): setting inactivity sleep timeout on battery to never ** (xfce4-power-manager:28496): DEBUG: Brightness controlled by xrandr, min_level=0 max_level=15 TRACE[xfpm-backlight.c:319] xfpm_backlight_brightness_on_ac_settings_changed(): Alarm on ac timeout changed 9 TRACE[xfpm-backlight.c:340] xfpm_backlight_brightness_on_battery_settings_changed(): Alarm on battery timeout changed 9
I'm confused, can you print the content of XDG_SESSION_COOKIE. Which version of the session are you running ? do you start Xfce from gdm ?
(In reply to comment #6) > I'm confused, can you print the content of XDG_SESSION_COOKIE. echo $XDG_SESSION_COOKIE 46b1bf41f5a9c90cab6bf7004720fe1b-1274610848.840050-2089536099 > > Which version of the session are you running ? do you start Xfce from gdm ? ii xfce4-session 4.6.2-1 Xfce4 Session Manager and yes Xfce started from gdm
I don't really understand the problem, i'using xfce session from git (it does set XDG_SESSION_COOKIE) and everything works fine, the XDG_SESSION_COOKIE that you have is coming from the session opened by gdm, then why using this is a polkit subject result in authorization failure, no idea, in addition gpm is doing the same thing and it is getting authorization. I'm very confused.
(In reply to comment #8) > I don't really understand the problem, i'using xfce session from git (it does > set XDG_SESSION_COOKIE) and everything works fine, the XDG_SESSION_COOKIE that > you have is coming from the session opened by gdm, then why using this is a > polkit subject result in authorization failure, no idea, in addition gpm is > doing the same thing and it is getting authorization. Would there be another way to check exactly the authorizations I have via the session cookie?
> Would there be another way to check exactly the authorizations I have via the > session cookie? No i don't think, i would re-check the polkit code to see if there were anw changes.
For the record, all GNOME programs I've looked at use pid and start time (by way of polkit_unix_process_new()), so it might be as simple as that the session-id path has never really been used and tested before? I can't get it to work with that either, but if I disable the entire ConsoleKit handling block and thus let it fall back to unix session pid/start time, it works perfectly for me.
(In reply to comment #11) > For the record, all GNOME programs I've looked at use pid and start time (by > way of polkit_unix_process_new()), so it might be as simple as that the > session-id path has never really been used and tested before? I can't get it to > work with that either, but if I disable the entire ConsoleKit handling block > and thus let it fall back to unix session pid/start time, it works perfectly > for me. Yup, that's what i'm going to do for the 1.0.0.
Is that planned soon? :)
(In reply to comment #13) > Is that planned soon? :) Ali, any news on this? It'd be nice to be able to ship xfpm in Squeeze with that bug fixed.
*** Bug 6631 has been marked as a duplicate of this bug. ***
(In reply to comment #15) > *** Bug 6631 has been marked as a duplicate of this bug. *** The annoying, yet mandatory: "Same here. I'm not using Debian or Ubuntu." Missed this bug and filed duplicate above and filed information there, if that's any use.
(In reply to comment #16) > (In reply to comment #15) > > *** Bug 6631 has been marked as a duplicate of this bug. *** > > The annoying, yet mandatory: "Same here. I'm not using Debian or Ubuntu." > > Missed this bug and filed duplicate above and filed information there, if > that's any use. Fixed in version 1.0.0