3

My computer has one integrated graphics card and 2 Nvidia RTX 3070 GPUS. I am using Ubuntu 20.04 and nvidia-driver-530.

lspci | grep VGA 00:02.0 VGA compatible controller: Intel Corporation AlderLake-S GT1 (rev 0c) 01:00.0 VGA compatible controller: NVIDIA Corporation GA104 [GeForce RTX 3070 Lite Hash Rate] (rev a1) 05:00.0 VGA compatible controller: NVIDIA Corporation GA104 [GeForce RTX 3070 Lite Hash Rate] (rev a1) 

I am currently trying to test my 3070 graphics cards with the Phoronix Test Suite.

I am using nvidia-prime and prime-select: on-demand to run the terminal on the intel iGPU and phoronix tests on the Nvidia 3070: prime-run phoronix-test-suite run unigine-heaven.

There were some issues getting nvidia-prime to work, so I followed the suggestions from this article: https://askubuntu.com/questions/1364762/prime-run-command-not-found

cat /usr/bin/prime-run #!/bin/bash export __NV_PRIME_RENDER_OFFLOAD=1 export __GLX_VENDOR_LIBRARY_NAME=nvidia export __VK_LAYER_NV_optimus=NVIDIA_only export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json exec "$@" 

By using prime-run I am successfully able to run the phoronix test suite on GPU 0 which has bus id 01:00.0 / PCI:1:0:0.

However, I seem unable to run any tests with GPU 1 which has bus id 05:00.0 / PCI:5:0:0.

Modifying /etc/X11/xorg.conf by changing the bus number and rebooting as suggested by the following links didn't seem to do anything and still ran on GPU 0.

cat /etc/X11/xorg.conf # nvidia-xconfig: X configuration file generated by nvidia-xconfig # nvidia-xconfig: version 530.41.03 Section "ServerLayout" Identifier "Layout0" Screen 0 "Screen0" InputDevice "Keyboard0" "CoreKeyboard" InputDevice "Mouse0" "CorePointer" EndSection Section "Files" EndSection Section "InputDevice" # generated from default Identifier "Mouse0" Driver "mouse" Option "Protocol" "auto" Option "Device" "/dev/psaux" Option "Emulate3Buttons" "no" Option "ZAxisMapping" "4 5" EndSection Section "InputDevice" # generated from default Identifier "Keyboard0" Driver "kbd" EndSection Section "Monitor" Identifier "Monitor0" VendorName "Unknown" ModelName "Unknown" Option "DPMS" EndSection Section "Device" Identifier "Device0" Driver "nvidia" VendorName "NVIDIA Corporation" # BusID "PCI:1:0:0" BusID "PCI:5:0:0" EndSection Section "Screen" Identifier "Screen0" Device "Device0" Monitor "Monitor0" DefaultDepth 24 SubSection "Display" Depth 24 EndSubSection EndSection 

In fact, I deleted etc/X11/xorg.conf and was able to run the phoronix tests on GPU 0 without the conf file at all. I would guess that one of the drivers or programs I run automatically selects the nvidia card with the lowest bus id.

I would like to know where I should look to change the settings or any configuration files in order to select the second RTX 3070 gpu with the bus id 05:00.0. I would be more than happy to provide any further information.

3

1 Answer 1

2

In the prime-run script, I also need to set the variable

__NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G{CARD#}

using the card identifier found in xrandr --listproviders.

The official Nvidia guide listed below has the resolution to this problem, but I did not read the guide closely enough and missed it on my first read.

https://download.nvidia.com/XFree86/Linux-x86_64/495.44/README/primerenderoffload.html

/etc/X11/xorg.conf is unnecessary for this solution.

I missed the part about the OFFLOAD_PROVIDER because I was accessing the headless server remotely from a client without any Xsession or graphics display.

The machine must be running some type of GUI and not just a headless terminal environment. In my case, I installed lightdm onto my server and then everything worked.

I believe that the graphics needs to be using x11/ xorg and not wayland. For gdm3, xorg can be set to run by uncommenting

#WaylandEnable=false

in /etc/gdm3/custom.conf and rebooting.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.