If you have 2 NVIDIA GPUs, get the BusID parameters for both. The doc you linked explains a couple ways to do that, but nvidia-smi -a
is pretty easy.
You will need to figure out which GPU you want to keep for display, and which you want to keep for CUDA. Again, this should be pretty obvious from nvidia-smi -a
Let's suppose your nvidia-smi -a
includes a section like this:
PCI
Bus : 0x02
Device : 0x00
Domain : 0x0000
Device Id : 0x06D910DE
Bus Id : 0000:02:00.0
Then modify the device section like this:
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BusID "PCI:2:0:0"
EndSection
Then reboot. Make sure the one you are keeping for display is the one with the display cable attached!
You may also be interested in reading the nvidia driver readme and search on "BusID" for additional tips.
The document you linked references a "Display" section but that should be the "Device" section.