Can't properly install drivers for GeForce 1070 on Ubuntu 18.04

Hi guys,

I’ve been having troubles installing drivers in the aforementioned setup. I’ve tried something like 10 different tutorials, tried drivers from the ppa and nvidia website, tried autoinstall of recommended drivers. Nothing works for me. I tried to go here
https://devtalk.nvidia.com/default/topic/533434/linux/current-graphics-driver-releases/, then to section Legacy releases for GF1xx “Fermi” GPUs - version 390.xx - did not work. I have no idea what to do next.

During 390.xx,410,415 installations I was having the following issue: DKMS modules were built just fine, but at the very end of the installation, I get this error message: unable to load the nvidia-drm kernel module. It suggests to go and check /var/log/ for more info. But that log does not contain anything apart the messages of successfully finished installations steps and the final message that unable to load the nvidia-drm kernel module.

After every installation the resolution of my display is 1024x768, whereas for normally working drivers it should be 2560x1440.

Also, I should mention that the Ubuntu installation is completely fresh.

Here is the output of some commands that I think might be minimally useful for troubleshooting the problem.

sudo lshw -c display
  *-display                 
       description: VGA compatible controller
       product: GP104 [GeForce GTX 1070]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nouveau latency=0
       resources: irq:127 memory:de000000-deffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:e000(size=128) memory:c0000-dffff

After any driver installation attempts line

configuration: driver=nouveau latency=0

becomes

configuration: latency=0

and

sudo ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001B81sv00001043sd00008597bc03sc00i00
vendor   : NVIDIA Corporation
model    : GP104 [GeForce GTX 1070]
driver   : nvidia-driver-390 - distro non-free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

Please, let me know if I must provide more info to make it clearer.

Thank you.

A quickshot, might be that you have secure boot enabled so the nvidia modules can’t be loaded since they aren’t signed. Disable it in bios.
Use the ppa drivers if possible. If that doesn’t resolve the issue, 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/

Just a quick question. Do I disable secure boot before or after installation? Or it does not matter?

I know, you gave simple advice, but I can’t thank you enough for giving actually working advice!
nvidia-smi is working and the resolution is full again after disabling secure boot.

Thanks a lot!

Just for reference, on installing Ubuntu, there’s an option to “Install third party software” which enables and configures module signing, so you can have secure boot + nvidia drivers. Can be manually configured afterwards but it’s a bit of a hassle so it’s often easier to just disable secure boot in bios.