Xfce Forum

Sub domains
 

You are not logged in.

#1 2018-05-07 17:02:31

theOtherCharles
Member
Registered: 2018-01-05
Posts: 17

Power Manager wants authorization to hibernate on critical power

Power Manager wants authorization to hibernate on critical power. This is unfortunate because usually the reason to hibernate on critical power is that no-one is attending to the computer. So it sits there waiting for authorization it never gets, and exhausts the battery.

Debian GNU/Linux 9.4 (stretch)

libpolkit-agent-1-0    0.105-18        amd64
libpolkit-backend-1-0    0.105-18        amd64
libpolkit-gobject-1-0    0.105-18        amd64
libpolkit-qt-1-1    0.112.0-5        amd64
libpolkit-qt5-1-1    0.112.0-5        amd64
xfce4    4.12.3        all
xfce4-power-manager    1.4.4-4        amd64
xfce4-power-manager-data    1.4.4-4        all
xfce4-power-manager-plugins    1.4.4-4        amd64

Note that xfce4-power-manager provides the polkit file /usr/share/polkit-1/actions/org.xfce.power.policy. That file provides, in part:

  <action id="org.xfce.power.xfce4-pm-helper">
    
    <description>Suspend or hibernate the system</description>
    <message>Authentication is required to place the system in suspend or hibernate mode</message>
    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
    <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/xfce4-pm-helper</annotate>
  </action>

Not being a polkit guru (and having no interest in becoming one) I merely suspect that this is related to the problem.

Hibernation works, whether from "pm-hibernate" as root, or "xfce4-session-logout --hibernate" as a user.

I have looked at back posts in this forum on possible related issues. Several of them blame the problem on polkit, not xfce. Others do not. None seems to have a solution that works in this instance.

Offline

#2 2018-05-07 19:43:47

theOtherCharles
Member
Registered: 2018-01-05
Posts: 17

Re: Power Manager wants authorization to hibernate on critical power

Additional datum. I changed the critical power handler from hibernate to suspend. That worked correctly. So methinks the problem is in a difference between those two.

Last edited by theOtherCharles (2018-05-07 19:44:17)

Offline

#3 2018-05-07 22:57:32

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 4,272

Re: Power Manager wants authorization to hibernate on critical power

What does the following return:

xfce4-power-manager --dump

How To Ask For Help           Xfce FAQ                            Xfce Release Information
The Xfce Community          Xfce Tips and Tricks

Offline

#4 2018-05-07 23:49:20

theOtherCharles
Member
Registered: 2018-01-05
Posts: 17

Re: Power Manager wants authorization to hibernate on critical power

charles@jhegaala:~$ xfce4-power-manager --dump
---------------------------------------------------
       Xfce power manager version 1.4.4
With policykit support
With network manager support
---------------------------------------------------
Can suspend: True
Can hibernate: True
Authorized to suspend: True
Authorized to hibernate: True
Authorized to shutdown: True
Has battery: True
Has brightness panel: True
Has power button: True
Has hibernate button: True
Has sleep button: True
Has LID: True
charles@jhegaala:~$

Offline

#5 2018-05-08 01:14:45

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 4,272

Re: Power Manager wants authorization to hibernate on critical power

Everything looks good there.

Are you using a screensaver of some sort (e.g. light-locker) and when the computer is idle, it kicks in such that when the hibernate event should occur, your user account is no longer "logged in"?


How To Ask For Help           Xfce FAQ                            Xfce Release Information
The Xfce Community          Xfce Tips and Tricks

Offline

#6 2018-05-08 01:50:36

theOtherCharles
Member
Registered: 2018-01-05
Posts: 17

Re: Power Manager wants authorization to hibernate on critical power

No, I have no screen savers.

Also, I changed the critical power handler to suspend rather than hibernate. It went to suspension, no request for authorization.

Last edited by theOtherCharles (2018-05-08 01:53:48)

Offline

#7 2018-05-08 02:20:16

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 4,272

Re: Power Manager wants authorization to hibernate on critical power

Can you try the following and see if you can capture and debug info at the time of the hibernate attempt on critical:

1. Quit the power manager:

xfce4-power-manager -q

2. Run it in debug mode:

xfce4-power-manager --no-daemon --debug

Lets see if you get anything in the debug messages.


How To Ask For Help           Xfce FAQ                            Xfce Release Information
The Xfce Community          Xfce Tips and Tricks

Offline

#8 2018-05-10 11:53:56

theOtherCharles
Member
Registered: 2018-01-05
Posts: 17

Re: Power Manager wants authorization to hibernate on critical power

I have redshift running; that may affect things.

