Short explanation of the working stack that avoids the i915/GEM shmem leak by using the NVIDIA render node for XRDP.
This gist was drafted with help from an AI assistant based on a live debugging session on this host. Verify details before applying to your system.
- XRDP + xorgxrdp (glamor build)
- DRI3 enabled
- NVIDIA render node (
/dev/dri/renderD129) used by xrdp Xorg - Intel i915 is not used for the XRDP session rendering
- Kernel:
6.18.5-zen1-1-zen(x86_64) - GPUs:
- Intel HD 630 (i915)
00:02.0 [8086:591b] - NVIDIA GTX 1050 Mobile
01:00.0 [10de:1c8d]
- Intel HD 630 (i915)
- X server:
XLibre X Server 1.25.0 - XRDP:
0.10.4.1 - NVIDIA driver:
580.126.09
xrdp 0.10.4.1-2xlibre-xorgxrdp-glamor 0.10.4-2xlibre-xserver-bootstrap 25.0.0.20-1xlibre-xserver-common 25.0.0.20-1xlibre-xserver-devel 25.0.0.20-1mesa 1:25.3.3-2nvidia-580xx-dkms 580.126.09-1nvidia-580xx-utils 580.126.09-1pipewire-module-xrdp 0.2-1
With DRI3 + glamor on i915, XRDP allocates large GEM objects that grow over time and land in shmem, causing OOM. Pointing XRDP to the NVIDIA render node moves the rendering workload away from i915 and the growth stops. nvidia-smi confirms Xorg is using GPU memory.
Find render nodes on your system:
ls -lah /dev/driMap render nodes to Intel/NVIDIA:
udevadm info -q property -n /dev/dri/renderD128 | rg -n 'ID_PATH|DRIVER'
udevadm info -q property -n /dev/dri/renderD129 | rg -n 'ID_PATH|DRIVER'Then match with PCI IDs:
lspci -nnk | rg -n -A3 -B1 '00:02.0|01:00.0'Or use the by-path symlinks:
ls -lah /dev/dri/by-pathPrevious (Intel i915 render node):
Section "Device"
Identifier "Video Card (xrdpdev)"
Driver "xrdpdev"
Option "DRMDevice" "/dev/dri/renderD128"
Option "DRI3" "1"
Option "DRMAllowList" "amdgpu i915 msm radeon"
EndSectionCurrent (NVIDIA render node):
Section "Device"
Identifier "Video Card (xrdpdev)"
Driver "xrdpdev"
Option "DRMDevice" "/dev/dri/renderD129"
Option "DRI3" "1"
Option "DRMAllowList" "nvidia i915 amdgpu msm radeon"
EndSectionRestart XRDP after change:
sudo systemctl restart xrdp xrdp-sesmannvidia-smiXorg should appear using NVIDIA VRAM.