Skip to content
Unix Server Solutions
  • Server
  • Apple
  • Database
  • Ubuntu
  • Linux

Ubuntu – Stuck in login ubuntu 14.04 after trying everything

14.04login

I can't get past the login screen via GUI. After I enter the password, it takes me back to the same screen in 2 seconds. I don't see my usual background/wallpaper, just the stock purple screen. Things I've tried:

  • I CAN log in via command line (ALT+CTL+F3)
  • Tried replacing .Xauthority file and running chown on it
  • /tmp has correct properties (drwxrwxrwt)
  • checked .xsession-errors file, nothing obvious there (though it's possible I missed something)
  • tried purging sources.list file
  • reinstalled lightdm multiple times
  • installed Ubuntu-desktop several times
  • reinstalled Unity and ubuntu-gnome-desktop
  • I AM able to create additional users but I am NOT able to get past the login screen regardless of who the user is.

I'm out of ideas, short of doing a clean install of Ubuntu. Please help?

EDIT: this is not a new system install question. I've been using Ubuntu for over a year without problems. I did a normal set of apt-get update upgrade and dist-upgrade over the weekend and now I can't login for some reason.

Best Answer

It's a temporary answer:

The problem I was experiencing is after recent upgrade, instantly past login I was logged in and then redirected back to login screen.

I've used this: Is there any way to roll back the most recent upgrade? to roll back most recent upgrade. I've rolled back unity, it didn't help, then I rolled back nvidia-304 and it helped.

Edit: After update I was struck again with the same problem and found a simpler solution here in comments http://www.linuxslaves.com/2016/05/3-ways-fix-ubuntu-gets-stuck-login-loop.html

I will past the relevant part of the comment by Foxjt:

The general consensus seemed to rotate around problems with the video drivers, so:

sudo ubuntu-drivers devices

This shows the required drivers for my Video card (nVidia G96 GeForce 9400 GT) as nvidia-340.

I ran:

sudo apt-get install nvidia-340

The messages showed that nvidia-304 was being removed and replaced with nvidia-340.

After a reboot, I was able to finally login!!! Hooray!!!

Related Solutions

Ubuntu – After Upgrade from 14.04 to 16.04 login screen runs in a loop while console login works

I ran into this after updating from 15.10 Wily Werewolf.

I use Nvidia's prime-select command to enable and disable the dedicated graphics card. (After using Ctrl+Alt+F1 and logging into the console) I disabled my GT 540M graphics card with sudo prime-select intel followed by sudo reboot. Upon reboot I was able to log into Unity.

Obviously this is more of a short-term fix and as the other answers have indicated, perhaps the long term solution will be related to replacing or upgrading the Nvidia drivers or allowing the existing unsigned driver to run by disabling secure boot. But hopefully this at least gets you to the desktop!

Edit: The Nvidia driver can now be installed using the official PPA, per this answer:

sudo apt purge nvidia-*
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-364
Related Question
  • Ubuntu – After Upgrade from 14.04 to 16.04 login screen runs in a loop while console login works