You are not logged in.
Hi folks,
I'm having an issue on my desktop computer where I lock my screen with "loginctl lock-session" (or "dm-tool lock", or "light-locker-command -l" - it's always the same behavior) and, when I unlock it through the LightDM screen, I'm sent to either a black screen with the mouse cursor working (but unable to operate the desktop) or a frozen screen of the desktop. Usually I just restart i3 with my key binding and it's fine, I get the desktop back, but sometimes it doesn't work so I have to enter another TTY and run "systemctl restart lightdm.service", which is rather annoying since it starts my desktop from scratch (in terms of state).
Here's the stuff I'm using (i3lock is installed, but I'm not currently using it - and uninstalling it didn't fix the issue):
$ pacman -Qi lightdm light-locker xss-lock i3-wm i3lock nvidia systemd lightdm-gtk-greeter lightdm-gtk-greeter-settings picom | grep -E '(Nome|Vers)'
Nome : lightdm
Versão : 1:1.32.0-6
Nome : light-locker
Versão : 1.9.0-5
Nome : xss-lock
Versão : 0.3.0.r30.gac39fdc-1
Nome : i3-wm
Versão : 4.24-1
Nome : i3lock
Versão : 2.15-2
Nome : nvidia
Versão : 570.133.07-5
Nome : systemd
Versão : 257.5-2
Nome : lightdm-gtk-greeter
Versão : 1:2.0.9-1
Nome : lightdm-gtk-greeter-settings
Versão : 1.2.3-3
Nome : picom
Versão : 12.5-1
$ uname -a
Linux diogobaeder-desktop 6.14.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 10 Apr 2025 18:43:59 +0000 x86_64 GNU/Linux
$ sudo lsmod | grep -i nvidia
nvidia_drm 135168 12
drm_ttm_helper 16384 2 nvidia_drm
nvidia_uvm 3792896 0
nvidia_modeset 1830912 17 nvidia_drm
video 81920 1 nvidia_modeset
nvidia 97095680 215 nvidia_uvm,nvidia_modesetMore info about light-locker:
$ light-locker --debug
[gs_debug_init] ../light-locker/src/gs-debug.c:106 (10:29:52): Debugging enabled
[main] ../light-locker/src/light-locker.c:138 (10:29:52): initializing light-locker 1.9.0
[main] ../light-locker/src/light-locker.c:139 (10:29:52): Platform:
gtk: 3
systemd: yes
UPower: yes
[main] ../light-locker/src/light-locker.c:155 (10:29:52): Features:
lock-after-screensaver: yes
late-locking: yes
lock-on-suspend: yes
lock-on-lid: yes
settings backend: GSETTINGS
[main] ../light-locker/src/light-locker.c:188 (10:29:52): lock after screensaver 5
[main] ../light-locker/src/light-locker.c:189 (10:29:52): late locking 1
[main] ../light-locker/src/light-locker.c:190 (10:29:52): lock on suspend 1
[main] ../light-locker/src/light-locker.c:191 (10:29:52): lock on lid 1
[main] ../light-locker/src/light-locker.c:192 (10:29:52): idle hint 0
[init_session_id] ../light-locker/src/gs-listener-dbus.c:2234 (10:29:52): Got session-id: /org/freedesktop/login1/session/_36
[find_graphical_session] ../light-locker/src/gs-listener-dbus.c:2104 (10:29:52): Finding a graphical session for user 1000
[init_session_id] ../light-locker/src/gs-listener-dbus.c:2245 (10:29:52): Got sd-session-id: /org/freedesktop/login1/session/_36
[init_seat_path] ../light-locker/src/gs-listener-dbus.c:2326 (10:29:52): Got seat: /org/freedesktop/DisplayManager/Seat0
[gs_listener_delay_suspend] ../light-locker/src/gs-listener-dbus.c:414 (10:29:52): Delay suspend
** (light-locker:32081): WARNING **: 10:29:52.884: screensaver already running in this sessionI'm running almost the same stuff on my laptop though, and there I don't have the same issue.
Any ideas or hints for what I can do to fix this? I feel like I'm doing something wrong, or configured something wrong, but I can't figure out what.
Thanks in advance! ![]()
[EDIT 1] Updated packages.
[EDIT 2] I tried using lightdm-slick-greeter, but it didn't fix the issue.
[EDIT 3] Notes:
I just tried it again a few times right after booting my computer, and these were my results:
1. It didn't go to the black page on the first unlock
2. It went to the black page on the second unlock, but after a few seconds waiting the normal screen showed up
3. On the third attempt, it showed up just fine after unlocking
So this issue seems to be related to timing, from some tool somewhere.
[EDIT 4] I ended up switching to i3lock, which is not my favorite, but it does the job well. If I can find a solution to using light-locker, though, I'd rather use it instead.
Last edited by diogobaeder (2025-05-04 14:01:25)
Diogo Baeder
http://diogobaeder.com.br/
Offline
Forgot to include these, sorry:
$ pacman -Qi lightdm-gtk-greeter lightdm-gtk-greeter-settings | grep -E '(Nome|Vers)'
Nome : lightdm-gtk-greeter
Versão : 1:2.0.9-1
Nome : lightdm-gtk-greeter-settings
Versão : 1.2.3-3Diogo Baeder
http://diogobaeder.com.br/
Offline
I tried switching to lightdm-slick-greeter, but it didn't fix the issue.
Diogo Baeder
http://diogobaeder.com.br/
Offline
I just tried it again a few times right after booting my computer, and these were my results:
1. It didn't go to the black page on the first unlock
2. It went to the black page on the second unlock, but after a few seconds waiting the normal screen showed up
3. On the third attempt, it showed up just fine after unlocking
So this issue seems to be related to timing, from some tool somewhere.
Diogo Baeder
http://diogobaeder.com.br/
Offline
I ended up switching to i3lock, which is not my favorite, but it does the job well. If I can find a solution to using light-locker, though, I'd rather use it instead.
Diogo Baeder
http://diogobaeder.com.br/
Offline
https://aur.archlinux.org/packages/i3lock-color
Do you run a compositor (picom) next to i3wm?
Friendly reminder to please edit you previous post instead of bumping if nobody has yet replied (you're making it look like there's already action on this thread while it's actually just a monologue)
Online
Sorry about that, @seth. I tried deleting my previous replies, but couldn't find how to (maybe it's intended). Anyway, I added the edits to the original post.
I'm running with picom, yes. Do you think it might be related?
Diogo Baeder
http://diogobaeder.com.br/
Offline
I'm running with picom, yes. Do you think it might be related?
I'll decide my position on that after you've reported the behavior w/o picom - if there's no problem w/o picom, that's obviously what I meant.
Otherwise the question has been for some random survey on desktop environments ![]()
Online
Alright, I bypassed the picom startup and it does seem to solve the issue - now I can lock my screen with "dm-tool lock" or "loginctl lock-session $XDG_SESSION_ID" and unlock it just fine, I get my screen back without having to restart i3. I did get a weird window blackout for a few seconds though (with polybar still showing fine) but it happened about half a minute after I unlocked, so it doesn't seem to be part of the same issue.
Any ideas why picom might trigger this issue? I can live without it, of course, but it would be cool if I could still use it but without the issue...
Thanks for the help, man!
[EDIT 1] Seeing other threads about issues with picom, I tried:
- Adding nvidia.NVreg_PreserveVideoMemoryAllocations=1 or nvidia.NVreg_PreserveVideoMemoryAllocations=0
- Removing "kms" from HOOKS in mkinitcpio.conf (since I'm using early-loading with "nvidia-drm.modeset=1 nvidia-drm.fbdev=1"
but neither of these worked.
Last edited by diogobaeder (2025-04-20 18:33:50)
Diogo Baeder
http://diogobaeder.com.br/
Offline
See, I'm a genius. Told you so.
VRAM preservation being the problem is likely a good call - it's why I asked for picom.
For an immediate mitigation, just kill and restart picom w/ some https://wiki.archlinux.org/title/Power_ … stem-sleep (you'll have to "sudo -u diogobaeder" and import or hardcode the proper DISPLAY, https://gist.github.com/AladW/de1c5676d93d05a5a0e1 )
NVreg_PreserveVideoMemoryAllocations is default for the current nvidia drivers (or do you use the 470xx/390xx ones?), disabling the parameter will likely get you complaints from the userspace services
https://wiki.archlinux.org/title/NVIDIA … er_suspend
If you have lots of (free) RAM compared to your VRAM demands you could try to store the VRAM there (ie. in /tmp or any other tmpfs) but I suspect lightlocker might cause some VT switch (ctrl+alt+f3 - a - like) and the nvidia driver notriously struggles with that. Have you tried "nvidia-drm.fbdev=0"?
It's kinda off for that symptom, but you could also try to disable the https://wiki.archlinux.org/title/NVIDIA … P_firmware
I did get a weird window blackout for a few seconds though (with polybar still showing fine) but it happened about half a minute after I unlocked
Hardware accelerated (incl. browser)?
Online
Indeed you are! ![]()
I'm using nvidia 570. I tried "nvidia.NVreg_EnableGpuFirmware=0" and "nvidia-drm.fbdev=0", but they didn't work.
[EDIT 1] I also tried with the "glx" backend instead of "xrender", but it didn't work either. Interestingly, I saw some thread somewhere where a guy said he could still blindly click things, and I tried exiting i3 trying to guess where the button would be, and it worked. Of course, it doesn't help me or solve the issue at all, but I find it interesting that interaction seems to be working, so it's really just a problem with screen rendering...
[EDIT 2] I removed picom and installed xcompmgr, and it works great. Sure, not all of the features from picom are available, but it seems to be quite stable, and it doesn't cause issues during unlocks (like picom does), so for now I guess I'll just stick with it.
Last edited by diogobaeder (2025-04-21 02:07:45)
Diogo Baeder
http://diogobaeder.com.br/
Offline
Sure the picom xrender backend is/was affected?
Do you get any messages (error or otherwise) in the journal after unlocking?
I'd probably kill-restart picom around the lock (the genius might have paid insufficient attention here, simply locking is sufficient? You do not have to sleep the system?) resp. move to i3lock or xscreensaver etc. to avoid the framebuffer switch (because of the other black windows - I assume you might get into trouble w/ video playback as well?)
Online
Sorry for the long delay to reply to this.
I went to a much simpler setup in general: xcompmgr, light-locker and that's it. No more issues with weird locks/unlocks.
But thanks a lot for the help much appreciated! Should I change the thread topic to "[SOLVED]"? (I got to a setup I like, but not by actually solving the issues I was having with the other technologies)
Diogo Baeder
http://diogobaeder.com.br/
Offline
"[SIDE-STEPPED]" ![]()
It's still valuable information f or others since you identified the cause/conflict in the setup, alternatives and workarounds.
Online
Thanks!
To summarize what I did (hopefully it's helpful for others):
Adopted the older xcompmgr instead of picom
Stopped using i3lock or its variants, but instead I'm relying on light-locker
Stopped using xss-lock, since light-locker already catches system events like suspend (but it has to be running to catch them), and, this way, when my system suspends it also locks the screen - such that I need to type my password to unlock after suspending
Diogo Baeder
http://diogobaeder.com.br/
Offline
Hi there
I'm not reading all floors of this thread, but I have the same issue which is described by the title of this thread.
I think I resolved this problem by changing this parameter of picom to false:
unredir-if-possible = false;Offline
rules: (
…
{ match = "class_g = 'i3lock'"; unredir = false; };
…
)didn't check whether the class check is actually correct (googled it up) but makes sense
This should™ limit the forced redirection to i3lock and leave mpv or superturboturkeypuncher³ alone.
Online
Unfortunately that didn't work for me, still getting black screen when using picom... but that's fine, I'm still happy enough with xcompmgr (a few glitches here and there, but fairly usable).
Diogo Baeder
http://diogobaeder.com.br/
Offline