When I try to play 3D games and the laptop switches to the discrete graphics (Nvidia RTX 4060, driver version 615.71.09), after 2-3 minutes it tries to go to sleep. It doesn’t actually go to sleep, but that’s because of another known issue with Ethernet not changing its power state.
The laptop wakes up, but when I’m on the login screen, I can’t even type my password because it goes to sleep again. I checked the journal, and it seems that within less than 3 minutes, the system registered 6 lid closings.
I turned off sleep on lid close, but the screen still turns off. I’ve been using this system for a year and this problem never occurred before. Also it does not occur on X11 session, or sway (but there screen freezes and i can unfreeze it when I change desktop)
My question is why does `systemd-logind[773]: Lid closed.` happens on KDE (wayland) and how to fix it.
Edit: it happens sway too, even after reinstall.