Summary
roles/rdp-server/tasks/gpu_groups.yml resolves the GPU vendor with a single-answer if/elif chain that tests Intel first:
rdp_gpu_vendor: >-
{{ 'intel' if '0x8086' in (rdp_gpu_vendor_ids.stdout | default(''))
else 'amd' if '0x1002' in (rdp_gpu_vendor_ids.stdout | default(''))
else 'nvidia' if '0x10de' in (rdp_gpu_vendor_ids.stdout | default(''))
else 'virtio' if '0x1af4' in (rdp_gpu_vendor_ids.stdout | default(''))
else 'none' }}
A hybrid-graphics laptop exposes both vendors. The detection collapses that to a single value and Intel always wins.
Observed
On a hybrid laptop, both vendor IDs are present:
/sys/class/drm/card1/device/vendor:0x8086
/sys/class/drm/card2/device/vendor:0x10de
rdp_gpu_vendor resolves to intel, so vaapi.yml installs intel-media-va-driver-non-free for the integrated GPU. On this class of host gnome-remote-desktop encodes on the discrete NVIDIA GPU via NVENC, confirmed by nvidia-smi showing the daemon holding an encoder session and GPU memory. The nvidia-vaapi-driver branch is never selected.
Impact
Hybrid-graphics hosts get VA-API packages for the GPU that is not doing the encoding. The role's own status output then reports a vendor that does not match the hardware actually in use.
Suggested fix
Treat the vendor list as a set rather than a single value, and pick the driver for the GPU that actually carries the encoder, preferring the discrete GPU where both are present. At minimum, record all detected vendors so the status output is not misleading.
Summary
roles/rdp-server/tasks/gpu_groups.ymlresolves the GPU vendor with a single-answerif/elifchain that tests Intel first:A hybrid-graphics laptop exposes both vendors. The detection collapses that to a single value and Intel always wins.
Observed
On a hybrid laptop, both vendor IDs are present:
rdp_gpu_vendorresolves tointel, sovaapi.ymlinstallsintel-media-va-driver-non-freefor the integrated GPU. On this class of hostgnome-remote-desktopencodes on the discrete NVIDIA GPU via NVENC, confirmed bynvidia-smishowing the daemon holding an encoder session and GPU memory. Thenvidia-vaapi-driverbranch is never selected.Impact
Hybrid-graphics hosts get VA-API packages for the GPU that is not doing the encoding. The role's own status output then reports a vendor that does not match the hardware actually in use.
Suggested fix
Treat the vendor list as a set rather than a single value, and pick the driver for the GPU that actually carries the encoder, preferring the discrete GPU where both are present. At minimum, record all detected vendors so the status output is not misleading.