17.04 update login loop

10,909

Solution 1

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.

Solution 2

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.

Solution 3

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?

  1. 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.

  1. In that case, you should be able to find out the name of your graphics card using lspci | grep VGA.
  2. You can find out the compatible drivers for your graphics card using the link.
  3. (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*.
  4. 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)

  5. Try a restart using systemctl reboot -i and hope your login loop is fixed.

Is your HOME your HOME?

  1. Check the owner of your home directory using ls -l /home
  2. If you don not own your home directory, change it using sudo chown $USER:$USER $HOME
  3. Try a restart using systemctl reboot -i and hope your login loop is fixed.

Do you own your .Xauthority?

  1. Check the owner of your home directory using ls -l ~/.Xauthority
  2. If you don't own your .Xauthority, change it using sudo chown $USER:$USER ~/.Xauthority
  3. If you do, move your .Xauthority file using sudo mv ~/.Xauthority ~/.Xauthority.bak
  4. Try a restart using systemctl reboot -i and hope your login loop is fixed.
  5. You might need to do the same thing on .ICEauthority.

Is your /tmp right?

  1. Run ls -ld /tmp and make sure the permissions are exactly drwxrwxrwt. The output should be of this sort

drwxrwxrwt 27 root root 36864 Sep 17 17:15 /tmp

  1. If not, run sudo chmod a+wt /tmp
  2. Try a restart using systemctl reboot -i and hope your login loop is fixed.

Maybe lightdm is your problem?

  1. 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.
  2. 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

Share:
10,909

Related videos on Youtube

Wifi
Author by

Wifi

Updated on September 18, 2022

Comments

  • Wifi
    Wifi over 1 year

    I've seen a lot of login loop questions and threads and have tried everything from here -

    Ubuntu gets stuck in a login loop

    Except installing gdm3, but I cannot get out of the damn login loop. Should I try gdm3? The only reason I didn't yet is because I've been a long time ubuntu user and my default login is customized pretty specifically for work and school.

    EDIT: I installed gdm3 and configured for my default login, still stuck in a login loop with the same error message as below.

    What's strange is I am able to log into Unity 8 (via the dropdown from the icon in the login gui), although nothing seems to work in there, but the default ubuntu login just loops.

    I've checked permissions, everything looks to be set to my username and group, I've moved and removed Xauthority, purged, reconfigured, reinstalled etc. lightdm, and more. I've been at this for a couple hours now and to make things worse my other computer's drive failed early this week so I am now stuck unable to get anything done.

    I am able to login via tty (ctrl + alt + Fkeys), so I have been trying solution after solution via CLI for hours. If anyone can help me out here I will forever be in your debt. If there are links to questions or threads I may have not read yet feel free to drop them here, however I am pretty sure I've been through the majority and nothing has worked yet.

    I am running on an hp envy currently amd64

    Thanks in advance

    EDIT: I'm not sure if this helps but I noticed an error in the top right of the screen when trying to login -

    vboxclient: virtual box kernel not running. Exiting.

    Or something very close to that. I am not running ubuntu on virtual box, it is my only OS so it didn't make sense to me but may provide more info.

    Output of lspci -k | grep -EA3 'VGA|3D|Display'

    00:02.0 VGA compatible controller: Intel Corporation HD Graphics 520 (rev 07)
    Subsystem: Hewlett-Packard Company HD Graphics 520
    Kernel driver in use: i915
    Kernel modules: i915
    

    (Apologies for any formatting issues, I'm doing this from my phone)

    I've checked ~/.xsession-errors again and I see several dbus-update-activation-environment: setting errors in there. This is over my head but does this help?

    • Pilot6
      Pilot6 over 6 years
      Please edit your question and add output of lspci -k | grep -EA3 'VGA|3D|Display' terminal command.
    • Wifi
      Wifi over 6 years
      Thanks for chiming in. I've made the edits above and please forgive formatting, I've been researching and posting from my phone.
    • Wifi
      Wifi over 6 years
      Any additional info help? I was almost able to install and run gnome but it was throwing errors left and right. It helped a bit because I was able to fix the errors one by one once I saw them. However, after a reboot, it now goes to a black screen with a blinking cursor after login screen
    • Michael Allan Jackson
      Michael Allan Jackson over 6 years
      This is not a duplicate of the issue linked to in the question. I've tried everything and I'm unable to log in except to gnome, and only at command line by executing startx. This issue is for all users as I tried to create a new user to bypass and it did not help.
    • αғsнιη
      αғsнιη over 6 years
      what's your home directory permissions? Have you checked this one? Who is owner of your home directory? if those were right, try remove mv ~/.gconf ~/.gconf.bak and try again.