Login loop with NVIDIA GP100 running on Ubuntu 16.04.05-desktop

When I run “nvidia-smi”, I got the following result:
NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

Then, I check the driver installed in my system by the command "dpkg -l | grep -E “nvidia-[0-9]{3}”. I got the followings:
rc nvidia-304 304.135-0ubuntu0.16.04.2 amd64 NVIDIA legacy binary driver - version 304.135
ll nvidia-410 410.78-0ubuntu~gpu16.04.1 amd64 NVIDA binary driver - version 410.78

It semms that “nvidia-410” has already been installed. My graphics card is Nvidia Quadro GP100. The Nvidia driver website says 410.78 is correct version for it. However, I cannot install the driver through the package downloaded online. The driver is installed through graphics drivers PPA.

My gcc version is gcc (ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609. The operating system I used is Ubuntu 16.04.05 LTS - desktop.

I checked “Xorg.0.log” file. It shows the error: failed to initialize the NVIDIA kernel module. Then I have no clue how to solve this problem.

I also did the following things that I got the answers online, but I still couldn’t log into the GUI. The system stays on login loop back.

  1. reinstall lightdm
  2. modify grub to nomodeset
  3. Add “nouveau” to blacklist.conf

I have run the nvidia-bug-report.sh. So I attached the result here. With it, there are other config files I don’t know whether they help. But I also include them here. Thank you.

  1. nvidia-bug-report.log https://drive.google.com/file/d/1fl31uJJLJIp_UF-9ja49fXduLKf4eOem/view?usp=sharing
  2. Xorg.0.loghttps://drive.google.com/file/d/1OG6OoTK7lahdJ69wud87LGX37wZysQgu/view?usp=sharing
  3. xorg.confhttps://drive.google.com/file/d/1dGTzTTtJ9P7bAx4n8HYFXafBJHUeG4Je/view?usp=sharing
  4. nvidia-graphics-drivers.confhttps://drive.google.com/file/d/1Y6x6d86Necp8cwKMceeY8OtDknS3pwTc/view?usp=sharing
  5. blacklist.confhttps://drive.google.com/file/d/1IKwXpofMuQ-h2qrOz1R9q8V7i-KbTqtF/view?usp=sharing
  6. x86_64-linux-gnu_nvidia_modconfhttps://drive.google.com/file/d/1IKwXpofMuQ-h2qrOz1R9q8V7i-KbTqtF/view?usp=sharing
  7. grubhttps://drive.google.com/file/d/1rTCPMSMtnN0u2esM3-ykE47_LzimIzQf/view?usp=sharing

I can’t answer, but I see this as a starting place:

ERROR: Unable to load the kernel module 'nvidia.ko'.  This happens most frequently when this kernel module was built against the wrong or improperly configured kernel sources, with a version of gcc that differs from the one used to build the target kernel, or if another driver, such as nouveau, is present and prevents the NVIDIA kernel module from obtaining ownership of the NVIDIA GPU(s), or no NVIDIA GPU installed in this system is supported by this NVIDIA Linux graphics driver release.

If you run “sudo lsmod” and see anything nouveau, then that would be a cause. If a kernel version was changed without changing the NVIDIA driver, then this too would be a cause…the NVIDIA driver is compiled against each individual kernel version. Someone else will probably know more about finding out which case this is.