Xfce Forum

Sub domains
 

You are not logged in.

#1 2024-01-15 11:44:54

vrgovinda
Member
Registered: 2024-01-14
Posts: 10

[SOLVED] system doesn't suspend after locking the screen

Hi,
I'm on Xfce 4.18
Lightdm 1.26.0
light-locker 1.8

My screen gets locked after the allotted time in the Power management preferences.
I have also set the system suspend time to the minimum 15 minutes.
But, the system doesn't suspend after the screen gets locked.

Do I need to give any additional info?
Can someone give some insight into this issue?

I don't prefer to use XScreensaver for the following reason.
-- I use multiple input methods. If my screen gets locked while using a non-English input method, I cannot key in my password. I am forced to restart the machine.
-- Otherwise, XScreensaver perfectly fits the bill since after locking the screen, it also suspends the system after the stipulated time.

Last edited by vrgovinda (2024-01-24 14:37:53)

Offline

#2 2024-01-15 12:22:28

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

Re: [SOLVED] system doesn't suspend after locking the screen

It would be helpful if we could see log files. If your system is based on systemd, then your journalctl log entries from around the time of the expected suspend event:

sudo journalctl -b 0 --no-pager

You could also run xfce4-power-manager in debug mode and post back the output right after when the suspend event should have taken place:

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

And finally, to make sure you don't have conflicting screensavers daemons running:

ps -ef | grep -E 'screensaver|locker' | grep -v grep

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-01-15 22:11:13

vrgovinda
Member
Registered: 2024-01-14
Posts: 10

Re: [SOLVED] system doesn't suspend after locking the screen

ToZ wrote:

It would be helpful if we could see log files. If your system is based on systemd, then your journalctl log entries from around the time of the expected suspend event:

sudo journalctl -b 0 --no-pager

I use Devuan -- no systemd

ToZ wrote:

You could also run xfce4-power-manager in debug mode and post back the output right after when the suspend event should have taken place:

xfce4-power-manager -q
xfce4-power-manager --no-daemon --debug
TRACE[xfpm-main.c:210] xfpm_start(): Starting the power manager
TRACE[xfpm-xfconf.c:679] xfpm_xfconf_init(): lock screen TRUE

(xfce4-power-manager:12157): GLib-GObject-WARNING **: 03:40:08.526: value "30" of type 'guint' is invalid or out of range for property 'critical-power-level' of type 'guint'
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-step-count
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-level-on-ac
TRACE[xfpm-xfconf.c:166] xfpm_xfconf_load(): Using default configuration for brightness-level-on-battery
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-enabled
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-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-dpms.c:72] xfpm_dpms_set_timeouts(): Settings dpms: standby=480 suspend=0 off=540

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 12157>, 'start-time': <uint64 322906>}), '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 12157>, 'start-time': <uint64 322906>}), '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 12157>, 'start-time': <uint64 322906>}), '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 12157>, 'start-time': <uint64 322906>}), '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)

(xfce4-power-manager:12157): xfce4-power-manager-WARNING **: 03:40:08.647: could not map keysym 1008ffa8 to keycode

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-power.c:929] xfpm_power_get_power_devices(): Power device detected at : /org/freedesktop/UPower/devices/line_power_ucsi_source_psy_USBC000o001
TRACE[xfpm-power.c:888] xfpm_power_add_device(): 'line-power' device added
TRACE[xfpm-dpms.c:72] xfpm_dpms_set_timeouts(): Settings dpms: standby=180 suspend=0 off=240

TRACE[xfpm-dpms.c:347] xfpm_dpms_set_on_battery(): dpms on battery TRUE
TRACE[xfpm-power.c:1449] xfpm_update_blank_time(): Prev Timeout: 120 / 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 12157>, 'start-time': <uint64 322906>}), '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 12157>, 'start-time': <uint64 322906>}), '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: 120
TRACE[xfpm-manager.c:650] xfpm_manager_inhibit_sleep_systemd(): Inhibiting systemd sleep: handle-power-key:handle-suspend-key:handle-hibernate-key

