How to Fix Ubuntu Login Loop Returning to the Password Screen After Signing In

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.

  1. On the Ubuntu login screen, press Ctrl + Alt + F3 (on laptops with Fn media locks, press Ctrl + Alt + Fn + F3).
  2. Type your Ubuntu username and press Enter, then type your password (no dots or stars appear while typing) and press Enter.
  3. 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.

  1. In the TTY console, check free disk space:
    df -h /
  2. 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
  3. You can also remove huge unwanted downloads or old logs safely, then verify df -h / drops below 95% before pressing Ctrl + Alt + F1 (or running sudo 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.

  1. In the TTY console, check ownership inside your home folder:
    ls -la ~ | grep -E "Xauthority|ICEauthority"
  2. If either file (or your home directory) lists root root instead of your username, hand ownership back cleanly (replace $USER automatically with your active login):
    sudo chown $USER:$USER ~/.Xauthority ~/.ICEauthority
    sudo chmod 600 ~/.Xauthority
  3. If your entire home folder or ~/.config / ~/.cache got touched by root, restore cleanly with: sudo chown -R $USER:$USER ~/.cache ~/.config ~/.local.
  4. 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.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.