-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(linux/kms): skip NVIDIA cards for VAAPI on hybrid GPU laptops #4473
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
base: feat/linux/add-xdg-portal-grab
Are you sure you want to change the base?
fix(linux/kms): skip NVIDIA cards for VAAPI on hybrid GPU laptops #4473
Conversation
This is not present in the glad version imported in Sunshine, plug the holes so that these functions may be used.
Add a new portal "grab" implementation that will request the necessary permissions over XDG portals and use Pipewire for video data streaming. This supports DMA-Buf buffer exchange for hardware accelerated encoding (VAAPI, nvenc), software encoding will only work with memory buffers.
Require GIO and PIPEWIRE packages for portal support and use SYSTEM include directories. Also, clarify the fatal error message order for missing dependencies.
Pipewire has been added to the dependency lists for FreeBSD, Arch, Fedora, Homebrew, and Debian-based packaging and build scripts. This ensures proper support and integration for systems using Pipewire.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds logic to skip NVIDIA graphics cards when searching for VAAPI-capable devices in KMS (Kernel Mode Setting) display capture. This is particularly important for hybrid GPU laptops where the display may be connected through an NVIDIA GPU but hardware encoding should occur on the Intel/AMD GPU that supports VAAPI.
Key Changes
- Added NVIDIA card filtering for VAAPI device enumeration in two critical locations within kmsgrab.cpp
- The filtering occurs during both display initialization and display name enumeration
- Debug logging added to track when NVIDIA cards are being skipped for VAAPI
|
|
Thank you for the PR! I think this should target the master branch instead of the feature branch that was selected. Is it okay if I change the base branch? |
yea go right ahead thank you |
Looks like that didn't quite work. Can you rebase your branch so it's based on our master branch? |
ReenigneArcher
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coleleavitt can you fix this PR so that it's based on the master branch instead of a draft PR branch?
70a1b64 to
9f0aefb
Compare



Description
Skip Nvidia cards if we're looking for VAAPI devices. This is important for hybrid GPU laptops where the display may be connected through NVIDIA but rendering happens on Intel.
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage