Fix 2: Xauthority

Another way of fixing the login loop issue in Ubuntu is to alter the permissions of Xauthority. For that, proceed to run the given command first:
ls -lah | grep -i Xauthority
sudo chown username:username .Xauthority
After this, proceed to press Ctrl+Alt+F7 on your keyboard. This will take you back to the usual login screen. Proceed to sign into Ubuntu. In case this fails to fix the issue, keep reading for more solutions.
Fix 3: Check Tmp Folder
Occasionally, the reason behind the login loop problem in Ubuntu lies in the “/tmp” folder. In that case, altering “/tmp” permissions can fix the issue. You simply need to log into the terminal once more and enter the following command:
sudo ls -lah /tmp
If you see something like “drwxrwxrwt,” you have been successful. Otherwise, you must reset permission by using the chmod command given below.
sudo chmod 1777 /tmp
In case this fails to work as well, return to the terminal by pressing Ctrl+Alt+F3. Sign in and enter the command given below.
sudo apt-get -y install lxdm
In case lxdm has not been selected, do it first by using the Up and Down arrow key. Now hit the Enter key and then proceed to reboot by using the command sudo reboot.
That is it for now. We hope this guide will surely help you to fix the login loop issue in Ubuntu. Now, check out our Windows Guides, Gaming Guides, Social Media Guides, iPhone, and Android Guides to know more. If you have any queries, comment down with your name & email ID. Moreover, subscribe to our very own YouTube Channel in order to watch awesome videos on gaming and smartphone tips and tricks.