Solved Black screen when exiting DE

I don't know if this will help or not...
I also get a black screen (albeit with a banner : "set monitor resolution ..."). My monitor resolution - 3840x2160. I have GTX 1650. It didn't happen before (with my old GTX 950, even with the same Nvidia's driver). Because of this, I could not turn off the computer right way. And couldn't switch to another tty (even if I could, I could not type anything there from the keyboard). I did not solve the problem, but I found a workaround (suitable for me).
I did the following in /boot/loader.conf
kern.vty=vt
hw.vga.textmode=0
efi_max_resolution="1280x1024"
# efi_max_resolution="3840x2160" - it doesn't work

After this, I could switch between ttys (and use the keyboard there).
Now, before exiting DE, I switch to another tty (Ctrl-Alt-F3), run shutdown -p +1m there, return to DE (Alt-F9) and exit DE, get a black screen (at this point I can't switch to another tty) and wait for the system shutdown...(but it's not necessary, of course, I could run shutdown from DE without switching ttys)

Edit: I run DE with startx
Edit 2: In my case it does not depend on DE (I tried Gnome, CDE, xfce) the result is the same
Edit 3: I'm getting the same behavior on Debian 11 (where I'm using X / Gnome, and Nvidia's driver). But on Debian 12 everything works fine (there I'm using Wayland / Gnome, and nouveau/NV166). On Debian, I don't use startx, and I don't need to run shutdown manually , since there is a "PowerOff" button in Gnome.
After today's 'pkg upgrade' the problem disappeared. Now, upon exiting Gnome DE (and X), I return to tty (from which I executed startx).
My system:
Bash:
[lanin@freebsd3 /usr/local/etc]$ freebsd-version -kru
14.0-RELEASE-p6
14.0-RELEASE-p6
14.0-RELEASE-p6

:)
 
Back
Top