Xfce Forum

Sub domains
 

You are not logged in.

#1 2018-05-27 23:36:44

lufte
Member
Registered: 2018-05-27
Posts: 4

Can't hibernate if certain applications are running

Hi, I've encountered this behavior where Xfce won't hibernate if certains apps are running. It turns off the screen and "looks" like it's going to hibernate but eventually the session login screen appears and I can login normally to the running session. I have identified spotify as one of the applications that cause this, but some other apps also do this and sometimes it's even a particular tab in the browser.

I've tried running xfce4-power-manager in debug mode and xfce4-session-logout --hibernate but neither show anything useful. What would I need to do to debug this issue?

Thanks.

Offline

#2 2018-05-28 00:07:05

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

Re: Can't hibernate if certain applications are running

Hello and welcome.

lufte wrote:

Hi, I've encountered this behavior where Xfce won't hibernate if certains apps are running. It turns off the screen and "looks" like it's going to hibernate but eventually the session login screen appears and I can login normally to the running session. I have identified spotify as one of the applications that cause this, but some other apps also do this and sometimes it's even a particular tab in the browser.

Would you be able to name the other apps? Do they have something in common? (e.g. all music/media players).

Your distro should have some system logs that contain info when your system goes into sleep/hibernate. That would be the first place to look. There may be a reason documented as to why it was aborted.

I've tried running xfce4-power-manager in debug mode and xfce4-session-logout --hibernate but neither show anything useful. What would I need to do to debug this issue?

Can you post this output? Sometimes a second set of eyes are helpful.

What version of xfce4-power-manager are you using and what do your configuration settings looks like?

xfconf-query -c xfce4-power-manager -lv

Offline

#3 2018-05-28 17:14:14

lufte
Member
Registered: 2018-05-27
Posts: 4

Re: Can't hibernate if certain applications are running

ToZ wrote:

Hello and welcome.

Thanks!

ToZ wrote:

Would you be able to name the other apps? Do they have something in common? (e.g. all music/media players).

After reading your response I tried to reproduce the issue and found out that it's not related to particular apps but to RAM usage instead, and spotify is both a RAM hog and the first app I thought of closing the first time. That's why sometimes it wouldn't be enough but closing some tabs from the browser would help. I can hibernate with spotify open if I close the browser for example.

Anyway, I resized my swap partition so now it's twice as big as the available RAM (4gb). Somehow the problem persists though.

ToZ wrote:

Can you post this output? Sometimes a second set of eyes are helpful.

This is the output from xfce4-power-manager.

** (xfce4-power-manager:5912): WARNING **: 13:55:18.440: Failed to get name owner: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.freedesktop.PowerManagement': no such name


** (xfce4-power-manager:5912): WARNING **: 13:55:18.441: Failed to get name owner: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.xfce.PowerManager': no such name


(xfce4-power-manager:5912): GLib-GObject-WARNING **: 13:55:18.477: ../../../../gobject/gsignal.c:2523: signal 'Changed' is invalid for instance '0x558ba308fa70' of type 'GDBusProxy'

(xfce4-power-manager:5912): xfce4-power-manager-WARNING **: 13:55:18.549: could not map keysym 1008ffa8 to keycode