** (xfce4-power-manager:12157): WARNING **: 03:40:08.720: No outputs have backlight property
xfce4-power-manager-Message: 03:40:08.760: Set kernel brightness switch to 0
TRACE[xfpm-backlight.c:269] xfpm_backlight_brightness_on_ac_settings_changed(): Alarm on ac timeout changed 27
TRACE[xfpm-backlight.c:290] xfpm_backlight_brightness_on_battery_settings_changed(): Alarm on battery timeout changed 22

(xfce4-power-manager:12157): xfconf-WARNING **: 03:40:08.768: Failed to set property "xfce4-power-manager::/xfce4-power-manager/brightness-switch": Operation was cancelled
xfce4-power-manager-Message: 03:40:08.798: Set kernel brightness switch to 0
ToZ wrote:

And finally, to make sure you don't have conflicting screensavers daemons running:

ps -ef | grep -E 'screensaver|locker' | grep -v grep
vrgovin+  2803  2655  0 02:46 ?        00:00:00 light-locker

Offline

#4 2024-01-15 22:51:29

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

Re: [SOLVED] system doesn't suspend after locking the screen

Can you post back the output of:

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

I use Devuan -- no systemd

Where does devuan log system messages to then? /var/log/messages? If so, can you post that?

Edit: also:

xfce4-power-manager --dump

Last edited by ToZ (2024-01-15 22:57:06)


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

#5 2024-01-16 12:13:49

vrgovinda
Member
Registered: 2024-01-14
Posts: 10

Re: [SOLVED] system doesn't suspend after locking the screen

ToZ wrote:

Can you post back the output of:

xfconf-query -c xfce4-power-manager -lv
/xfce4-power-manager/battery-button-action              3
/xfce4-power-manager/blank-on-ac                        7
/xfce4-power-manager/blank-on-battery                   2
/xfce4-power-manager/brightness-on-ac                   27
/xfce4-power-manager/brightness-on-battery              22
/xfce4-power-manager/brightness-switch                  0
/xfce4-power-manager/brightness-switch-restore-on-exit  0
/xfce4-power-manager/critical-power-action              3
/xfce4-power-manager/critical-power-level               30
/xfce4-power-manager/dpms-on-ac-off                     9
/xfce4-power-manager/dpms-on-ac-sleep                   8
/xfce4-power-manager/dpms-on-battery-off                4
/xfce4-power-manager/dpms-on-battery-sleep              3
/xfce4-power-manager/general-notification               true
/xfce4-power-manager/handle-brightness-keys             true
/xfce4-power-manager/hibernate-button-action            3
/xfce4-power-manager/inactivity-on-ac                   15
/xfce4-power-manager/inactivity-on-battery              15
/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/presentation-mode                  false
/xfce4-power-manager/show-panel-label                   3
/xfce4-power-manager/show-presentation-indicator        true
/xfce4-power-manager/show-tray-icon                     false
/xfce4-power-manager/sleep-button-action                3
ToZ wrote:

Where does devuan log system messages to then? /var/log/messages? If so, can you post that?

It has 800+ lines. Should I post the entire thing here? Or should I grep some specific things?

ToZ wrote:
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

Offline

#6 2024-01-16 13:28:23

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

Re: [SOLVED] system doesn't suspend after locking the screen

Nothing out of the ordinary there.

ToZ wrote:

Where does devuan log system messages to then? /var/log/messages? If so, can you post that?

It has 800+ lines. Should I post the entire thing here? Or should I grep some specific things?

Anything related to suspend.

-- Otherwise, XScreensaver perfectly fits the bill since after locking the screen, it also suspends the system after the stipulated time.

Perhaps its an issue with light-locker? Can you uninstall it and install xfce4-screensaver and see if that works?


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

#7 2024-01-17 06:17:22

vrgovinda
Member
Registered: 2024-01-14
Posts: 10

Re: [SOLVED] system doesn't suspend after locking the screen

ToZ wrote:

Anything related to suspend.

I'm sorry if I sound silly. Should I type the command " cat /var/log/messages | grep suspend"? If you tell me the exact keyword to be searched for, that'll be helpful.

ToZ wrote:

