Xfce Forum

Sub domains
 

You are not logged in.

#1 2024-01-31 14:00:33

rawbit
Member
Registered: 2024-01-31
Posts: 8

Laptop do not suspend after lid is closed

Dear Forum,

after I installed KDE  and uninstall it again, my laptop does not suspend after I closed my the lid.

systemctl suspend  is working as expected.

Can you help?

Thank you!

My OS:

lsb_release -a
No LSB modules are available.
Distributor ID:    Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:    12
Codename:    bookworm

Xfce4 Version 4.18 (Debian Standard)

xfce4-power-manager --dump

---------------------------------------------------
       Xfce power manager version 4.18.1
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 battery button: True
Has LID: True


pkg -l *pol*|grep ii
ii  alsa-topology-conf           1.2.5.1-2    all          ALSA topology configuration files
ii  gir1.2-polkit-1.0            122-3        amd64        GObject introspection data for polkit
ii  libatopology2:amd64          1.2.8-1+b1   amd64        shared library for handling ALSA topology definitions
ii  libplexus-interpolation-java 1.26-1       all          Plexus Interpolation API
ii  libpolkit-agent-1-0:amd64    122-3        amd64        polkit Authentication Agent API
ii  libpolkit-gobject-1-0:amd64  122-3        amd64        polkit Authorization API
ii  libpolkit-qt5-1-1:amd64      0.114.0-2    amd64        PolicyKit-qt5-1 library
ii  libsepol-dev:amd64           3.4-2.1      amd64        SELinux binary policy manipulation library and development files
ii  libsepol2:amd64              3.4-2.1      amd64        SELinux library for manipulating binary security policies
ii  policykit-1                  122-3        amd64        transitional package for polkitd and pkexec
ii  policykit-1-gnome            0.105-8      amd64        authentication agent for PolicyKit
ii  polkitd                      122-3        amd64        framework for managing administrative policies and privileges
ii  polkitd-pkla                 122-3        amd64        Legacy "local authority" (.pkla) backend for polkitd

Last edited by rawbit (2024-01-31 14:13:08)

Offline

#2 2024-02-01 03:21:03

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,512

Re: Laptop do not suspend after lid is closed

Can you post back:

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

...as well as xfce4-power-manager debug logs?

xfce4-power-manager -q && xfce4-power-manager --no-daemon --debug

...attempt a lid close and post back the output in the terminal.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2024-02-01 15:32:28

rawbit
Member
Registered: 2024-01-31
Posts: 8

Re: Laptop do not suspend after lid is closed

Hi,

thank you for you help!

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

/xfce4-power-manager/battery-button-action              1
/xfce4-power-manager/blank-on-ac                        1
/xfce4-power-manager/blank-on-battery                   5
/xfce4-power-manager/brightness-level-on-ac             20
/xfce4-power-manager/brightness-level-on-battery        1
/xfce4-power-manager/brightness-on-ac                   60
/xfce4-power-manager/brightness-on-battery              56
/xfce4-power-manager/brightness-step-count              2
/xfce4-power-manager/brightness-switch                  0
/xfce4-power-manager/brightness-switch-restore-on-exit  1
/xfce4-power-manager/critical-power-action              4
/xfce4-power-manager/dpms-enabled                       true
/xfce4-power-manager/dpms-on-ac-off                     0
/xfce4-power-manager/dpms-on-ac-sleep                   0
/xfce4-power-manager/dpms-on-battery-off                20
/xfce4-power-manager/dpms-on-battery-sleep              9
/xfce4-power-manager/general-notification               true
/xfce4-power-manager/handle-brightness-keys             true
/xfce4-power-manager/hibernate-button-action            1
/xfce4-power-manager/inactivity-on-battery              14
/xfce4-power-manager/inactivity-sleep-mode-on-battery   1
/xfce4-power-manager/lid-action-on-ac                   1
/xfce4-power-manager/lid-action-on-battery              1
/xfce4-power-manager/lock-screen-suspend-hibernate      true
/xfce4-power-manager/logind-handle-lid-switch           true
/xfce4-power-manager/power-button-action                3
/xfce4-power-manager/show-tray-icon                     false
/xfce4-power-manager/sleep-button-action                1


First part, I have to switch to US lang...


KR

rawbit

Offline

#4 2024-02-01 15:39:08

rawbit
Member
Registered: 2024-01-31
Posts: 8

Re: Laptop do not suspend after lid is closed

xfce4-power-manager -q
rbit@TUXEDO:~$ xfce4-power-manager --no-daemon --debug > suspend.txt
Gtk-Message: 16:34:05.528: Failed to load module "colorreload-gtk-module"
Gtk-Message: 16:34:05.528: Failed to load module "window-decorations-gtk-module"

(xfce4-power-manager:11215): xfce4-power-manager-WARNING **: 16:34:05.529: could not map keysym 1008ffa8 to keycode


** (xfce4-power-manager:11215): WARNING **: 16:34:05.553: No outputs have backlight property
xfce4-power-manager-Message: 16:34:05.576: Set kernel brightness switch to 0

