Skip to content

rdp-server: single-vendor GPU detection misclassifies hybrid-graphics hosts #73

Description

@catinspace-au

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions