Ubuntu 18 LTS & NVIDIA 440 | Unable to Make Nvidia the Primary Display Driver

Hello Everyone,

This has been driving me nearly insane for the past several days. Currently, I have the NVIDIA 440 driver installed via Ubuntu’s official graphics-drivers/ppa and apt-get. I ensured that all nvidia-related drivers/libraries were uninstalled, purged and cleaned beforehand (along with a clean restart).

After much headache (and disabling Secure Boot), I have the drivers successfully running, but Ubuntu’s X11 display is still using the Intel HD gpu as the default regardless of any of prime-select, nvidia-configure, or my supplied configurations.

Here is some information regarding my system’s set-up.

Intel® Core™ i5-7300HQ CPU @ 2.50GHz × 4
Intel® HD Graphics 630 (Kaby Lake GT2)
GeForce GTX 1050 Ti Mobile
GNOME 3.28.2

$ sudo lshw -C display
       description: VGA compatible controller
       product: GP107M [GeForce GTX 1050 Ti Mobile]
       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=nvidia latency=0
       resources: irq:129 memory:de000000-deffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:e000(size=128) memory:df000000-df07ffff
       description: VGA compatible controller
       product: Intel Corporation
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 04
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:127 memory:dd000000-ddffffff memory:b0000000-bfffffff ioport:f000(size=64) memory:c0000-dffff
$ sudo prime-select query
$ ls /usr/share/X11/xorg.conf.d/
10-amdgpu.conf  10-evdev.conf  10-nvidia.conf  10-quirks.conf  10-radeon.conf  11-evdev-quirks.conf  11-evdev-trackpoint.conf  11-nvidia-prime.conf  40-libinput.conf  70-wacom.conf
$ ls /lib/modprobe.d/
aliases.conf  blacklist_linux_4.15.0-66-generic.conf  blacklist_linux_4.15.0-70-generic.conf  fbdev-blacklist.conf  nvidia-graphics-drivers.conf  nvidia-kms.conf  systemd.conf

nvidia-bug-report.log.gz (1.43 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.

I have attached the bug report as requested to the origional post.

Additionally, here is some more information:

Mon Nov 18 17:17:33 2019       
| NVIDIA-SMI 440.26       Driver Version: 440.26       CUDA Version: 10.2     |
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|   0  GeForce GTX 105...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   49C    P8    N/A /  N/A |      7MiB /  4040MiB |      0%      Default |
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|  No running processes found                                                 |
$grep -r nvidia /etc/modprobe.d/* /lib/modprobe.d/*
/etc/modprobe.d/blacklist-framebuffer.conf:blacklist nvidiafb
/etc/modprobe.d/blacklist-nouveau.conf.save:#blacklist nvidiafb
/lib/modprobe.d/nvidia-kms.conf:# This file was generated by nvidia-prime
/lib/modprobe.d/nvidia-kms.conf:options nvidia-drm modeset=1

Please delete /etc/X11/xorg.conf

That seemed to work like a charm. If I may ask, what was the reasoning that lead you to that suggestion?

Also, now that I have the GPU working as my primary driver, is there a way I can have Ubuntu run on the Intel HD chip and then specify certain programs (like my CAD software) to use the Nvidia card? This would maximize my power output (and is something I can do on Windows 10).

Thanks again for your support thus far!

That config was setting a nvidia-only config with illegal paths.
What you want is called render offload http://download.nvidia.com/XFree86/Linux-x86_64/435.17/README/primerenderoffload.html
This requires a very recent xserver with additional patches, I don’t know if Ubuntu provides this yet for 18.04, so you would have to use the ppa from the docs.

Thanks for the reasoning and the link!

It looks like Ubuntu 18 LTS is supported via that ppa, though adding it and doing a sudo apt-get update && apt-get upgrade doesn’t upgrade the xorg-server package.

Any ideas there?

So odd occurance:

I just tried to switch to Intel for the first time and upon trying to log back into Ubuntu, I was greeted with a black screen for a moment before being booted back to the log-in screen. Not sure what that is about …

Where should I check for error logs?

sudo journalctl -b0 _COMM=gdm-x-session