Ubuntu 16.04 login loop with custom NVIDIA driver

7,065

Solution 1

The real reason why this happened for me was this: I had NVIDIA custom driver installed which compiles a kernel module underneath and everything was working fine for a moment.

Since it was a fresh install, Ubuntu decided to download some updates and during the upgrade it updated the kernel, and potentially some other libraries that compiled NVIDIA driver was dependent on and that broke their binary compatibility.

At that point after reboot I got stuck in login loop in lightdm, and was unable to run my X sessions with startx also. It looks like upgrade broke compatibility not only with the NVIDIA HW accelerated rendering module, but also SW module, so Unity/Gnome had nothing to render with at all.

To fix this, I just ran the NVIDIA install script that I downloaded once again, and after a recompile things went back to normal. Hope that helps someone.

P.S. I'd like to point out that in my solution returning back to crappy video card drivers was unnecessary.

Solution 2

I had this issue as well. Resolved by using xorg-nouveau drivers for now. While caught in the loop, try ALT+F1 to enter a shell. If that doesn't work:

  • While booting, hold right-shift.
  • Choose an earlier version of the kernel to boot from GRUB.
  • After boot, uninstall NVIDIA drivers and install xorg-* as required, don't know what you already have and there are many packages you could install. You'll want nouveau, as that will handle display for you.
Share:
7,065

Related videos on Youtube

Jasper_Li
Author by

Jasper_Li

Updated on September 18, 2022

Comments

  • Jasper_Li
    Jasper_Li over 1 year

    I couldn't get away from the login loop

    1. Ubuntu 16.04 with NVIDIA driver 367 installed

    2. Secure Boot disabled (i'm in the legacy mode)

    3. Display manager: lightdm

    4. .xsession-errors:

    openConnection: connect: No such file or directory
    cannot connect to brltty at :0
    upstart: gnome-session (Unity) main process (5813) terminated with status 1
    upstart: unity-settings-daemon main process (5806) killed by TERM signal
    upstart: Disconnected from notified D-Bus bus
    upstart: logrotate main process (5632) killed by TERM signal
    upstart: update-notifier-crash (/var/crash/_usr_bin_python2.7.0.crash) main process (5689) killed by TERM signal
    upstart: update-notifier-crash (/var/crash/_usr_bin_wget.0.crash) main process (5690) killed by TERM signal
    upstart: update-notifier-crash (/var/crash/_usr_lib_gvfs_gvfsd-dnssd.0.crash) main process (5692) killed by TERM signal
    upstart: bamfdaemon main process (5713) killed by TERM signal
    upstart: hud main process (5804) killed by TERM signal
    upstart: indicator-bluetooth main process (5848) killed by TERM signal
    upstart: indicator-power main process (5849) killed by TERM signal
    upstart: indicator-datetime main process (5852) killed by TERM signal
    upstart: indicator-printers main process (5859) killed by TERM signal
    upstart: indicator-session main process (5860) killed by TERM signal
    upstart: indicator-application main process (5886) killed by TERM signal
    upstart: unity7 main process (5843) killed by ABRT signal
    

    None of the approaches in the internet seems to help. It drives me crazy. Need help.

  • mchid
    mchid over 7 years
    You need to install dkms before compiling the drivers to prevent this or just use the ubuntu software center or additional drivers tab to install the correct nvidia proprietary drivers so they will automatically survive kernel upgrades.
  • dsabanin
    dsabanin over 7 years
    Unfortunately with Geforce 1070 Ubuntu failed to recognize the fact that I have NVIDIA card at all and didn't suggest the proprietary driver.
  • mchid
    mchid over 7 years
    Still, that's what DKMS is for. Installing dkms will automatically compile your compiled drivers each kernel upgrade and should be installed before compiling the driver.
  • dsabanin
    dsabanin over 7 years
    Thanks! I was not entirely sure what DKMS is for.
  • totymedli
    totymedli almost 7 years
    This answer solved for me.
  • ZijunLost
    ZijunLost almost 7 years
    This solution works for me and explains the reason clearly. Very helpful, thanks so very much!