- iGPU will be used for main display and rendering daily-use softwares in default
- Dedicated GPUs will be used for computing or offload rendering
- Reduce the used VRAM of Dedicated GPU, which is mostly used for X11 server rendering
OS: Ubuntu 18.04.4 LTS
Mainboads
├── iGPU
│ ├── HDMI -> Monitor 1
│ └── DisplayPort -> Monitor 2
├── GTX 1080 Ti
│ └── Any port (unused)
└── GTX 1650
└── Any port (unused)
- After the Ubuntu installation, your system can boot into GUI and detect multiple monitors with full resolution. That means iGPU works out-of-the-box. Otherwise you need to install iGPU driver.
Open Terminal and execute lshw -c video
to check (1) which driver of iGPU is being used and (2) the bus id of iGPU. For instance, Intel iGPU uses intel
or i915
driver, and its bus id is pci@0000:00:02.0
in most cases.
Execute sudo nano /etc/X11/xorg.conf
to add these configuration.
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0"
Option "AllowNVIDIAGPUScreens"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
EndSection
Section "Device"
Identifier "Device0"
Driver "i915"
VendorName "Intel Corporation"
BusID "PCI:0:2:0"
EndSection
sudo apt install nvidia-headless-515 nvidia-utils-515
- Install
sudo apt install nvidia-driver-515
- Open Terminal and execute
nvidia-settings
to open "NVIDIA X Server Settings". InPRIME Profiles
, chooseNVIDIA On-Demand
lsmod | grep nvidia_drm
If not, manually load it to linux kernel
sudo modprobe nvidia_drm
cat /var/log/Xorg.0.log
and the query result by executing xrandr --listproviders
should show that the Providers: number :
is more than 1.
glxheads
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxheads
Now you simply set an alias to offload rendering in needed.
echo "alias offload-render='__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia'" >> ~/.bashrc
source ~/.bashrc
offload-render glxheads
[1] https://gist.github.com/wangruohui/bc7b9f424e3d5deb0c0b8bba990b1bc5
[2] https://download.nvidia.com/XFree86/Linux-x86_64/435.17/README/primerenderoffload.html
For a system with an UHD770 and a RTX3060 on Ubuntu 23.04, Kernel 6.4. Installed the nvidia-headless-535. The driver needs to be "modesetting" on "newer" Systems even if
lshw -c video
is showing "i915". Xorg will fail otherwise because i915 is a kernel driver and can't be loaded as a Xorg module.Example xorg.conf