Skip to content

VRR capable monitor detection (New)#2465

Draft
tomli380576 wants to merge 4 commits intomainfrom
vrr-capable-monitor-detection
Draft

VRR capable monitor detection (New)#2465
tomli380576 wants to merge 4 commits intomainfrom
vrr-capable-monitor-detection

Conversation

@tomli380576
Copy link
Copy Markdown
Contributor

@tomli380576 tomli380576 commented Apr 15, 2026

Description

This PR implements a script that can detect whether the DUT is connected to any VRR capable monitors. This is supposed to act as the resource job for graphics/variable-refresh-rate-manual when has_vrr is set to true. See #2464 for more context. #2464 and this PR can be merged in any order, they don't reference each other yet. There will be 1 last PR after this one is merged to put everything together.

Resolved issues

#2464 as it is right now doesn't actually check whether the DUT is connected to a VRR capable monitor.

Documentation

The basic idea is to mimic what modetest -connectors does (this command comes from libdrm-tests). modetest will print these lines for a VRR capable monitor:

103 vrr_capable:
    flags: immutable range
    values: 0 1
    value: 1

If VRR is impossible, this property is either 0 or missing altogether. This script uses the same libdrm API calls to find this value.

The exact lines we are mimicking

Tests

Manually checked the output of this script against GNOME's output in gnome settings.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 15, 2026

Codecov Report

❌ Patch coverage is 0% with 53 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.80%. Comparing base (03581f9) to head (b5084c7).

Files with missing lines Patch % Lines
providers/base/bin/detect_vrr.py 0.00% 53 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2465      +/-   ##
==========================================
- Coverage   58.86%   58.80%   -0.07%     
==========================================
  Files         476      477       +1     
  Lines       48007    48060      +53     
  Branches     8570     8581      +11     
==========================================
  Hits        28260    28260              
- Misses      18855    18908      +53     
  Partials      892      892              
Flag Coverage Δ
provider-base 33.90% <0.00%> (-0.11%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tomli380576 tomli380576 requested a review from Copilot April 15, 2026 06:58
Copy link
Copy Markdown
Contributor

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.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

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.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants