Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automatic backend driver loading does not work in xorgxrdp #582

Closed
akarl10 opened this issue Mar 19, 2022 · 0 comments · Fixed by #584
Closed

automatic backend driver loading does not work in xorgxrdp #582

akarl10 opened this issue Mar 19, 2022 · 0 comments · Fixed by #584

Comments

@akarl10
Copy link
Contributor

akarl10 commented Mar 19, 2022

xrdp can spawn a Xorg server that uses drm (/dev/dri/renderD*) as backend. As such opengl and vulkan work out of the box.
video acceleration seems to work to with also with at least radeonsi and iHD if forced with the appropriate environment variable (LIBVA_DRIVER_NAME=...)

Automatic selection of the driver however does not work.

I found that in va/x11/dri2_util.c there is a call to drmGetMagic that fails since there is no drm master in this case (Xorg runs on top of a render node, not card)

If I modify the code to check if dri_state->base.fd is a render node if drmGetMagic fails, skip VA_DRI2Authenticate it seems to do the trick.

Since I'm not a Xorg expert I don't know if this does not break something, but as far as I understand the whole drmGetMagic and subsequent authentication is only a /dev/dri/card thing (like in drm/va_drm.c in function va_DisplayContextGetNumCandidates, where it specifically checks if it is not a render node and if so it skips the magic/authentication steps)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant