Issues installing nvidia driver for titan xp on Ubuntu 16.04

I am having troubles installing the nvidia driver for a titan xp gpu on Ubuntu 16.04. I keep getting a login loop no matter the driver version (I tried different ones up to 430). I have tried several solutions described on the internet, but none of them worked for me. Could you please give me any advice at how to solve this issue?
nvidia-bug-report.log.gz (1.03 MB)

Please run nvidia-bug-report.sh as root and attach the resulting .gz file to your post. Hovering the mouse over an existing post of yours will reveal a paperclip icon.
https://devtalk.nvidia.com/default/topic/1043347/announcements/attaching-files-to-forum-topics-posts/

I have attached the required file now.

There seems to be a file missing, either a config file or a driver file. How did you install the driver when you created the log?

I installed it using the following commands:

sudo apt-get purge nvidia*
sudo apt-add-repository ppa:graphics-drivers
sudo apt-get update
sudo apt-get install nvidia-430

This looks like you had at some time installed the driver using the .run installer which now gets half loaded and blocked the ppa driver from being correctly installed.
Please run the .run installer with --uninstall options again, then try reinstalling the ppa driver:

sudo apt install --reinstall nvidia-430

The ppa package for 16.04 is currently broken, so you’ll have to fix it manually afterwards:
https://devtalk.nvidia.com/default/topic/1061656/linux/gtx1650-notebook-not-working-on-ubuntu16-04-black-screen-amp-login-loop-/post/5376983/#5376983
Afterwards, pease create a new nvidia-bug-report.log and attach.

This is strange. I havent actually installed the driver using the .run installer. I will try to uninstall nvidia again and follow the steps you suggested

Then this is really odd. The xserver finds part of the driver in
/usr/lib/xorg/modules/drivers/nvidia_drv.so
but the correct place would be
/usr/lib/nvidia-430/xorg/nvidia_drv.so
So I don’t know how that file got there.

I had a look at both folders you mentioned above. I then used
sudo apt-get remove --purge nvidia-*
This removed nvidia_drv.so in both locations.

Running sudo apt install --reinstall nvidia-430 led to the result that nvidia_drv.so exists in both locations again.

Nonetheless I tried the fix mentioned in the other post, but this did not solve the issue.
nvidia-bug-report.log.gz (1.04 MB)

Please create a new nvidia-bug-report.log and attach.

It should be attached to post #9

Really odd, still the same missing files. Please post the output of
ls -l /usr/lib/xorg/modules/drivers
and
ls -l /usr/lib/nvidia-430/xorg

The Output is attached to post #11

Ok, now I’m getting it, at least partially. Looks like the new driver packages do not really fit anymore correctly to the 16.04 version you’re running.
Please create a file /etc/X11/xorg.conf.d/10-nvidia-drm.conf with contents

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    ModulePath "/usr/lib/nvidia-430/xorg"
EndSection

and reboot. Beforehand, please check if the output of

ls -l /usr/lib/nvidia-430/libGL.so*

looks like

lrwxrwxrwx 1 root root     14 13. Aug 23:57 /usr/lib/libGL.so -> libGL.so.1
lrwxrwxrwx 1 root root     14 13. Aug 23:57 /usr/lib/libGL.so.1 -> libGL.so.1.7.0
-rwxr-xr-x 1 root root 591984 13. Aug 23:57 /usr/lib/libGL.so.1.7.0

P.S. the important part is that the link target is libGL.so.1.7.0, ignore any other differences.

Now there is no Login screen displayed at all. Its simply a black screen I can see. Attaching the bug report

The Output showed libGL.so.1.7.0
nvidia-bug-report.log.gz (1.06 MB)

It’s a typo in the created file, you made a space too many, it’s “OutputClass”, not “Output Class”.

Unfortunately it is still not working.
nvidia-bug-report.log.gz (1.06 MB)

Ok, had to re-check, the problem is that you’re running xorg-server 1.18 which didn’t fully support that config. Two options:
either

  1. fully upgrade Ubuntu’s HWE stack:
    https://wiki.ubuntu.com/Kernel/LTSEnablementStack
    or
  2. remove /etc/X11/xorg.conf.d/10-nvidia-drm.conf and use a traditional /etc/X11/xorg.conf:
Section "Device"
    Identifier     "nvidia"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:23:0:0"
    Option         "AllowEmptyInitialConfiguration"
    ModulePath     "/usr/lib/nvidia-430/xorg"
EndSection

I tried both options. In both cases the login screen is visible again, which is good, but unfortunately the Login Loop still exists
nvidia-bug-report.log.gz (1.06 MB)

Your install is really kind of broken. There’s an old amdgpu-pro driver installed, please remove the file
/usr/share/X11/xorg.conf.d/10-amdgpu-pro.conf
or uninstall the amdgpu-pro package.
Still, the alternatives system also doesn’t work correctly, so please put the xorg.conf or the other file back in place, then retry.