charles@jhegaala:~$ xfce4-power-manager -q
charles@jhegaala:~$ xfce4-power-manager --no-daemon --debug
TRACE[xfpm-main.c:192] xfpm_start(): Starting the power manager
TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for general-notification
TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for lock-screen-suspend-hibernate
TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for show-brightness-popup
TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for handle-brightness-keys
TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for show-tray-icon
TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for brightness-level-on-battery
TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for brightness-slider-min-level
TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for dpms-sleep-mode
TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for inactivity-on-ac
TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for inactivity-sleep-mode-on-ac
TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for inactivity-sleep-mode-on-battery
TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for network-manager-sleep
TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for logind-handle-power-key
TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for logind-handle-suspend-key
TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for logind-handle-hibernate-key
TRACE[xfpm-xfconf.c:164] xfpm_xfconf_load(): Using default configuration for logind-handle-lid-switch
TRACE[xfpm-polkit.c:314] xfpm_polkit_init_data(): Using unix session polkit subject
TRACE[xfpm-polkit.c:406] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.power-off is authorized=TRUE
TRACE[xfpm-polkit.c:406] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.reboot is authorized=TRUE
TRACE[xfpm-polkit.c:406] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.suspend is authorized=TRUE
TRACE[xfpm-polkit.c:406] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.hibernate is authorized=TRUE
TRACE[xfpm-power.c:958] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/line_power_AC
TRACE[xfpm-power.c:916] xfpm_power_add_device(): 'line-power' device added
TRACE[xfpm-power.c:958] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/battery_BAT0
TRACE[xfpm-power.c:916] xfpm_power_add_device(): 'battery' device added
TRACE[xfpm-power.c:926] xfpm_power_add_device(): Battery device type 'battery' detected at: /org/freedesktop/UPower/devices/battery_BAT0
TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 124 : ((XfpmButtonKey) BUTTON_POWER_OFF)

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

TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 213 : ((XfpmButtonKey) BUTTON_HIBERNATE)
TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 150 : ((XfpmButtonKey) BUTTON_SLEEP)
TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 233 : ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP)
TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 232 : ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_DOWN)
TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 244 : ((XfpmButtonKey) BUTTON_BATTERY)
TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 238 : ((XfpmButtonKey) BUTTON_KBD_BRIGHTNESS_UP)
TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 237 : ((XfpmButtonKey) BUTTON_KBD_BRIGHTNESS_DOWN)
TRACE[xfpm-battery.c:189] xfpm_battery_refresh_icon(): Battery state 4
TRACE[xfpm-battery.c:240] xfpm_battery_refresh_icon(): Battery icon xfpm-primary-charged
TRACE[xfpm-power.c:214] xfpm_power_check_polkit_auth(): using logind suspend backend
TRACE[xfpm-polkit.c:406] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.suspend is authorized=TRUE
TRACE[xfpm-polkit.c:406] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.hibernate is authorized=TRUE
TRACE[xfpm-power.c:1449] xfpm_update_blank_time(): Timeout: 10
TRACE[xfpm-power.c:1449] xfpm_update_blank_time(): Timeout: 10
TRACE[xfpm-power.c:1449] xfpm_update_blank_time(): Timeout: 10
TRACE[xfpm-power.c:1449] xfpm_update_blank_time(): Timeout: 10
TRACE[xfpm-manager.c:643] xfpm_manager_inhibit_sleep_systemd(): Inhibiting systemd sleep: handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch

** (xfce4-power-manager:29843): WARNING **: No outputs have backlight property
xfce4-power-manager-Message: Set kernel brightness switch to 0
TRACE[xfpm-backlight.c:259] xfpm_backlight_brightness_on_ac_settings_changed(): Alarm on ac timeout changed 9
TRACE[xfpm-backlight.c:280] xfpm_backlight_brightness_on_battery_settings_changed(): Alarm on battery timeout changed 9

(xfce4-power-manager:29843): xfce4-power-manager-WARNING **: Failed to get keyboard max brightness level : No such interface 'org.freedesktop.UPower.KbdBacklight' on object at path /org/freedesktop/UPower/KbdBacklight
TRACE[xfpm-battery.c:189] xfpm_battery_refresh_icon(): Battery state 4
TRACE[xfpm-battery.c:240] xfpm_battery_refresh_icon(): Battery icon xfpm-primary-charged

Offline

#9 2018-05-10 15:12:15

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 4,272

Re: Power Manager wants authorization to hibernate on critical power

Does this include the time when you are prompted instead of hibernating? That event would need to happen so that it gets logged in the debug output.


How To Ask For Help           Xfce FAQ                            Xfce Release Information
The Xfce Community          Xfce Tips and Tricks

Offline

#10 2018-05-12 12:51:20

theOtherCharles
Member
Registered: 2018-01-05
Posts: 17

Re: Power Manager wants authorization to hibernate on critical power

No, it does not. And I won't be able to run that test until Monday at the earliest.

Offline

Board footer

Powered by FluxBB