TRACE[xfpm-main.c:205] xfpm_start(): Starting the power manager
TRACE[xfpm-xfconf.c:642] xfpm_xfconf_init(): lock screen TRUE
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for general-notification
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for critical-power-level
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for show-brightness-popup
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for handle-brightness-keys
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for brightness-level-on-ac
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for brightness-level-on-battery
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for brightness-slider-min-level
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for dpms-sleep-mode
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for inactivity-on-ac
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for inactivity-on-battery
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for inactivity-sleep-mode-on-ac
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for inactivity-sleep-mode-on-battery
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for brightness-on-ac
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for network-manager-sleep
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for logind-handle-power-key
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for logind-handle-suspend-key
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for logind-handle-hibernate-key
TRACE[xfpm-xfconf.c:165] xfpm_xfconf_load(): Using default configuration for heartbeat-command
TRACE[xfpm-polkit.c:287] xfpm_polkit_init_data(): Using unix session polkit subject
TRACE[xfpm-polkit.c:345] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 5912>, 'start-time': <uint64 203942>}), 'org.freedesktop.login1.power-off', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:366] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.power-off is authorized=TRUE
TRACE[xfpm-polkit.c:345] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 5912>, 'start-time': <uint64 203942>}), 'org.freedesktop.login1.reboot', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:366] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.reboot is authorized=TRUE
TRACE[xfpm-polkit.c:345] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 5912>, 'start-time': <uint64 203942>}), 'org.freedesktop.login1.suspend', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:366] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.suspend is authorized=TRUE
TRACE[xfpm-polkit.c:345] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 5912>, 'start-time': <uint64 203942>}), 'org.freedesktop.login1.hibernate', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:366] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.hibernate is authorized=TRUE
TRACE[xfpm-power.c:936] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/line_power_AC
TRACE[xfpm-power.c:898] xfpm_power_add_device(): 'line-power' device added
TRACE[xfpm-power.c:936] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/battery_BAT0
TRACE[xfpm-power.c:898] xfpm_power_add_device(): 'battery' device added
TRACE[xfpm-power.c:908] 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)
TRACE[xfpm-button.c:183] xfpm_button_xevent_key(): Grabbed key 213 : ((XfpmButtonKey) BUTTON_HIBERNATE)
TRACE[xfpm-button.c:183] xfpm_button_xev
(xfce4-power-manager:5912): GLib-CRITICAL **: 13:55:18.565: g_error_free: assertion 'error != NULL' failed

** (xfce4-power-manager:5912): WARNING **: 13:55:18.565: No outputs have backlight property
xfce4-power-manager-Message: 13:55:18.607: Set kernel brightness switch to 0

(xfce4-power-manager:5912): xfce4-power-manager-WARNING **: 13:55:18.613: Failed to get keyboard max brightness level : GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface 'org.freedesktop.UPower.KbdBacklight' on object at path /org/freedesktop/UPower/KbdBacklight

** (xfce4-power-manager:5912): WARNING **: 13:55:18.656: No outputs have backlight property