(xfce4-power-manager:11215): xfce4-power-manager-WARNING **: 16:34:05.579: Failed to get keyboard max brightness level : GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Das Objekt existiert nicht am Pfad »/org/freedesktop/UPower/KbdBacklight«

(xfce4-power-manager:11215): xfconf-WARNING **: 16:34:05.580: Failed to set property "xfce4-power-manager::/xfce4-power-manager/brightness-switch": Operation was cancelled
xfce4-power-manager-Message: 16:34:05.598: Set kernel brightness switch to 0

TRACE[xfpm-main.c:210] xfpm_start(): Starting the power manager
TRACE[xfpm-xfconf.c:679] xfpm_xfconf_init(): lock screen TRUE
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for critical-power-level
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for show-brightness-popup
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for brightness-exponential
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for brightness-slider-min-level
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for dpms-sleep-mode
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for inactivity-on-ac
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for inactivity-sleep-mode-on-ac
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for network-manager-sleep
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for logind-handle-power-key
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for logind-handle-suspend-key
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for logind-handle-hibernate-key
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for heartbeat-command
TRACE[xfpm-polkit.c:289] 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 11215>, 'start-time': <uint64 107593>}), '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 11215>, 'start-time': <uint64 107593>}), '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 11215>, 'start-time': <uint64 107593>}), '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 11215>, 'start-time': <uint64 107593>}), '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:929] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/line_power_AC
TRACE[xfpm-power.c:888] xfpm_power_add_device(): 'line-power' device added
TRACE[xfpm-power.c:929] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/battery_BAT0
TRACE[xfpm-power.c:888] xfpm_power_add_device(): 'battery' device added
TRACE[xfpm-power.c:897] xfpm_power_add_device(): Battery device type 'battery' detected at: /org/freedesktop/UPower/devices/battery_BAT0
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 124 : ((XfpmButtonKey) BUTTON_POWER_OFF)
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 213 : ((XfpmButtonKey) BUTTON_HIBERNATE)
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 150 : ((XfpmButtonKey) BUTTON_SLEEP)
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 233 : ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP)
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 232 : ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_DOWN)
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 244 : ((XfpmButtonKey) BUTTON_BATTERY)
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 238 : ((XfpmButtonKey) BUTTON_KBD_BRIGHTNESS_UP)
TRACE[xfpm-button.c:180] xfpm_button_xevent_key(): Grabbed key 237 : ((XfpmButtonKey) BUTTON_KBD_BRIGHTNESS_DOWN)
TRACE[xfpm-dpms.c:72] xfpm_dpms_set_timeouts(): Settings dpms: standby=540 suspend=0 off=1200


RACE[xfpm-dpms.c:347] xfpm_dpms_set_on_battery(): dpms on battery TRUE
TRACE[xfpm-power.c:1449] xfpm_update_blank_time(): Prev Timeout: 0 / New Timeout: 600
TRACE[xfpm-power.c:209] 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 11215>, 'start-time': <uint64 107593>}), '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 11215>, 'start-time': <uint64 107593>}), '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:1449] xfpm_update_blank_time(): Prev Timeout: 600 / New Timeout: 600
TRACE[xfpm-power.c:1449] xfpm_update_blank_time(): Prev Timeout: 600 / New Timeout: 300
TRACE[xfpm-manager.c:650] xfpm_manager_inhibit_sleep_systemd(): Inhibiting systemd sleep: handle-power-key:handle-suspend-key:handle-hibernate-key
TRACE[xfpm-backlight.c:269] xfpm_backlight_brightness_on_ac_settings_changed(): Alarm on ac timeout changed 60
TRACE[xfpm-backlight.c:290] xfpm_backlight_brightness_on_battery_settings_changed(): Alarm on battery timeout changed 56
TRACE[xfpm-polkit.c:383] xfpm_polkit_changed_cb(): Auth changed
TRACE[xfpm-power.c:1008] xfpm_power_polkit_auth_changed_cb(): Auth configuration changed
TRACE[xfpm-power.c:209] 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 11215>, 'start-time': <uint64 107593>}), '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 11215>, 'start-time': <uint64 107593>}), '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-polkit.c:383] xfpm_polkit_changed_cb(): Auth changed
TRACE[xfpm-power.c:1008] xfpm_power_polkit_auth_changed_cb(): Auth configuration changed
TRACE[xfpm-power.c:209] 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 11215>, 'start-time': <uint64 107593>}), '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 11215>, 'start-time': <uint64 107593>}), '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

Last lines repeat a lot of times

KR

Rawbit

Offline

#5 2024-02-01 17:55:57

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,512

Re: Laptop do not suspend after lid is closed

So xfce4-power-manager recognizes the lid and doesn't have any active inhibitors. It uses logind for lid and suspend actions. What is the content of /etc/systemd/logind.conf?

Also, did you uninstall all kde components that you installed and can you confirm that there are no kde processes still running?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#6 2024-02-01 18:25:59

rawbit
Member
Registered: 2024-01-31
Posts: 8

