2

I have installed Ubuntu 18.04.2 (LTS). It was working smoothly for some days. But now I can't login. When I try to get into the desktop by entering the valid password and hit enter button, after 5-6 seconds the screen splashes and the login screen appears again. I can login into my account with the shell by pressing Ctrl+Alt+F2 and get back into the GUI login screen by holding Alt+Left until that appears. I have tried all solutions in the question Ubuntu gets stuck in a login loop. But all failed to login into my account. One answer suggested me to create new user with permission to use the sudo command. With that new account I can login. But when I try to login with the previous account the login loop continues. I need to access that account. An answer suggested me to check the permission of .Xauthority, but it doesn't exists. I have also tried to get into the GUI by executing startx command in the shell. This works and appears a GUI on the new account but not on the previous account. Unfortunately I don't get an have an internet connection on Ubuntu. So I can't use apt or apt-get command. But I have a Windows PC with administration rights and internet connection. May something occurred in my home directory.

4 Answers 4

3

Switch the login display manager from gdm3 to lightdm. LightDM is a more lightweight login display manager than gdm3. Download lightdm, change directories using cd to the directory containing lightdm_1.26.0-0ubuntu1_amd64.deb file that you downloaded, and run the following commands:

sudo apt install ./lightdm_1.26.0-0ubuntu1_amd64.deb     
sudo dpkg-reconfigure lightdm 
sudo reboot  

sudo dpkg-reconfigure lightdm will open up a new window allowing you to select lightdm as the default login display manager. Use the arrow keys to select lightdm, press the Tab key to put the focus on <OK> and press Enter. Then reboot by running sudo reboot

If that doesn't work, try booting from Xorg instead of Wayland. Edit /etc/gdm3/custom.conf with sudo nano /etc/gdm3/custom.conf, uncomment #WaylandEnable=false so it is WaylandEnable=falseand runsudo dpkg-reconfigure gdm3 # select lightdm

You might need to delete .Xauthority (which is located in /home/your-username/.Xauthority) if the login loop persists after trying these suggestions. It will be created automatically the next time you reboot.

2

Environment

18.04.03 LTS

Did not work

  • Login to terminal (CTL+ALT+F4) and reset password.
  • Login to terminal, create a new user and try to login with the new user
  • Create empty ~/.bashrc and ~/.profile

Solution

sudo apt update
sudo apt install --reinstall ubuntu-desktop
sudo apt upgrade -y
2
  • 1
    This answer proved useful. I also installed the NVIDIA graphics drivers using sudo ubuntu-drivers autoinstall
    – Xofo
    Apr 26, 2021 at 23:11
  • sudo ubuntu-drivers autoinstall Did the trick for me, didn’t need anything else May 8, 2022 at 16:58
0

It is a storage issue.For my case I used used root to login in and deleted some folders in my normal user directory to create space in my disk .Then I logged out .I was successfully able to login into my normal user session.

1
  • How do you reckon the OP has a storage issue - nothing in the post indicates that? At least, ask for some proof to back up your theory. May 7, 2021 at 7:58
0

My login loop was solved by switching to Ubuntu on Wayland on the login page (settings icon on the bottom right).

In my case, I tried every possible suggestion including reinstalling drivers and GUI.

You must log in to answer this question.

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