17.04 update login loop
After typing this answer, I realize you are using 17.04, not 17.10, so this probably won't help you. In any case, I ran into the same problem in 17.10 yesterday after updating (with sudo apt-get update
, sudo apt-get upgrade
). Like you I tried changing the permissions for .Xauthority
(or deleting this file) which did not help. Nor did running dpkg-reconfigure lightdm
or dpkg-reconfigure gdm3
, or reinstalling gdm3 (17.10 uses gdm3).
In my case, I was able to get around the issue by clicking on the little gear icon to the right of my login name on the login splash screen, and select "Unity" (not gnome or wayland) from the pull-down menu, and THEN enter the password. Again this is probably irrelevant for you but hopefully it helps someone else using 17.10 who browses here.
Had login loop just now after upgrading to 17.10. No GDM/Lightdm purge did help. No config and permissions jugling helped.
What helped is that i purged x11-common
, which automatically deleted all desktop software, and then removed/renamed /etc/X11
. The symptom was upstart
being not found, and it is an old application which is no longer used, so my best option was to have fresh X11 reinstall.
Installing fresh flavour of whatever desktop metapackage will do the trick. I used ubuntu-gnome-desktop
but others should work just as well.
I have been through this problem multiple times and it has been a different issue each time. One of the following issues could have caused your problem and you could use the command line interface by using Ctrl+Alt+F1 (Replace F1 with F2,F3.... if your tty1 is occupied) to try the following solutions
NVIDIA drivers missing or broken?
- Run
nvidia-smi
to access the NVIDIA system management interface. The output should be something of this sort.
Mon Sep 17 14:58:26 2018 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 390.87 Driver Version: 390.87 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 GeForce GT 720 Off | 00000000:01:00.0 N/A | N/A | | 19% 35C P8 N/A / N/A | 543MiB / 980MiB | N/A Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 Not Supported | +-----------------------------------------------------------------------------+
If you're not able to access it, there is probably some issue with your graphic drivers.
- In that case, you should be able to find out the name of your graphics card using
lspci | grep VGA
. - You can find out the compatible drivers for your graphics card using the link.
- (Try without this stepand maybe then with this step if there was no success). Remove the existing broken drivers using
sudo apt-get purge nvidia*
. -
Install the drivers using
sudo add-apt-repository ppa:graphics-drivers
sudo apt-get update
sudo apt-get install nvidia-390
(Or whatever the compatible driver is for your graphics card) Try a restart using
systemctl reboot -i
and hope your login loop is fixed.
Is your HOME your HOME?
- Check the owner of your home directory using
ls -l /home
- If you don not own your home directory, change it using
sudo chown $USER:$USER $HOME
- Try a restart using systemctl reboot -i and hope your login loop is fixed.
Do you own your .Xauthority?
- Check the owner of your home directory using
ls -l ~/.Xauthority
- If you don't own your .Xauthority, change it using
sudo chown $USER:$USER ~/.Xauthority
- If you do, move your .Xauthority file using
sudo mv ~/.Xauthority ~/.Xauthority.bak
- Try a restart using systemctl reboot -i and hope your login loop is fixed.
- You might need to do the same thing on .ICEauthority.
Is your /tmp right?
- Run
ls -ld /tmp
and make sure the permissions are exactlydrwxrwxrwt
. The output should be of this sort
drwxrwxrwt 27 root root 36864 Sep 17 17:15 /tmp
- If not, run
sudo chmod a+wt /tmp
- Try a restart using systemctl reboot -i and hope your login loop is fixed.
Maybe lightdm is your problem?
- Reconfigure your display manager using
dpkg-reconfigure lightdm
and try out other display managers (gdm3,lightdm,) that are available. Maybe this will you give you enough clues to move forward. - If none of them help,try installing sddm using
sudo apt-get install sddm
for one final try. reconfigure display to sddm.
If none of the above solutions worked, you can try re-installing ubuntu.
P.S: Answers from this post have been very helpful in writing this solution