Perhaps its an issue with light-locker? Can you uninstall it and install xfce4-screensaver and see if that works?

In my repositories, there's nothing by the name "xfce4-screensaver". There's only "xscreensaver".

deb http://deb.devuan.org/merged daedalus main contrib non-free non-free-firmware
deb http://deb.devuan.org/merged daedalus-updates main contrib non-free non-free-firmware
deb http://deb.devuan.org/merged daedalus-security main contrib non-free non-free-firmware
# deb-src http://deb.devuan.org/merged chimaera main non-free contrib
# deb-src http://pkgmaster.devuan.org/merged chimaera-security main contrib non-free
~$ apt-cache search screensaver
libpam-gnome-keyring - PAM module to unlock the GNOME keyring upon login
libxcb-screensaver0 - X C Binding, screensaver extension
xscreensaver-data - Screen saver modules for screensaver frontends
xscreensaver - Screensaver daemon and frontend for X11
xss-lock - invoke external screen lock in response to XScreenSaver events
boinc-screensaver - screen saver auto-controlling volunteer computing
cinnamon-screensaver - Cinnamon screen saver and locker
gir1.2-cscreensaver-1.0 - GObject introspection data for cinnamon screensaver
gnome-screensaver - Screensaver and screen lock formerly used in GNOME
gnome-screensaver-flags - Screensaver for GNOME with flags of the world.
goban-original-games - Original games set for the Goban screensaver
goban-ss - Goban screensaver
kodi - Open Source Home Theatre (executable binaries)
kodi-screensaver-asteroids - Asteroids screensaver for Kodi
kodi-screensaver-biogenesis - BioGenesis screensaver for Kodi
kodi-screensaver-greynetic - Greynetic screensaver for Kodi
kodi-screensaver-pingpong - Pingpong screensaver for Kodi
kodi-screensaver-pyro - Pyro screensaver for Kodi
kodi-screensaver-shadertoy - Shadertoy screensaver for Kodi
libcscreensaver0 - library and introspection data used by cinnamon-screensaver
libopengl-xscreensaver-perl - Perl module for writing OpenGL-based XScreenSaver hacks
librust-x11rb-dev - Rust bindings to X11 - Rust source code
librust-xcb-dev - Rust safe bindings for XCB - Rust source code
libukui-screensaverclient-dev - screensaver settings interfaces
libukui-screensaverclient0 - screensaver settings module
libxcb-screensaver0-dev - X C Binding, screensaver extension, development files
mate-screensaver - MATE screen saver and locker
mate-screensaver-common - MATE screen saver and locker (common files)
pidgin-awayonlock - pidgin plugin to set as away on screensaver activation
pipes-sh - Animated pipes terminal screensaver
rss-glx - Really Slick Screensavers GLX Port
ukui-screensaver - Screensaver for UKUI desktop environment
ukui-screensaverserver - screensaver settings service process
unicode-screensaver - screensaver displaying unicode characters
xscreensaver-data-extra - Extra screen saver modules for screensaver frontends
xscreensaver-gl - GL(Mesa) screen saver modules for screensaver frontends
xscreensaver-gl-extra - Extra GL(Mesa) screen saver modules for screensaver frontends
xscreensaver-screensaver-bsod - BSOD screen saver module from XScreenSaver
xscreensaver-screensaver-dizzy - Graphics demo that makes you dizzy (XScreenSaver hack)
xscreensaver-screensaver-webcollage - Webcollage screen saver module from XScreenSaver

As I had mentioned earlier, XScreensaver is good. But it should default to English keyboard input when it prompts to login irrespective of the current input language that is being used. Is that possible?

Offline

#8 2024-01-17 11:47:15

eriefisher
Member
From: ON, Canada
Registered: 2008-10-25
Posts: 415

Re: [SOLVED] system doesn't suspend after locking the screen

Just searching the cache is too restrictive.

apt update
apt search xfce4-screensaver
apt install xfce4-screensaver

Siduction
Debian Sid
Xfce 4.18

Offline

#9 2024-01-17 12:02:26

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

Re: [SOLVED] system doesn't suspend after locking the screen

