-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
betterlockscreen automatically disabled by systemd after sleep #213
Comments
Could you provide the content of your system-service-file and check Edit: I guess it has todo with --off 10, but I will have to check the according code later, can you try without? You mean with "when your system starts" after sleep/suspend, right? Could be realted to bug submitted in #212 |
Yes, I mean when my system is waking from suspend/suspend-then-hibernate. The following is my journalctl log when my system is waking from hibernate and I see the lockscreen for a brief period:
This is my betterlockscreen@.service file
Running the command with Edit: removing |
Update: i got the service to work by deleting the system-service-file and creating a new one with the exact same contents. It seems like it was a problem with my system and not a bug in the package. I will close the issue with this. |
I just got the same thing service statussystemctl status betterlockscreen@USER
○ betterlockscreen@USER.service - Lock screen when going to sleep/suspend
Loaded: loaded (/usr/lib/systemd/system/betterlockscreen@.service; enabled; vendor preset: disabled)
Active: inactive (dead)
Mar 04 12:53:00 MACHINE betterlockscreen[11071]: [*] Running postlock...
Mar 04 12:53:00 MACHINE systemd[1]: betterlockscreen@USER.service: Deactivated successfully.
Mar 04 13:28:29 MACHINE systemd[1]: Starting Lock screen when going to sleep/suspend...
Mar 04 13:28:29 MACHINE betterlockscreen[17667]: [B] Betterlockscreen
Mar 04 13:28:29 MACHINE betterlockscreen[17667]: [*] Running prelock...
Mar 04 13:28:29 MACHINE betterlockscreen[17667]: [*] Locking screen...
Mar 04 13:28:30 MACHINE systemd[1]: Started Lock screen when going to sleep/suspend.
Mar 04 13:28:49 MACHINE i3lock[17680]: pam_systemd_home(i3lock:auth): systemd-homed is not available: Unit dbus-org.freedes>
Mar 04 13:28:49 MACHINE betterlockscreen[17667]: [*] Running postlock...
Mar 04 13:28:49 MACHINE systemd[1]: betterlockscreen@USER.service: Deactivated successfully. Settings of the bls [Unit]
Description = Lock screen when going to sleep/suspend
Before=sleep.target
Before=suspend.target
[Service]
User=%I
Type=simple
Environment=DISPLAY=:0
ExecStart=/usr/bin/betterlockscreen --lock
TimeoutSec=infinity
ExecStartPost=/usr/bin/sleep 1
[Install]
WantedBy=sleep.target
WantedBy=suspend.target Tried to recreate the service file, enabled the service and laptop went to sleep. One time it works from the second and so on it stops working. package version $ betterlockscreen --version
Betterlockscreen: version: v4.0.3 (dunst: false, feh: true)
i3lock: version 2.13.c.4 © 2010 Michael Stapelberg, © 2015 Cassandra Fox, © 2021 Raymond Li
Version: ImageMagick 7.1.0-26 Q16-HDRI x86_64 2022-02-21 https://imagemagick.org
Copyright: (C) 1999-2021 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenCL OpenMP(4.5)
Delegates (built-in): bzlib cairo djvu fontconfig freetype heic jbig jng jp2 jpeg jxl lcms lqr ltdl lzma openexr pangocairo png raqm raw rsvg tiff webp wmf x xml zip zlib
Compiler: gcc (11.2)
feh version 3.8
Compile-time switches: curl exif inotify help stat64 verscmp xinerama journalctl logs Mar 04 14:53:22 MACHINE systemd[1]: betterlockscreen@USER.service: Deactivated successfully.
Mar 04 14:53:22 MACHINE betterlockscreen[19993]: [*] Running postlock...
Mar 04 14:53:22 MACHINE betterlockscreen[20006]: i3lock: Cannot grab pointer/keyboard |
@daxsis Did you solve the issue and if not can you check if you have polkit installed/try to install it and retry? #377 (comment) |
I had the same problem. After reading your comment, I doubted that this would work, because I have already tried everything. But it helped, I don't know why. |
I just encountered the same problem. Having created a restore point, I went to experiment. So, in the In addition, another problem arose. When exiting suspend, fingerprint login does not work. While simply I'll try to figure it out tomorrow, but I don't mind listening to your guesses on what to do. |
Are you sure you have the latest release? |
betterlockscreen -v
Betterlockscreen: version: v4.2.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-15 Q16-HDRI x86_64 21298 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenCL OpenMP(4.5)
Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype heic jbig jng jp2 jpeg jxl lcms lqr ltdl lzma openexr pangocairo png raqm raw rsvg tiff webp wmf x xml zip zlib
Compiler: gcc (13.2)
feh version 3.10
Compile-time switches: curl exif inotify help magic stat64 verscmp xinerama package installed from AUR |
Can you place set -x at the top of betterlockscreen and post the full output for more information's please? |
Output
Output
Output
|
Betterlockscreen always seems to run in failsafe mode as required cache-files are missing:
Did you let betterlockscreen generate the composed images before running? (see examples-section for command) |
The above logs were presented with unavailable images. After a while, here is the log The behavior is as follows: launching systemctl suspend starts betterlockscreen, and only after entering the password the system goes into suspend. Unfortunately, I set launch to a keyboard shortcut and do not use launch with suspend. Therefore, I can hardly take part in solving this bug
|
When I try to use the provided systemd service, I see the lockscreen for a second when my system starts but then it automatically logs in. When I checked the logs with
systemctl status
, I get the following output:My systemd service ws working fine until the last commit but I have no idea why it is failing now. Any solutions?
The text was updated successfully, but these errors were encountered: