If you have 2 NVIDIA GPUs, get BusID parameters for both. The document you linked explains a couple of ways to do this, but nvidia-smi -a pretty easy.
You will need to figure out which GPU you want to save for display, and which you want to save for CUDA. Again, this should be pretty obvious from nvidia-smi -a
Suppose your nvidia-smi -a includes this section:
PCI Bus : 0x02 Device : 0x00 Domain : 0x0000 Device Id : 0x06D910DE Bus Id : 0000:02:00.0
Then change the device section as follows:
Section "Device" Identifier "Device0" Driver "nvidia" VendorName "NVIDIA Corporation" BusID "PCI:2:0:0" EndSection
Then reboot. Make sure the one you hold for display is the one that comes with the display screen.
You may also be interested in reading the nvidia driver readme and finding additional tips in the "BusID".
The document you linked refers to the Show section, but it should be the Device section.
source share