Set Coolbits on Nvidia GPU without nvidia-xconfig or xorg.conf (Dual GPU AMD/Nvidia system)
Here is my xorg.conf with radeon as dual display and nvidia as gpu card:
Section "ServerLayout"
Identifier "layout"
Screen 0 "radeon"
Screen 1 "nvidia"
EndSection
Section "Device"
Identifier "radeon"
Driver "radeon"
Option "TearFree" "on"
BusID "PCI:8:0:0"
EndSection
Section "Screen"
Identifier "radeon"
Device "radeon"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:6:0:0"
EndSection
Section "Screen"
Identifier "nvidia"
Device "nvidia"
Option "AllowEmptyInitialConfiguration" "True"
Option "UseDisplayDevice" "none"
Option "Coolbits" "12"
EndSection
Replace anything taggued "radeon" with your display settings.
Replace the BusIDs with your cards BusIDs with one of the following commands:
$ nvidia-xconfig --query-gpu-info
$ lspci | grep VGA
With that configuration, I was unable to set the fan speed for the GPU card through the nvidia-settings command.
For that, we have to trick Xorg into thinking a display is connected to the GPU card.
Extract an EDID file (Extended Display Identification Data) from your current monitor and place it in your xorg.conf folder:
$ sudo apt install read-edid
$ sudo get-edid -m 0 > edid.bin
My final xorg.conf "Screen" config with all the Coolbits you can have and a fake monitor looks like:
Section "Screen"
Identifier "nvidia"
Device "nvidia"
Option "AllowEmptyInitialConfiguration" "True"
Option "UseDisplayDevice" "none"
Option "Coolbits" "28"
Option "ConstrainCursor" "off"
Option "ConnectedMonitor" "DFP-0"
Option "CustomEDID" "DFP-0:/usr/share/X11/xorg.conf.d/edid.bin"
EndSection
For more GPUs, add new Screens to the "ServerLayout" section and define pairs of "Device" and "Screen" sections for your additional cards.