The officially official Devuan Forum!

You are not logged in.

#1 2022-01-21 13:12:04

devlan
Member
Registered: 2019-08-17
Posts: 13  

[SOLVED] screen is not locked when suspend is activated by closing the lid

Hello,

if the laptop lid is closed, then the laptop is put into standby mode, but the screen is not locked. I.e. after opening the lid, the screen is not locked.

But when the standby button is pressed, the screen is locked and the laptop goes into standby mode.
Could this be a bug in elogind, which does the job of monitoring lid closure?

~$ cat /etc/devuan_version 
chimaera

~$ xfconf-query -c xfce4-power-manager -l -v
/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/inactivity-on-battery              46
/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

~$ xfconf-query -c xfce4-session -l -v
/general/FailsafeSessionName          Failsafe
/general/LockCommand                  
/general/PromptOnLogout               false
/general/SessionName                  Default
/sessions/Failsafe/Client0_Command    <<UNSUPPORTED>>
/sessions/Failsafe/Client0_PerScreen  false
/sessions/Failsafe/Client0_Priority   15
/sessions/Failsafe/Client1_Command    <<UNSUPPORTED>>
/sessions/Failsafe/Client1_PerScreen  false
/sessions/Failsafe/Client1_Priority   20
/sessions/Failsafe/Client2_Command    <<UNSUPPORTED>>
/sessions/Failsafe/Client2_PerScreen  false
/sessions/Failsafe/Client2_Priority   25
/sessions/Failsafe/Client3_Command    <<UNSUPPORTED>>
/sessions/Failsafe/Client3_PerScreen  false
/sessions/Failsafe/Client3_Priority   30
/sessions/Failsafe/Client4_Command    <<UNSUPPORTED>>
/sessions/Failsafe/Client4_PerScreen  false
/sessions/Failsafe/Client4_Priority   35
/sessions/Failsafe/Count              5
/sessions/Failsafe/IsFailsafe         true
/shutdown/LockScreen                  true

Thank you!

Kind regards
Klaus

Offline

#2 2022-01-21 14:59:42

devlan
Member
Registered: 2019-08-17
Posts: 13  

Re: [SOLVED] screen is not locked when suspend is activated by closing the lid

Maybe the developers can provide a way for pre/post hooks for the devuan version of elogind?

Offline

#3 2022-01-22 11:50:26

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 2,733  

Re: [SOLVED] screen is not locked when suspend is activated by closing the lid

See https://www.linuxquestions.org/question … ost6214885 — is that setting enabled for the screensaver?


"Who's the idiot in charge?" — ralph.ronnquist

Offline

#4 2022-01-22 15:00:29

devlan
Member
Registered: 2019-08-17
Posts: 13  

Re: [SOLVED] screen is not locked when suspend is activated by closing the lid

Hello,

thanks for your reply!

the package xfce4-screensaver as mentioned in the post is not present on my system and cannot be installed. The existing version of xfce4 uses xscreensaver as a screen lock.

Kind regards,
Klaus

Offline

#5 2022-01-22 15:57:10

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,152  

Re: [SOLVED] screen is not locked when suspend is activated by closing the lid

I have xscreensaver disabled and let xfce4-power-manager handle suspend and lock when lid is closed.

Offline

#6 2022-01-22 16:11:44

devlan
Member
Registered: 2019-08-17
Posts: 13  

Re: [SOLVED] screen is not locked when suspend is activated by closing the lid

when i uninstall xscreensaver, the screen is not locked at all. Could it be that you have installed another package that locks the screen?

Offline

#7 2022-01-22 16:21:40

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,152  

Re: [SOLVED] screen is not locked when suspend is activated by closing the lid

xscreensaver is installed and set to run in the desktop's startup applications. It is disabled in the Screensaver settings.
xfce4-power-manager is set to suspend on lid closing. It is not set to lock the screen.

Closing lid puts computer into suspend and locks the screen. When I raise the lid, I get the xscreensaver login screen.

This is in Chimaera.

Offline

#8 2022-01-22 18:38:12

devlan
Member
Registered: 2019-08-17
Posts: 13  

Re: [SOLVED] screen is not locked when suspend is activated by closing the lid

Hello and thank you for the settings.

I think it is a different problem. If I set the settings as you suggested, then the screen does not respond to input after the lid is opened again.
I see the screen with all programs open, but I can't make any input. I notice that I can only move the mouse in a very small rectangular area in the middle of the screen.
I then noticed that the area is the same size as the xscreensaver window, which is the unlock screen. Only that it is not visible. If I then "blindly" enter my password, the screen gets unlocked.

Who has an idea what else I could check, why the screen does not go black and the xscreensaver unlock screen is not visible?

Many thanks!
Klaus

Offline

#9 2022-01-22 22:18:41

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,152  

Re: [SOLVED] screen is not locked when suspend is activated by closing the lid

I don't know if this is helpful:

$ dpkg -l |grep input
ii  libinput-bin                         1.16.4-3                               amd64        input device management and event handling library - udev quirks
ii  libinput10:amd64                     1.16.4-3                               amd64        input device management and event handling library - shared library
ii  libxcb-xinput0:amd64                 1.14-3                                 amd64        X C Binding, xinput extension
ii  xinput                               1.6.3-1                                amd64        Runtime configuration and test of XInput devices
ii  xserver-xorg-input-libinput          0.30.0-1                               amd64        X.Org X server -- libinput input driver

$ dpkg -l |grep evdev
ii  libevdev2:amd64                      1.11.0+dfsg-1                          amd64        wrapper library for evdev devices

Offline

#10 2022-01-23 11:17:40

devlan
Member
Registered: 2019-08-17
Posts: 13  

Re: [SOLVED] screen is not locked when suspend is activated by closing the lid

I was able to solve my problem with the following setting:

lspci|grep VGA
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)

Created /etc/X11/xorg.conf.d/20-intel.conf

Section "Device"
  Identifier  "Intel Graphics"
  Driver      "intel"
  Option      "TearFree" "true"
EndSection

Thanks a lot for your support!

Kind regards
Klaus

Offline

#11 2022-01-23 13:39:04

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 2,733  

Re: [SOLVED] screen is not locked when suspend is activated by closing the lid

The DDX driver shouldn't affect the screensaver locking hmm

And note that the recommendation is to remove xserver-xorg-video-intel and use X's builtin modesetting driver instead. The Intel version is known to be buggy, especially for modern chips.

Use Wayland to manage tearing. X is useless for that.


"Who's the idiot in charge?" — ralph.ronnquist

Offline

#12 2022-01-23 15:25:26

devlan
Member
Registered: 2019-08-17
Posts: 13  

Re: [SOLVED] screen is not locked when suspend is activated by closing the lid

Yes, you are right. It only turned out during testing that it has nothing to do with the function of xscreensaver, but with a display problem.
If I disable /etc/X11/xorg.conf.d/20-intel.conf, then the screen is not blacked out and the xscreensaver locking screen is not visible. See my post #8
Thanks for the tips on the display driver. But if I uninstall xserver-xorg-video-intel and modesetting_drv.so is loaded, then I have the same problem again. Maybe there is also an option needed for the modesetting driver?

Offline

Board footer