Ubuntu 18.04 with nvidia graphics card causes login loop

I have been trying to setup my nvidia graphics after updating Ubuntu from 16.04 to 18.04. Long story short I have tried all (or most) combinations of setting up the driver but I failed.

I have an Nvidia GTX 1080 card which was initially working in my 16.04. Also, I am using the onboard graphics card for the display and wish to use the Nvidia graphics card for my Deep Learning work (read CUDA).

Below are the specs:
onboard graphics chipset - Intel
NVIDIA graphics card - GTX 1080
driver - 410.78
Ubuntu version - 18.04
Kernel version - 4.17.0-generic
display manager - gdm3

Things tried:

  • Using older drivers including nvidia-390 and 396
  • Using older kernel versions for Ubuntu
  • editing grub configurations (nomodeset, nogpumanager)
  • blacklist nouveau

Current State:
I can run nvidia-smi and the driver is working in tty terminal mode (ctrl+alt+F2). However, when I try logging in normally it loops back to the login page

One solution is if I use prime-select and chose intel instead of nvidia and reboot my login is successful. However, Nvidia driver is shutdown. In this state nvidia-smi would respond that it is not able to communicate to the nvidia driver.

Happy to provide additional information if needed. Please help as I have already lost a lot of my time trying to debug this issue

See this:
[url]ubuntu 18.04+headless_390+intel iGPU after prime-select intel lost contact to GeFORCE 1050ti - Linux - NVIDIA Developer Forums

He Generix, I was searching for right settings for the xorg.conf for so long. Thanks for showing the way. This works perfectly. I also followed that up with an installation of Cuda 9.1, CUDNN and NCCL and it all worked just fine. Now happily working with my tensorflow and python!

Thanks again for the help!

I had the same thing happen to me in 19.10 and with nvidia-driver-435. The solution for me was to install lightdm as my display manager.

sudo apt-get install lightdm
1 Like