Typing your exact password on the Ubuntu login screen, watching the screen blink black for two seconds, and landing straight back at the very same password prompt in an endless loop is alarming – yet your files are completely safe. An Ubuntu login loop happens when your system SSD reaches 100% full so the graphical session cannot write tiny temporary files, when ownership on .Xauthority or your home folder flips to root, or when an Nvidia driver update breaks Wayland/Xorg.
Step 1: Open a Text Console (TTY) From the Login Screen
Because you cannot enter the graphical desktop yet, switch to Ubuntu’s built-in text console to inspect and repair the cause in one minute.
- On the Ubuntu login screen, press Ctrl + Alt + F3 (on laptops with Fn media locks, press Ctrl + Alt + Fn + F3).
- Type your Ubuntu username and press Enter, then type your password (no dots or stars appear while typing) and press Enter.
- Once signed into the black text prompt, work through the three fast checks below.
Cause 1: Check Whether Your Main Ubuntu Partition Hit 100% Full (Very Common)
If your root partition has zero megabytes free, GNOME and Xorg crash immediately upon login and kick you back to the login box.
- In the TTY console, check free disk space:
df -h / - Look at the Use% column: if it reads 100% or 99%, clear out old apt caches, old Snaps, or oversized Trash/logs straight away:
sudo apt clean sudo journalctl --vacuum-time=2d - You can also remove huge unwanted downloads or old logs safely, then verify
df -h /drops below 95% before pressing Ctrl + Alt + F1 (or runningsudo reboot) to log in normally.
Cause 2: Fix Wrong Ownership on .Xauthority or Your Home Directory
Running graphical apps with raw sudo frequently flips ownership of ~/.Xauthority or ~/.ICEauthority to root, locking your normal user out of the graphical display server.
- In the TTY console, check ownership inside your home folder:
ls -la ~ | grep -E "Xauthority|ICEauthority" - If either file (or your home directory) lists
root rootinstead of your username, hand ownership back cleanly (replace$USERautomatically with your active login):sudo chown $USER:$USER ~/.Xauthority ~/.ICEauthority sudo chmod 600 ~/.Xauthority - If your entire home folder or
~/.config/~/.cachegot touched by root, restore cleanly with:sudo chown -R $USER:$USER ~/.cache ~/.config ~/.local. - Restart the display manager to test logging back in:
sudo systemctl restart gdm3
Cause 3: Switch Between Wayland and Ubuntu on Xorg (or Repair Nvidia Drivers)
If disk space is plenty and file ownership is clean, click your username on the Ubuntu login screen, click the gear icon in the bottom-right corner, and test selecting Ubuntu on Xorg (or standard Ubuntu Wayland) before typing your password. If only one mode fails after a kernel update on an Nvidia laptop, switch back to TTY3 (Ctrl + Alt + F3) and reinstall drivers cleanly with sudo ubuntu-drivers autoinstall && sudo reboot.