Content-driven HDR output and Legion Go 2 display script - #2148
Open
matte-schwartz wants to merge 6 commits into
Open
Content-driven HDR output and Legion Go 2 display script#2148matte-schwartz wants to merge 6 commits into
matte-schwartz wants to merge 6 commits into
Conversation
matte-schwartz
force-pushed
the
matts/go2-workarounds
branch
from
August 4, 2026 19:43
8faaee5 to
a1cab34
Compare
This uses the current content being displayed to determine whether or not to engage an HDR colorspace. Any live window with an HDR commit keeps the output in HDR, with no hysteresis by design, so browsing the Steam UI over a running HDR game does not bounce the panel through PQ modesets on focus changes. --hdr-debug-force-output overrides the content check and forces HDR output unconditionally.
… omit it Display scripts may now omit any of the HDR luminance fields and pick them up from the panel's EDID HDR static metadata block instead of hardcoding values in Lua. Values a script does provide still win field by field. If neither the script nor the EDID supplies a value, the BackendConnectorHDRInfo defaults apply rather than the old get_or defaults, which no in-tree script relies on.
Add VFP timings for the non-VRR frame limiter, and enable content_driven HDR mode to workaround lack of Steam support for backlight control while the Go 2's panel is outputting PQ content. This can be re-assessed when Steam supports internal panels with HDR that behave less like the Steam Deck OLED when it comes to brightness adjustment.
sysfs attribute change notifications arrive as EPOLLPRI, which HandleEvents previously dropped. Add an OnPollPri hook so a waitable can watch a sysfs file.
…t is in PQ Some panels ignore hardware backlight control while receiving PQ, which leaves Steam's brightness slider dead in HDR sessions. Watch the sysfs backlight and reapply the fraction as a luminance gain baked into the shaper and 3D LUTs, so direct scanout keeps working. The muted look of very deep dims is the panel's own PQ near-black behavior and reproduces under other compositors doing signal-side dimming. This should be generalized in Steam, but for now we can enable it in individual panel configurations.
The panel claims AUX backlight control works in HDR mode over DPCD, but its firmware ignores those writes while the output is in PQ, along with the VESA luminance control registers it also advertises. Follow the slider in software instead.
matte-schwartz
force-pushed
the
matts/go2-workarounds
branch
from
August 13, 2026 04:52
a1cab34 to
4d7934d
Compare
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.
Some HDR panels (e.g. Legion Go 2) bypass sysfs backlight control while running in PQ mode, leaving the Steam brightness slider non-functional for SDR content and non-linear for HDR content. As a workaround, add an opt-in content-driven HDR mode that switches the panel to HDR only while an app is actively submitting HDR content.
This doesn't fix the underlying issue so the slider will still be non-linear for HDR content, but it makes the device more usable for SDR content and the Steam UI until there's proper brightness-control support for internal HDR panels that cannot blend hardware and gamma brightness control together.