1. For a normal shutdown, use systemctl poweroff; for a reboot, systemctl reboot. 2. Don’t use startx from inside an existing graphical login. 3. If the desktop is black, try Ctrl+Alt+F2 , log in there, and check the session logs. 4.  journalctl -b -u lightdm --no-pager tail -100 ~/.xsession-errors  5. Also check whether the session is actually Wayland or X11 from a terminal inside the logged-in session echo "$XDG_SESSION_TYPE"