xorg.conf file out of the wayIf display settings have been corrupted or modified incorrectly, it's good to remove the xorg.conf.
mv /etc/X11/xorg.conf /etc/X11/xorg.conf.old
By default, X11 config files are instead stored here:
/usr/share/X11/xorg.conf.d
xorg.conf files saved in /etc/X11 can cause displays issues on boot, and should be avoided wherever possible.
After moving those files and rebooting, try logging in again. (There may be files you need to move other than the common ones listed above.)
You can reinstall GNOME Display Manager (which handles the login screen), along with the desktop environment by running the below commands in :
- sudo apt install --reinstall gdm3 ubuntu-desktop gnome-shell
- sudo systemctl reboot
After reinstalling those packages and rebooting, try logging in again.
If your system is equipped with NVIDIA graphics, a recent update might be causing the login issues. (Usually, NVIDIA driver issues will prevent the login screen from loading at all; however, it's still worth reinstalling if you are unable to log in after the above steps.) Refer to the table below to determine if your system contains NVIDIA graphics:
| Always | Maybe | Never |
|---|---|---|
| Oryx Pro | Wild Dog Pro | Lemur (Pro) |
| Adder WS | Ratel | Kudu |
| Serval WS | Galago Pro 5 | Meerkat |
| Bonobo WS | Gazelle | Galago Pro (4 or older) |
| Leopard WS | Thelio | Darter Pro |
| Silverback WS | Thelio Mira | Pangolin |
| Thelio Mega | Thelio Major | |
| Thelio Massive |
To remove the NVIDIA driver, run the following:
- sudo apt purge ~nnvidia
- sudo apt autoremove
- sudo apt clean

After the NVIDIA driver has been removed, add it back using the following commands:
- sudo apt update
- sudo apt full-upgrade
- sudo apt install system76-driver-nvidia
After the installation has completed, type sudo systemctl reboot and try logging in again.
参考链接: