Ubuntu 18.04 stuck in login loop with missing .Xauthority file
My computer running Ubuntu 18.04 is stuck in a login loop. I am using lightdm as my display manager, but trying to switch to gdm3 didn't fix the problem (I was still stuck in a login loop).
I have tried to follow the fixes found here to fix it, but after running ls -la there is no .Xauthority file in my home directory. I think this is related to my login loop problem, but I am not sure how to create a new .Xauthority file?
Update: I switched to gdm3 and can now login with Unity for a few seconds. The desktop loads but after a minute I am in a login loop again.
2 Answers
Method 2 in this article worked for me. I am using an old Sony Vaio laptop and think the issue is a graphics problem.
1Reinstalling Ubuntu lightdm.
sudo apt-get purge lightdm sudo apt-get install lightdm sudo dpkg-reconfigure lightdm
Try updating your graphics card driver.
First, see what driver you need:
ubuntu-drivers devicesThen download the recommended driver for your graphics card. For example, if the recommend driver was nvidia-390:
sudo apt install nvidia-390 3