Skip to content

VRR capable monitor detection (New)#2465

Open
tomli380576 wants to merge 19 commits into
mainfrom
vrr-capable-monitor-detection
Open

VRR capable monitor detection (New)#2465
tomli380576 wants to merge 19 commits into
mainfrom
vrr-capable-monitor-detection

Conversation

@tomli380576

@tomli380576 tomli380576 commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

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

codecov Bot commented Apr 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.92308% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.04%. Comparing base (03581f9) to head (707d809).
⚠️ Report is 43 commits behind head on main.

Files with missing lines Patch % Lines
providers/base/bin/detect_vrr.py 96.92% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2465      +/-   ##
==========================================
+ Coverage   58.86%   59.04%   +0.17%     
==========================================
  Files         476      478       +2     
  Lines       48007    48180     +173     
  Branches     8570     8603      +33     
==========================================
+ Hits        28260    28446     +186     
+ Misses      18855    18840      -15     
- Partials      892      894       +2     
Flag Coverage Δ
provider-base 34.75% <96.92%> (+0.74%) ⬆️

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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.

@tomli380576 tomli380576 marked this pull request as ready for review May 26, 2026 03:06
@tomli380576 tomli380576 requested a review from Copilot May 26, 2026 03:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

Comment thread providers/base/tests/test_detect_vrr.py Outdated
@tomli380576 tomli380576 marked this pull request as draft May 27, 2026 07:09
@tomli380576 tomli380576 marked this pull request as ready for review May 27, 2026 08:44
@baconYao

Copy link
Copy Markdown
Contributor

Interesting topic!
One quick question, have you tried to pack the libdrm-test deb package into Checkbox, maybe in the checkbox-support?

@tomli380576

tomli380576 commented May 28, 2026

Copy link
Copy Markdown
Contributor Author

Interesting topic! One quick question, have you tried to pack the libdrm-test deb package into Checkbox, maybe in the checkbox-support?

Nope, because this script is supposed to achieve the same thing without including libdrm-test. You can try this on any device by running replacing slugify with str() and run python3 detect_vrr.py

@tomli380576 tomli380576 marked this pull request as draft May 28, 2026 05:50
@tomli380576 tomli380576 marked this pull request as ready for review May 28, 2026 06:01
@fernando79513 fernando79513 self-assigned this Jun 8, 2026
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.

4 participants