A very straightforward way is to set the BIOS to use your onboard device (i.e., Intel graphics) if possible. Your Nvidia card will be powered but 100% idle. Tested on Intel UHD graphics 630 on Ubuntu 20.04.3, and the Nvidia driver is the latest 495.46.
- CAUTION: connect your monitor to the onboard port rather than the Nvidia card.
- If you have fuzzy desktop, then try to uninstall intel driver by
sudo apt purge xserver-xorg-video-intel
. - Install the Nvidia driver with the official .run file with the option "--no-opengl-files". (No need to use this option. If you did, you would miss some libs like optix.)
- For the problem "unable to load nvidia-drm", you may blacklist nvidia, e.g., by using prime-select intel. Check the blacklist under /lib/modprobe.d/.
- Using modprobe to load kernel modules.
- Using rmmod to unload a kernel module.
- Using lsmod to see what kernel modules have been loaded.
The file xorg.conf at /etc/X11/ may read as:
Section "ServerLayout"
Identifier "layout"
Screen 0 "intel"
EndSection
Section "Device"
Identifier "intel"
Driver "modesetting"
BusID "PCI:0:2:0"
EndSection
Section "Screen"
Identifier "intel"
Device "intel"
EndSection