I have installed the Linux driver and followed instructions in Chapter 34. PRIME Render Offload to set up the PRIME Render Offload. I have a problem that nvidia-drm is not loaded:
$nvidia-smi
Tue Dec 24 00:50:16 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.44 Driver Version: 440.44 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 1650 Off | 00000000:01:00.0 Off | N/A |
| N/A 44C P8 2W / N/A | 0MiB / 3911MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
$ xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x43 cap: 0x9, Source Output, Sink Offload crtcs: 3 outputs: 1 associated providers: 0 name:modesetting
If I try to load nvidia-drm with sudo modprobe nvidia-drm, sometimes the system freezes completely; otherwise I get two identical modesetting lines in xrandr --listproviders. If I check my Xorg.0.log I have
[ 38.331] (==) Using config file: "/etc/X11/xorg.conf"
[ 38.331] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 38.332] (==) ServerLayout "layout"
[ 38.332] (**) |-->Screen "iGPU" (0)
[ 38.332] (**) | |-->Monitor "<default monitor>"
[ 38.332] (**) | |-->Device "iGPU"
[ 38.332] (**) | |-->GPUDevice "dGPU"
[ 38.332] (**) | |-->GPUDevice "iGPU"
[ 38.332] (**) | |-->GPUDevice "dGPU"
[ 38.332] (==) No monitor specified for screen "iGPU".
Using a default monitor configuration.
...
[ 38.337] (II) LoadModule: "nvidia"
[ 38.337] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[ 38.341] (II) Module nvidia: vendor="NVIDIA Corporation"
[ 38.341] compiled for 1.6.99.901, module version = 1.0.0
[ 38.341] Module class: X.Org Video Driver
[ 38.342] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 38.342] (II) NVIDIA dlloader X Driver 440.44 Sun Dec 8 03:38:31 UTC 2019
[ 38.342] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[ 38.342] xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
[ 38.342] (II) modeset(0): using drv /dev/dri/card0
[ 38.342] (WW) Falling back to old probe method for modesetting
...
[ 38.344] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[ 38.344] (EE) Screen 1 deleted because of no matching config section.
[ 38.344] (II) UnloadModule: "nvidia"
I removed the second xorg.conf and now gpus only appear once (see updated bug log attached). I have patched the Xserver. But I still have a problem - I ran sudo modprobe nvidia-drm and now get
Config looks correct, I suspect this is a known timing problem, the nvidia driver gets loaded too late so the Xserver is already up. Please try embedding the nvidia driver into the initrd so they’re available as early as possible: https://askubuntu.com/questions/676707/how-to-load-a-module-in-initrd
Looking for nvidia modules in /lib/modules/5.0.0-37-generic/updates/dkms
Looking for amdgpu modules in /lib/modules/5.0.0-37-generic/updates/dkms
Is nvidia loaded? yes
Was nvidia unloaded? no
Is nvidia blacklisted? no
Is intel loaded? yes
Is radeon loaded? no
Is radeon blacklisted? no
Is amdgpu loaded? no
Is amdgpu blacklisted? no
Is amdgpu versioned? no
Is amdgpu pro stack? no
Is nouveau loaded? no
Is nouveau blacklisted? yes
Is nvidia kernel module available? no
Is amdgpu kernel module available? no
Vendor/Device Id: 8086:3e9b
BusID "PCI:0@0:2:0"
Is boot vga? yes
Vendor/Device Id: 10de:1f91
BusID "PCI:1@0:0:0"
Is boot vga? no
Skipping "/dev/dri/card1", driven by "nvidia-drm"
Skipping "/dev/dri/card0", driven by "i915"
Skipping "/dev/dri/card1", driven by "nvidia-drm"
Skipping "/dev/dri/card0", driven by "i915"
Skipping "/dev/dri/card1", driven by "nvidia-drm"
Skipping "/dev/dri/card0", driven by "i915"
Skipping "/dev/dri/card1", driven by "nvidia-drm"
Found "/dev/dri/card0", driven by "i915"
output 0:
card0-eDP-1
Number of connected outputs for /dev/dri/card0: 1
Does it require offloading? yes
last cards number = 2
Has amd? no
Has intel? yes
Has nvidia? yes
How many cards? 2
Has the system changed? No
Intel IGP detected
Intel hybrid system
Removing /usr/share/X11/xorg.conf.d/11-nvidia-prime.conf
Unloading nvidia-drm with "no" parameters
Unloading nvidia-uvm with "no" parameters
Unloading nvidia-modeset with "no" parameters
Unloading nvidia with "no" parameters
Setting power control to "auto" in /sys/bus/pci/devices/0000:01:00.0/power/control
I have a Xorg process running on the GPU from the bootup (see above), is that correct? I think the overall desktop environment is rendered by Intel’s integrated graphics, nevertheless, because if I run
glxinfo | grep vendor
server glx vendor string: SGI
client glx vendor string: Mesa Project and SGI
OpenGL vendor string: Intel Open Source Technology Center
Thanks for the help, generix. Are you a Nvidia employee? if not, they should hire you in recognition of all the help you’re giving on these forums.