drm: allow disabling VRR on legacy surfaces - #2189
Merged
Merged
Conversation
5 tasks done
Member
|
Sorry, but this needs a rebase, before I can merge |
Legacy DRM does not expose the VRR_ENABLED property, so use_vrr currently returns UnknownProperty even when asked to disable VRR. This requires callers to check VRR support before requesting the inactive state, unlike the atomic backend. Treat use_vrr(false) as a successful no-op on legacy surfaces. Continue returning UnknownProperty when attempting to enable VRR. Tested: - cargo test --features test_all_features - cargo fmt --all -- --check Developed with AI assistance (OpenAI Codex); all changes have been reviewed and are understood by the author. Signed-off-by: Jim Witte <jim@thunderingbison.com>
jimwitte
force-pushed
the
fix-legacy-drm-vrr-disable
branch
from
September 30, 2026 13:58
348b151 to
bbe5aa6
Compare
Contributor
Author
|
@Drakulix rebased onto current master and force-pushed the branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
DrmSurface::use_vrrcurrently returnsUnknownProperty("VRR_ENABLED")for both enabling and disabling VRR when Smithay uses legacy DRM.The legacy backend does not support VRR and reports VRR as unsupported and disabled. The atomic backend treats an absent
VRR_ENABLEDproperty as an error only when VRR is being enabled.Change
Have
use_vrr(false)returnOk(())on the legacy backend while preserving the existing error foruse_vrr(true). This allows compositors to request the disabled state without first checking whether VRR is supported.A downstream workaround was proposed in pop-os/cosmic-comp#2884. COSMIC calls
use_vrr(false)while rendering, so the legacy backend's error can produce anUnknownProperty("VRR_ENABLED")warning every frame.Handling the disabled state in Smithay avoids requiring consumers to add a capability check and aligns the legacy behavior with the atomic backend.
Testing
cargo test --features test_all_featurescargo fmt --all -- --checkThe linked cosmic-comp PR documents the original issue and hardware testing of the downstream workaround. This Smithay change has not been tested against legacy DRM hardware.
AI assistance is disclosed in the commit message in accordance with Smithay's AI policy.
Checklist