-
Notifications
You must be signed in to change notification settings - Fork 177
Description
Is there an existing issue for this?
- I have searched the existing issues
Operating system
Gentoo
Installation method
Package Manager (from OS)
Betterlockscreen & Dependency-Versions
% betterlockscreen -v
Betterlockscreen: version: v4.3.0 (dunst: false, feh: true)
i3lock: version 2.13.c.5 © 2010 Michael Stapelberg, © 2015 Cassandra Fox, © 2021 Raymond Li
Version: ImageMagick 7.1.1-38 Q16 x86_64 22398 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP(4.5)
Delegates (built-in): bzlib cairo freetype heic jng jpeg jxl lcms ltdl pangocairo png rsvg tiff webp x xml zlib zstd
Compiler: gcc (13.3)
feh version 3.10.3
Compile-time switches: exif verscmp
[B] BetterlockscreenBug description
- X11
- AwesomeWM
I'm using the following systemd service adapted from [email protected] to lock my session before suspending:
/etc/systemd/system/[email protected]:
[Unit]
Description=Lock screen before suspend/hibernate
Before=suspend.target
Before=suspend-then-hibernate.target
Before=hibernate.target
Before=hybrid-sleep.target
Before=sleep.target
[Service]
User=%I
Type=simple
Environment=DISPLAY=:0
ExecStart=/usr/bin/betterlockscreen --lock -- --color 000000
TimeoutSec=infinity
ExecStartPost=/usr/bin/sleep 1
[Install]
WantedBy=suspend.target
WantedBy=suspend-then-hibernate.target
WantedBy=hibernate.target
WantedBy=hybrid-sleep.target
WantedBy=sleep.targetenabled with
% sudo systemctl enable lock-screen-suspend-hibernate@$USER.serviceOften (doesn't always happen but still quite frequent since I suspend a lot) after resuming from suspend:
- The monitor stays blank (I can't see
betterlockscreen) but never turns off. - At this point, I can't do anything but after reconnecting either my mouse or my keyboard (seems random, sometimes I have to reconnect both), I'm back to the desktop but I can't do anything (mouse movements and keyboard inputs not detected).
Then, I switch to TTY2 and log as root. I can see two i3lock processes in bottom task manager.
After killing one of the i3lock processes (that kills both actually) and switching back to TTY1, I'm back to my desktop and I can use my mouse/keyboard just fine.
Note that this completely bypass betterlockscreen which is another issue.
If that matters, I'm also using a systemd user service to run xidlehook:
$HOME/.config/systemd/user/xidlehook.service
[Unit]
Description=Automatically lock screen with Xidlehook
StartLimitBurst=2
[Service]
Type=simple
Environment=DISPLAY=:0
Environment=XIDLEHOOK_SOCK=%t/xidlehook.socket
ExecStart=/usr/bin/xidlehook \
--detect-sleep \
--not-when-audio \
--not-when-fullscreen \
--socket $XIDLEHOOK_SOCK \
--timer 300 \
'/usr/bin/betterlockscreen --lock --off 30 -- --color 000000' \
''
Restart=on-failure
RestartSec=30s
[Install]
WantedBy=default.targetMy betterlockscreen config:
~/.config/betterlockscreen/betterlockscreenrc
loginbox=00000000
loginshadow=00000000
locktext=""
font="JetBrainsMono NF Medium"
ringcolor=1e1e20
insidecolor=1e1e20
separatorcolor=00000000
ringvercolor=fab387
insidevercolor=1e1e20
ringwrongcolor=f38ba8
insidewrongcolor=1e1e20
timecolor=cdd6f4
time_format="%H:%M"
greetercolor=00000000
layoutcolor=00000000
keyhlcolor=a6e3a1
bshlcolor=f38ba8
veriftext=""
verifcolor=00000000
wrongtext="Wrong password"
wrongcolor=f38ba8
modifcolor=f38ba8
bgcolor=00000000Steps to reproduce
No response
Relevant log output
Relevant part of journalctl after resuming from suspend:
gentoo-desktop systemd-logind[2034]: Operation 'suspend' finished.
gentoo-desktop systemd[1]: Stopped target Suspend.
gentoo-desktop betterlockscreen[50957]: [B] Betterlockscreen
gentoo-desktop betterlockscreen[50957]: [*] Running prelock...
gentoo-desktop betterlockscreen[50957]: [*] Locking screen... (FAILSAFE MODE)
gentoo-desktop betterlockscreen[51153]: Could not open image file /home/xfzv/.cache/betterlockscreen/current/lock_resize.png: No such file or directory
# Logging as root on TTY2
gentoo-desktop systemd[1]: Started Getty on tty2.
gentoo-desktop login[51650]: pam_unix(login:session): session opened for user root(uid=0) by root(uid=0)
gentoo-desktop login[51701]: ROOT LOGIN on '/dev/tty2'
# After killing the `i3lock` processes
gentoo-desktop betterlockscreen[50957]: Terminated
gentoo-desktop betterlockscreen[50957]: [*] Running postlock...
gentoo-desktop systemd[1]: [email protected]: Deactivated successfully.
gentoo-desktop login[51650]: pam_unix(login:session): session closed for user root