I’m running Manjaro with xmonad and lightdm on Nvidia proprietary drivers, and I’m encountering weird black screen issues with lightdm.
When I boot up and systemd automatically starts lightdm, everything works just fine. However, once I’m logged into xmonad and I quit the xmonad session, or run
sudo systemctl restart lightdm, a black screen will be thrown. The black screen is not a turned-off display, as I can clearly see the backlight bleed of my monitor. The way to get graphics to show up again is to switch to a tty terminal and then switch back.
Interestingly, I can still log in without seeing anything. That is, I can fill in my password, press enter, and I’m in my xmonad session, with a blank screen. I can also open up a few terminals with keyboard shortcuts as a test. After the tty trick, xmonad with my open terminals rather than lightdm shows up.
I tried sddm and the same issues appear. Using earlier kernels (5.4 lts) also didn’t help. I tried this on my laptop with intel integrated graphics, and it has no blank screen issues. So I think it’s some issues of xorg and Nvidia driver not liking each other. There has to be something happening during the switch to tty and back, and if I can run that in a script, I can put that in display-stopped-script or display-setup-script or session-cleanup-script and that should solve this issue.
I am stuck with the proprietary software as I need to run CUDA calculations, so the option of using mesa/Nouveau is out of question for me.