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

fix: detect correct DRM driver on wayland #331

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AmmoniumX
Copy link

@AmmoniumX AmmoniumX commented Oct 3, 2024

Closes #330

After upgrading to linux kernel 6.11 and nvidia drivers 560, vaapi wouldn't use the right DRM drivers when on wayland. This PR fixes it by forcing it to search for the right DRM driver when on wayland, much like it was previously set to force it on x11.

As a disclaimer, I will admit that I'm not 100% sure if this is a "necessary" fix, or if it's just a band-aid patch to a misconfigured system on my side (Further testing is needed). However, it does fix my issue, and vainfo launches successfully on wayland. If it ends up that there's a better way to address the issue, feel free to close this PR.

@MartiUK
Copy link

MartiUK commented Oct 5, 2024

I can confirm this works.

@NyanMaths
Copy link

NyanMaths commented Oct 22, 2024

This works nicely for vainfo but other applications use DRM display by default anyway and die when trying to initialize vaapi. I set bool isDrm = false at the beginning of VAStatus __vaDriverInit_1_0(VADriverContextP ctx) function and it just works in other applications like freetube or firefox.
The stutters when changing workspaces playing videos in firefox is even gone after months ! lol nope
I don't know how to identify a nyavidia GPU in here but libva should default the display to wayland instead of DRM for this change to be more effective.

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 this pull request may close these issues.

libva selecting wrong DRM device on wayland: isNvidiaDrmFd Invalid driver for DRM device: i915
3 participants