3

So recently I got stuck in a login loop on Ubuntu 18. I tried some solutions posted here but none of them works for me so far. Here's what I tried by accessing terminal from login screen:

  1. Checking ownership of .Xauthority and .ICEauthority files. Even removed them. Files are fine. When I deleted them, I still got the login loop but the file were not automatically recreated when I tried to login normally. To recreate them I had to manually issue startx.
  2. Checking permissions of /tmp directory and even deleted all its content.
  3. Tried to login as a test user by creating a new user. It worked but my user does not work.
  4. Using startx when opening a terminal from the login screen works. But the login screen still stuck on a login loop if I log out or reboot.
  5. Switched to a different login screen gdm3 -­­­> lightdm by using sudo dpkg-reconfigure lightdm/gdm3 and issuing sudo init 5 to go back to login screen.
  6. Checked content of .xsession-errors and .xsessions-errors.old and got the following error messages (which I am not sure I understand):

.xsession-errors (.xsession-errors.old is exactly the same):

dbus-update-activation-environment: error: unable to connect to D-Bus: Failed to connect to socket /run/user/1002/bus: Connection refused
dbus-update-activation-environment: error: unable to connect to D-Bus: Failed to connect to socket /run/user/1002/bus: Connection refused
dbus-update-activation-environment: error: unable to connect to D-Bus: Failed to connect to socket /run/user/1002/bus: Connection refused
dbus-update-activation-environment: error: unable to connect to D-Bus: Failed to connect to socket /run/user/1002/bus: Connection refused

I looked at this bus file and did ls -la on it and this is what I got:

srw-rw-rw- 1 myusername myusername 0 Apr 11 10:02 /run/user/1002/bus

Cause of the error: I am not sure what happened as I tried to run some calculation task and I think it was hungry for too much ressources on my computer. My computer froze and I had to do a hard reboot by pressing the power button. After that, I got stuck into this loggin loop problem.

Question: Any idea what these error message means? Any idea how to solve this loggin loop issue?

EDIT:

  • Reinstalling the graphic card drivers didn't solve the problem.
  • Trying out "lubuntu-desktop" works though! I can use a regular session on this light environment. ubuntu-desktop does not work (still login loop issue).
2
  • Did you find a fix? Mar 26, 2020 at 17:02
  • It fixed itself eventually...
    – fgoudra
    Nov 27, 2020 at 17:19

2 Answers 2

2

I've run into the same issue and reinstalling lightdm fixed the issue for me:

sudo apt-get install --reinstall lightdm
sudo reboot
0

I've had this happen for one user account on Ubuntu and it was caused by something screwy in the user's ~/.config directory. To quickly fix, switch to log in as the user via the console (Ctrl-Alt-F3 or similar) then at the prompt do mv ~/.config ~/config.old. Switch back to the GUI (Ctrl-Alt-F1 or similar) and you should be able to log in. Note that all config settings (background etc.) will be back to defaults.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .