I encountered a login loop after updating xenial beta to the latest updates.
I tried a lot of things:
xauthority
or/tmp
privileges changeReinstalling nvidia drivers, removing them.
reinstalling
unity
,unity-greeter
,ubuntu-desktop
,upstart
,lightdm
andcompiz
.resetting
compiz
andunity
settings.(I getdbus
launch errors:Failed to commit changes to dconf: error spawning command line 'dbus-launch -auto launch=..................)
using older kernel and failsafe (failsafe report no screen found)
tried to launch other DE (steam big picture)
Here's xsession errors log:
unity:
open connection: connect: No such file or directory
Cannot connect to brltty at :0
upstart: gnome-session (unity) main process (5441) terminated with status 1
upstart unity-settings-daemon main process (5434) killed by TERM signal
steam big picture:
open connection: connect: No such file or directory
Cannot connect to brltty at :0
ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libmodeswitch_inhibitor.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file(: ignored.
ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libmodeswitch_inhibitor.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file(: ignored
ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libmodeswitch_inhibitor.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file(: ignored
Could not create GLX context
ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libmodeswitch_inhibitor.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file(: ignored
In Unity (compiz) log there are a lot of errors about opengl plugin
Compiz (opengl) - Fatal: glXQueryExtenisonsString is NULL for screen 0
And a lot of plugins unloaded because of opengl.
Lightdm have sudden SIGTERM signal with no prior errors in the log.
xserver have 2 errors:
xf86EnablePorts: failed to set IOPL for I/O (Operation not permitted)
(EE) Failed to initialize GLX extension (Compatible NVIDIA X driver not found)
But it continue through input operations until it suddenly get terminated.
In my case original nvidia drivers was the cause and switching back to open source nouveau helped. First, I removed all stuff from nvidia:
(source: How can I uninstall a nvidia driver completely ?)
After that I could login, but unity didn't load, there was no launcher etc. It turn out I had to re-enable Unity plugin:
(source: Unity doesn't load, no Launcher, no Dash appears)
I had the same error on 16.04 as well. In my case it was also an NVidia driver issue. I have 8 monitors and I like how the NVidia diver performs with them. So to get it working, I:
Pressed CTRL + ALT + F1 at the login prompt and logged into through terminal.
Backed up may old
/etc/X11/xorg.conf
file, as it was a pain to configure 8 monitors.Downloaded the driver file from NVidia:
NVIDIA-Linux-x86_64-367.44.run
Ran the following command:
sudo service lightdm stop
(driver install will fail if this step is skipped).Reinstalled the driver:
sudo ./NVIDIA-Linux-x86_64-367.44.run
I was notified that the auto generated script did not complete and given the choice to continue the install which I accepted. I also chose to have the driver installed as a kernel module and have the program generate a newxorg.conf
file (backed mine up before). At the end of the process it complained about a missing link to a lib, but gave instructions on linking to it. I put off dealing with that for later.Rebooted and was able to login through the GUI.
The problem is that, when you update Ubuntu (and even when you install certain programs that call
/sbin/ldconfig
), there are changes made to/etc/ls.so.cache
.Try it and you'll see that the
ld.so.cache
file after such an installation/update will have a different size than before the operation.This, in Ubuntu 16.04, results in a login loop when logging in from lightDM. Therefore, you should keep a copy of the original
ld.so.cache
since, with the new version generated after the installation/update, lightDM will no longer authenticate.I have had this issue many times and have had to be very careful with this. I always keep a copy of the original file (
/etc/ld.so.cache.orig
) that lets me log in without the login loop and use that to log in. Then, once I have logged in successfully, I copy the new one (/etc/ld.so.cache.new
) over. To do so, I have modified my~/.bash_profile
file and have added this line:Then, in order to copy the original file back when exiting the session so that I'll be ab;e to log ina gain next time, I have added this line to
/etc/gdm/PostSession/Default
:For that to work, I have modified
/etc/sudoers
(by runningsudo vosudo
) to allow non privileged users to run the copy command:This might look like an ugly hack, but it gets around this login-loop issue and, also, to keep the new
/etc/ld.so.cache
file.I was using xfce and I manually checked each folder and file by renaming them. Deleting
~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml
worked for me.I had nvidia drivers as well, but they were working fine when I logged in as root and a backup user.
In my case this issue was caused by accidentially enabling Secure Boot in UEFI, which effects in third party drivers unusable (e.g. Nvidia). That caused X session error. After disabling Secure Boot, everything went back to normal.