(xfce4-power-manager:5912): xfce4-power-manager-WARNING **: 13:55:18.663: ../panel-plugins/power-manager-plugin/power-manager-button.c:815: invalid property id 2 for "show-panel-label" of type 'GParamInt' in 'PowerManagerButton'
ent_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-power.c:213] xfpm_power_check_polkit_auth(): using logind suspend backend
TRACE[xfpm-polkit.c:345] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 5912>, 'start-time': <uint64 203942>}), 'org.freedesktop.login1.suspend', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:366] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.suspend is authorized=TRUE
TRACE[xfpm-polkit.c:345] xfpm_polkit_check_auth_intern(): polkit request: (('unix-process', {'pid': <uint32 5912>, 'start-time': <uint64 203942>}), 'org.freedesktop.login1.hibernate', @a{ss} {}, uint32 0, '')
TRACE[xfpm-polkit.c:366] xfpm_polkit_check_auth_intern(): Action=org.freedesktop.login1.hibernate is authorized=TRUE
TRACE[xfpm-power.c:1446] xfpm_update_blank_time(): Timeout: 10
TRACE[xfpm-power.c:1446] xfpm_update_blank_time(): Timeout: 10
TRACE[xfpm-power.c:1446] xfpm_update_blank_time(): Timeout: 10
TRACE[xfpm-power.c:1446] xfpm_update_blank_time(): Timeout: 0
TRACE[xfpm-manager.c:645] xfpm_manager_inhibit_sleep_systemd(): Inhibiting systemd sleep: handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch
TRACE[xfpm-backlight.c:256] xfpm_backlight_brightness_on_ac_settings_changed(): Alarm on ac timeout changed 9
TRACE[xfpm-backlight.c:277] xfpm_backlight_brightness_on_battery_settings_changed(): Alarm on battery timeout changed 9
TRACE[xfpm-manager.c:749] xfpm_manager_show_tray_icon(): Showing tray icon
TRACE[../panel-plugins/power-manager-plugin/power-manager-button.c:539] power_manager_button_add_device(): entering for /org/freedesktop/UPower/devices/DisplayDevice
TRACE[../panel-plugins/power-manager-plugin/power-manager-button.c:445] power_manager_button_update_device_icon_and_details(): entering for /org/freedesktop/UPower/devices/DisplayDevice
TRACE[xfpm-power-common.c:190] get_device_icon_name(): icon_suffix -symbolic, icon_base_length 24, upower_icon battery-caution-charging-symbolic
TRACE[../panel-plugins/power-manager-plugin/power-manager-button.c:539] power_manager_button_add_device(): entering for /org/freedesktop/UPower/devices/line_power_AC
TRACE[../panel-plugins/power-manager-plugin/power-manager-button.c:445] power_manager_button_update_device_icon_and_details(): entering for /org/freedesktop/UPower/devices/line_power_AC
TRACE[xfpm-power-common.c:190] get_device_icon_name(): icon_suffix -symbolic, icon_base_length 10, upower_icon ac-adapter-symbolic
TRACE[../panel-plugins/power-manager-plugin/power-manager-button.c:539] power_manager_button_add_device(): entering for /org/freedesktop/UPower/devices/battery_BAT0
TRACE[../panel-plugins/power-manager-plugin/power-manager-button.c:445] power_manager_button_update_device_icon_and_details(): entering for /org/freedesktop/UPower/devices/battery_BAT0
TRACE[xfpm-power-common.c:190] get_device_icon_name(): icon_suffix -symbolic, icon_base_length 24, upower_icon battery-caution-charging-symbolic
TRACE[xfpm-manager.c:723] xfpm_manager_tray_update_icon(): updating icon
TRACE[xfpm-manager.c:707] xfpm_manager_tray_update_tooltip(): updating tooltip
TRACE[xfpm-button.c:118] xfpm_button_filter_x_events(): Key press: ((XfpmButtonKey) BUTTON_SLEEP)
TRACE[xfpm-manager.c:369] xfpm_manager_button_pressed_cb(): Received button press event: ((XfpmButtonKey) BUTTON_SLEEP)
TRACE[xfpm-manager.c:400] xfpm_manager_button_pressed_cb(): Shutdown request : : ((XfpmShutdownRequest) XFPM_ASK)
TRACE[../panel-plugins/power-manager-plugin/power-manager-button.c:44xfce4-power-manager-Message: 13:56:11.523: Restored brightness switch value to: 1

(xfce4-power-manager:5912): Gtk-WARNING **: 13:56:11.524: A floating object was finalized. This means that someone
called g_object_unref() on an object that had only a floating
reference; the initial floating reference is not owned by anyone
and must be removed with g_object_ref_sink().
5] power_manager_button_update_device_icon_and_details(): entering for /org/freedesktop/UPower/devices/battery_BAT0
TRACE[xfpm-power-common.c:190] get_device_icon_name(): icon_suffix -symbolic, icon_base_length 24, upower_icon battery-caution-charging-symbolic
TRACE[../panel-plugins/power-manager-plugin/power-manager-button.c:445] power_manager_button_update_device_icon_and_details(): entering for /org/freedesktop/UPower/devices/line_power_AC
TRACE[xfpm-power-common.c:190] get_device_icon_name(): icon_suffix -symbolic, icon_base_length 10, upower_icon ac-adapter-symbolic
TRACE[xfpm-main.c:68] xfpm_quit_signal(): sig 2
TRACE[xfpm-manager.c:939] xfpm_manager_stop(): Stopping
TRACE[xfpm-manager.c:266] xfpm_manager_quit(): Exiting
TRACE[xfpm-polkit.c:244] xfpm_polkit_free_data(): Destroying Polkit data

And this is from dmesg:

