Immediate Fix: Reset User File Permissions
The most common cause of the Ubuntu 24.04 login loop is incorrect ownership of the .Xauthority file. When this file is owned by “root,” the system cannot write the necessary session data to your home directory.
| Action | Command |
|---|---|
| Access Terminal | Press Ctrl + Alt + F3 |
| Fix Permissions | sudo chown $USER:$USER .Xauthority |
Follow these steps to apply the fix immediately:
# 1. Switch to the TTY terminal (Ctrl+Alt+F3)
# 2. Log in with your username and password
# 3. Run the following command:
sudo chown $USER:$USER ~/.Xauthority
# 4. Restart the display manager
sudo systemctl restart gdm
Technical Explanation: Why the Loop Occurs
The login loop happens when the GNOME Display Manager (GDM) attempts to launch your graphical session but encounters a fatal error. Instead of crashing the whole system, it reverts back to the login screen, creating a continuous loop.
Usually, this is triggered by a lack of disk space, corrupted configuration files, or incompatible GPU drivers. If the system cannot write to /home/user or initialize the X11/Wayland server, the session terminates instantly.

Alternative Methods to Resolve the Loop
Method 2: Check for Full Disk Space
If your hard drive is 100% full, Ubuntu cannot create temporary files required for the login process. Use the following command in the TTY terminal to check your storage levels.
df -h
# If /dev/sda is at 100%, delete unnecessary logs:
sudo rm -rf /var/log/*.gz
Method 3: Reinstalling GDM3 and Desktop Environment
Sometimes the display manager configuration itself becomes corrupted during an update to 24.04. Reinstalling the core packages can reset these configurations to their default working state.
sudo apt-get update
sudo apt-get install --reinstall gdm3 ubuntu-desktop
sudo dpkg-reconfigure gdm3
Method 4: Fix NVIDIA Driver Conflicts
Incompatible NVIDIA drivers are a frequent culprit for login failures on Noble Numbat. Removing existing drivers and letting Ubuntu select the recommended version often solves the issue.
sudo apt-get purge nvidia*
sudo ubuntu-drivers autoinstall