vrgovinda wrote:

As I had mentioned earlier, XScreensaver is good. But it should default to English keyboard input when it prompts to login irrespective of the current input language that is being used. Is that possible?

With respect to getting xscreensaver to work with different keyboard layouts, have a read through lzack's solution at this link. They use a script to monitor the state of xscreensaver to change the keyboard layout if xscreensaver is active. You'll need to change the line:

setxkbmap us,il,us

...to match your specific keyboard layouts.

You need to have this script in the background - so once you have it worked out, add it to Settings Manager > Session and Startup > Application startup.


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

#10 2024-01-23 16:06:44

vrgovinda
Member
Registered: 2024-01-14
Posts: 10

Re: [SOLVED] system doesn't suspend after locking the screen

eriefisher wrote:

Just searching the cache is too restrictive.

apt update
apt search xfce4-screensaver
apt install xfce4-screensaver
 vrgovinda~$ apt search xfce4-screensaver
Sorting... Done
Full Text Search... Done

Offline

#11 2024-01-23 16:18:52

vrgovinda
Member
Registered: 2024-01-14
Posts: 10

Re: [SOLVED] system doesn't suspend after locking the screen

ToZ wrote:
vrgovinda wrote:

As I had mentioned earlier, XScreensaver is good. But it should default to English keyboard input when it prompts to login irrespective of the current input language that is being used. Is that possible?

With respect to getting xscreensaver to work with different keyboard layouts, have a read through lzack's solution at this link. They use a script to monitor the state of xscreensaver to change the keyboard layout if xscreensaver is active. You'll need to change the line:

setxkbmap us,il,us

...to match your specific keyboard layouts.

You need to have this script in the background - so once you have it worked out, add it to Settings Manager > Session and Startup > Application startup.

xscreensaver-command --watch | 
  while read MSG; do
    CMD=`echo $MSG | awk '{print $1}'`
    if [[ "$CMD" == "LOCK" ]]; then
        ##### CURRENTL=$(setxkbmap -query | grep layout | awk '{print $2}')
        echo "Locked with current layout ${CURRENTL}"
        setxkbmap us
    fi

1. here CURRENTL initialization is commented ... How will the next line be executed, since CURRENTL is not initialized anywhere else?

2. I don't mind if the keyboard input changes to English every time after screen lock. I can always switch to any other language in a moment.
So I guess I can safely make "us" as the default after resuming from the lock state.

if [[ "$CMD" == "UNBLANK" ]]; then
        ##### setxkbmap $CURRENTL
        setxkbmap us
        echo -n "Returning to "
        setxkbmap -query | grep layout | awk '{ print $2 }'
    fi
    # echo $CMD

3. I use ibus for switching keyboard layouts. Will that matter while executing this script?
Please advise.

Last edited by vrgovinda (2024-01-23 17:00:05)

Offline

#12 2024-01-23 19:43:00

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

Re: [SOLVED] system doesn't suspend after locking the screen

vrgovinda wrote:

1. here CURRENTL initialization is commented ... How will the next line be executed, since CURRENTL is not initialized anywhere else?

The value of CURRENTL will be null or a blank string. Looks like setxkbmap does nothing when a null or blank string it sent to it

2. I don't mind if the keyboard input changes to English every time after screen lock. I can always switch to any other language in a moment.
So I guess I can safely make "us" as the default after resuming from the lock state.

Makes sense

3. I use ibus for switching keyboard layouts. Will that matter while executing this script?
Please advise.

I don't use ibus so I'm not sure what will happen. Perhaps a test is in order?


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

#13 2024-01-24 14:37:20

vrgovinda
Member
Registered: 2024-01-14
Posts: 10

Re: [SOLVED] system doesn't suspend after locking the screen

it works like a charm! I changed the line

 setxkbmap us,il,us 

to

 setxkbmap us 

since I don't mind changing the keyboard layout to another language after logging in from the lock screen. It hardly takes a moment.

Made the file as a executable and added to the Sessions and Startup.

Thanks ToZ. As helpful as ever!

Offline

Board footer

Powered by FluxBB