Re: Laptop do not suspend after lid is closed

Hi, I will check again KDE for remaining KDE components and process.
I used debfoster, tasksel to de-install KDE.

Further I looked for every KDE and Plasma package.
I'm not sure if I can find KDE processes, but I try to find it out.

After de-installing  the polkit packages from KDE remained, I purge them manually and installed the related gnome stuff.


systemd-analyze cat-config systemd/logind.conf > logind.conf

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#UserStopDelaySec=10
#HandlePowerKey=poweroff
#HandlePowerKeyLongPress=ignore
#HandleRebootKey=reboot
#HandleRebootKeyLongPress=poweroff
#HandleSuspendKey=suspend
#HandleSuspendKeyLongPress=hibernate
#HandleHibernateKey=hibernate
#HandleHibernateKeyLongPress=ignore
HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#RebootKeyIgnoreInhibited=no
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RuntimeDirectoryInodesMax=
#RemoveIPC=yes

Offline

#7 2024-02-01 18:31:41

rawbit
Member
Registered: 2024-01-31
Posts: 8

Re: Laptop do not suspend after lid is closed

Uhhhh

locate kde

shows

/usr/share/kde4
/usr/share/kde4/services
/usr/share/kde4/services/ServiceMenus
/usr/share/kde4/services/ServiceMenus/cabextract.desktop
/usr/share/kglobalaccel/org.kde.kcalc.desktop
/usr/share/libreoffice/help/media/icon-themes/res/grafikde.s

Offline

#8 2024-02-01 20:35:24

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,512

Re: Laptop do not suspend after lid is closed

/xfce4-power-manager/logind-handle-lid-switch           true

You've set up xfce4-power-manager to pass on lid switch actions to logind.

HandleLidSwitch=suspend
HandleLidSwitchExternalPower=suspend

You've told logind to suspend on lid switch. Interesting that it doesn't work given that systemctl suspend does (but this would be a systemd/logind issue).

What if you revert back to allowing xfce4-power-manager to manage the lid action?

xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -s false

...does it work then?

As for kde processes, I meant:

ps -ef | grep kde

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#9 2024-02-02 06:51:52

rawbit
Member
Registered: 2024-01-31
Posts: 8

Re: Laptop do not suspend after lid is closed

Hi,

thank you again!

ps -ef | grep kde

root          86       2  0 07:32 ?        00:00:00 [kdevtmpfs]

I reworked the logind.conf to check, if it works, but it did not.

How can I check, if the OS suspend or not in the logs?

If I do systemctl suspend, my laptop power lamp flashes and I have to press the power key to come back to Xfce4.
If closing the lid, my laptopscreen is black and after opening the lid I have to login via lightdm.

xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -s false I tried already but does not work.
I will change the logind.conf and deactivate the settings with a #.

KR

Rawbit

Offline

#10 2024-02-02 07:23:25

rawbit
Member
Registered: 2024-01-31
Posts: 8

Re: Laptop do not suspend after lid is closed

sudo journalctl -b -u systemd-logind > log.txt shows the the laptop suspend?


Feb 02 08:15:59 RN systemd[1]: Starting systemd-logind.service - User Login Management...
Feb 02 08:15:59 RN systemd-logind[3543]: New seat seat0.
Feb 02 08:15:59 RN systemd-logind[3543]: Watching system buttons on /dev/input/event4 (Power Button)
Feb 02 08:15:59 RN systemd-logind[3543]: Watching system buttons on /dev/input/event1 (Power Button)
Feb 02 08:15:59 RN systemd-logind[3543]: Watching system buttons on /dev/input/event3 (Lid Switch)
Feb 02 08:15:59 RN systemd-logind[3543]: Watching system buttons on /dev/input/event2 (Sleep Button)
Feb 02 08:15:59 RN systemd-logind[3543]: Watching system buttons on /dev/input/event5 (Intel HID events)
Feb 02 08:15:59 RN systemd-logind[3543]: Watching system buttons on /dev/input/event0 (AT Translated Set 2 keyboard)
Feb 02 08:15:59 RN systemd[1]: Started systemd-logind.service - User Login Management.
Feb 02 08:16:00 RN systemd-logind[3543]: New session c1 of user lightdm.
Feb 02 08:16:09 RN systemd-logind[3543]: Removed session c1.
Feb 02 08:16:09 RN systemd-logind[3543]: New session 2 of user rawbit.
Feb 02 08:16:27 RN systemd-logind[3543]: Lid closed.
Feb 02 08:16:27 RN systemd-logind[3543]: Suspending...
Feb 02 08:16:43 RN systemd-logind[3543]: Lid opened.
Feb 02 08:16:43 RN systemd-logind[3543]: Operation 'sleep' finished.
Feb 02 08:16:45 RN systemd-logind[3543]: New session c4 of user lightdm.
Feb 02 08:16:53 RN systemd-logind[3543]: Removed session c4.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] CCBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.014 seconds, 7 queries executed - Memory usage: 626.43 KiB (Peak: 659.27 KiB) ]