You are not logged in.

#1 2025-04-19 13:37:24

diogobaeder
Member
Registered: 2012-01-02
Posts: 67

Black screen + mouse cursor after unlocking with light-lock + i3

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_modeset

More 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 session

I'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! smile

[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 (Yesterday 10:35:27)

Offline

#2 2025-04-19 13:48:09

diogobaeder
Member
Registered: 2012-01-02
Posts: 67

Re: Black screen + mouse cursor after unlocking with light-lock + i3

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-3

Offline

#3 2025-04-19 14:40:13

diogobaeder
Member
Registered: 2012-01-02
Posts: 67

Re: Black screen + mouse cursor after unlocking with light-lock + i3

I tried switching to lightdm-slick-greeter, but it didn't fix the issue.

Offline

#4 2025-04-19 17:01:05

diogobaeder
Member
Registered: 2012-01-02
Posts: 67

Re: Black screen + mouse cursor after unlocking with light-lock + i3

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.

Offline

#5 2025-04-19 23:20:50

diogobaeder
Member
Registered: 2012-01-02
Posts: 67

Re: Black screen + mouse cursor after unlocking with light-lock + i3

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.

Offline

#6 Yesterday 08:26:19

seth
Member
Registered: 2012-09-03
Posts: 62,832

Re: Black screen + mouse cursor after unlocking with light-lock + i3

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)

Offline

#7 Yesterday 10:37:17

diogobaeder
Member
Registered: 2012-01-02
Posts: 67

Re: Black screen + mouse cursor after unlocking with light-lock + i3

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?

Offline

#8 Yesterday 16:30:03

seth
Member
Registered: 2012-09-03
Posts: 62,832

Re: Black screen + mouse cursor after unlocking with light-lock + i3

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 tongue

Offline

#9 Yesterday 17:51:31

diogobaeder
Member
Registered: 2012-01-02
Posts: 67

Re: Black screen + mouse cursor after unlocking with light-lock + i3

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 (Yesterday 18:33:50)

Offline

#10 Yesterday 21:02:25

seth
Member
Registered: 2012-09-03
Posts: 62,832

Re: Black screen + mouse cursor after unlocking with light-lock + i3

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)?

Offline

Board footer

Powered by FluxBB