Skip to content

fix(linux/kms): skip NVIDIA cards for VAAPI on hybrid GPU laptops#4473

Merged
ReenigneArcher merged 1 commit intoLizardByte:masterfrom
coleleavitt:feat/linux/add-xdg-portal-grab
Jan 26, 2026
Merged

fix(linux/kms): skip NVIDIA cards for VAAPI on hybrid GPU laptops#4473
ReenigneArcher merged 1 commit intoLizardByte:masterfrom
coleleavitt:feat/linux/add-xdg-portal-grab

Conversation

@coleleavitt
Copy link
Contributor

@coleleavitt coleleavitt commented Dec 5, 2025

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

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

Copilot AI review requested due to automatic review settings December 5, 2025 17:40
Copy link

Copilot AI left a 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

@ReenigneArcher

This comment was marked as resolved.

@coleleavitt

This comment was marked as resolved.

@ReenigneArcher ReenigneArcher changed the base branch from feat/linux/add-xdg-portal-grab to master December 6, 2025 20:15
@ReenigneArcher

This comment was marked as resolved.

@ReenigneArcher ReenigneArcher changed the base branch from master to feat/linux/add-xdg-portal-grab December 15, 2025 22:58
cgutman
cgutman previously approved these changes Jan 2, 2026
ReenigneArcher

This comment was marked as resolved.

@ReenigneArcher ReenigneArcher force-pushed the feat/linux/add-xdg-portal-grab branch from 70a1b64 to 9f0aefb Compare January 17, 2026 04:03
@coleleavitt coleleavitt force-pushed the feat/linux/add-xdg-portal-grab branch from e66337d to 9218612 Compare January 19, 2026 19:20
@coleleavitt coleleavitt changed the base branch from feat/linux/add-xdg-portal-grab to master January 19, 2026 19:20
@coleleavitt coleleavitt dismissed cgutman’s stale review January 19, 2026 19:20

The base branch was changed.

@coleleavitt

This comment was marked as resolved.

@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (master@5ecf7dc). Learn more about missing BASE report.
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/platform/linux/kmsgrab.cpp 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #4473   +/-   ##
=========================================
  Coverage          ?   15.39%           
=========================================
  Files             ?       94           
  Lines             ?    19178           
  Branches          ?     8861           
=========================================
  Hits              ?     2952           
  Misses            ?    14930           
  Partials          ?     1296           
Flag Coverage Δ
Archlinux 11.47% <0.00%> (?)
FreeBSD-14.3-amd64 13.73% <ø> (?)
Homebrew-ubuntu-22.04 13.78% <0.00%> (?)
Linux-AppImage 11.79% <0.00%> (?)
Windows-AMD64 13.36% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/platform/linux/kmsgrab.cpp 3.83% <0.00%> (ø)

@codecov
Copy link

codecov bot commented Jan 20, 2026

Bundle Report

Bundle size has no change ✅

@ReenigneArcher ReenigneArcher force-pushed the feat/linux/add-xdg-portal-grab branch from 9218612 to 4f0bf9a Compare January 25, 2026 22:48
@LizardByte LizardByte deleted a comment from sonarqubecloud bot Jan 25, 2026
@sonarqubecloud
Copy link

@ReenigneArcher ReenigneArcher merged commit 38a94b3 into LizardByte:master Jan 26, 2026
54 checks passed
@coleleavitt coleleavitt deleted the feat/linux/add-xdg-portal-grab branch February 7, 2026 19:44
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.

3 participants