[ 1813.176795] sky2 0000:09:00.0 eth0: disabling interface
[ 1813.238504] wlan0: deauthenticating from a0:ec:80:50:1b:26 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 1813.520270] b43-phy0: Loading firmware version 478.104 (2008-07-01 00:50:23)
[ 1818.444720] PM: hibernation entry
[ 1818.444981] PM: Syncing filesystems ...
[ 1818.470709] PM: done.
[ 1818.470712] Freezing user space processes ...
[ 1822.028542] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 1822.037610] (elapsed 3.566 seconds) done.
[ 1822.037618] OOM killer disabled.
[ 1822.037739] PM: Marking nosave pages: [mem 0x00000000-0x00000fff]
[ 1822.037743] PM: Marking nosave pages: [mem 0x0009f000-0x000fffff]
[ 1822.037750] PM: Marking nosave pages: [mem 0xdd8bf000-0xffffffff]
[ 1822.038999] PM: Basic memory bitmaps created
[ 1822.039232] PM: Preallocating image memory...
[ 1841.748274] PM: Basic memory bitmaps freed
[ 1841.748277] OOM killer enabled.
[ 1841.748278] Restarting tasks ... done.
[ 1841.795897] atkbd serio0: Unknown key pressed (translated set 2, code 0x8d on isa0060/serio0).
[ 1841.795900] atkbd serio0: Use 'setkeycodes e00d <keycode>' to make it known.
[ 1841.799924] video LNXVIDEO:01: Restoring backlight state
[ 1841.803165] PM: hibernation exit
[ 1844.015858] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 1844.018559] sky2 0000:09:00.0 eth0: enabling interface
[ 1844.019238] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 1844.029137] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 1844.220323] b43-phy0: Loading firmware version 478.104 (2008-07-01 00:50:23)
[ 1852.616516] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 1852.770655] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 1854.153510] wlan0: authenticate with a0:ec:80:50:1b:26
[ 1854.168543] wlan0: send auth to a0:ec:80:50:1b:26 (try 1/3)
[ 1854.170474] wlan0: authenticated
[ 1854.172067] wlan0: associate with a0:ec:80:50:1b:26 (try 1/3)
[ 1854.175234] wlan0: RX AssocResp from a0:ec:80:50:1b:26 (capab=0x411 status=0 aid=28)
[ 1854.175675] wlan0: associated
[ 1854.201144] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
ToZ wrote:

What version of xfce4-power-manager are you using and what do your configuration settings looks like?

xfconf-query -c xfce4-power-manager -lv

It's Xfce Power Manager 1.6.1, running on Debian testing.

/xfce4-power-manager/blank-on-ac                        0
/xfce4-power-manager/blank-on-battery                   0
/xfce4-power-manager/brightness-on-battery              9
/xfce4-power-manager/brightness-switch                  0
/xfce4-power-manager/brightness-switch-restore-on-exit  1
/xfce4-power-manager/critical-power-action              3
/xfce4-power-manager/dpms-enabled                       true
/xfce4-power-manager/dpms-on-ac-off                     5
/xfce4-power-manager/dpms-on-ac-sleep                   2
/xfce4-power-manager/dpms-on-battery-off                5
/xfce4-power-manager/dpms-on-battery-sleep              2
/xfce4-power-manager/hibernate-button-action            3
/xfce4-power-manager/lid-action-on-ac                   0
/xfce4-power-manager/lid-action-on-battery              2
/xfce4-power-manager/lock-screen-suspend-hibernate      true
/xfce4-power-manager/logind-handle-lid-switch           false
/xfce4-power-manager/power-button-action                3
/xfce4-power-manager/show-tray-icon                     true
/xfce4-power-manager/sleep-button-action                3

Thanks for your response.

Last edited by lufte (2018-05-28 17:17:40)

Offline

#4 2018-05-28 20:23:00

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

Re: Can't hibernate if certain applications are running

Thanks for the extra information. Most of it looks okay.

The dmesg log looks like a successful hibernate/resume (in that there are no errors and there is a pause between the actual shutdown and resume:

[ 1818.470712] Freezing user space processes ...
[ 1822.028542] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

Same for the xfce4-power-manager debug output. Was it from a failed hibernate?

Offline

#5 2018-05-28 20:33:00

lufte
Member
Registered: 2018-05-27
Posts: 4

Re: Can't hibernate if certain applications are running

ToZ wrote:

Was it from a failed hibernate?

Exactly, it takes a few seconds and then brings me back to the login screen.

Offline

#6 2018-05-28 23:11:53

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

Re: Can't hibernate if certain applications are running

In that case, there isn't anything there that identifies the issue.

One thing you can do to try to narrow down the issue, is quit the xfce4-power-manager:

xfce4-power-manager --quit

...and then use your distro's back-end method to hibernate. For example, for systemd, that would be:

systemctl hibernate

If it still does the same, then I think the issue is at a lower level than Xfce operates at.

Offline

#7 2018-05-29 13:53:44

lufte
Member
Registered: 2018-05-27
Posts: 4

Re: Can't hibernate if certain applications are running

Ah yes, I was able to reproduce it without having xfce4-power-manager running. At least now I was able to narrow it down. I'll report it to the systemd guys.

Thanks for your help!

Offline

Board footer

Powered by FluxBB