Skip to content

[ryoku] fix(wayfire): make the HDR toggle actually engage - #946

Closed
LangerSword wants to merge 1 commit into
Ryoku-dev:unstable-devfrom
LangerSword:fix/wayfire-hdr-renderer
Closed

LangerSword wants to merge 1 commit into
Ryoku-dev:unstable-devfrom
LangerSword:fix/wayfire-hdr-renderer

Conversation

@LangerSword

@LangerSword LangerSword commented Nov 23, 2026 •

Copy link
Copy Markdown

Fixes Ryoku-dev/ryoku #933 — Wayfire HDR toggle never engages.

Wayfire 0.11 / wlroots 0.20 only applies output colour transforms with the Vulkan renderer, but the SDDM Wayland session wrapper dropped WLR_RENDERER from the environment it imports, so an environment.d override never reached the compositor. The Hub also advertised the HDR capability unconditionally, offering a control Wayfire could not honour on GLES2.

  • ryoku-wayland-session: import WLR_RENDERER alongside the other selected environment variables.
  • wayfire/caps.go: in live sessions, drop wm.CapOutputHdr unless WLR_RENDERER=vulkan; offline installer/doctor probes keep the full manifest.
  • Two regression tests: the wrapper exports a renderer override, and the capability follows the renderer (offline / vulkan / GLES2).

This keeps Vulkan opt-in rather than forcing an experimental renderer; docs were not changed in this PR.

Verification: go test ./... in ryoku/wm passes all four packages; gofmt -l and git diff --check clean. No competing PR was found for #933, and my other open PRs in this repo (#928, #929, #936) do not touch these files.

RetriggerView in GreptileConfidence Score: 5/5

The reviewed changes appear safe to merge.

Summary

The session launcher now carries the user's renderer choice into the desktop, and Wayfire hides HDR controls in live sessions unless Vulkan is selected.

  • The Wayfire session now receives the chosen renderer.
  • Wayfire offers HDR controls only when its live renderer supports them.

No new actionable issues found.

Reviews (6) · Last reviewed commit: "[ryoku] wayfire: gate the HDR capability" · Reviewed by Greptile

Copilot AI lite review requested due to automatic review settings November 23, 2026 00:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@neur0map neur0map left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🔍 Review findings — 2 blocking issue(s): see the inline comments and the walkthrough for details.

Comment thread ryoku/wm/wayfire/caps.go
Comment on lines +160 to +166
if live() && os.Getenv("WLR_RENDERER") != "vulkan" {
// GLES2 cannot apply the colour transform the HDR toggle needs, so
// a live session on it must not offer the control. Offline probes
// never reach this branch and keep the full manifest.
kept := out[:0]
for _, c := range out {
if c != wm.CapOutputHdr {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🟡 minor · Maintainability · fix: low effort

Hiding the HDR control is a user-facing change, but the PR contains no matching area changelog note. Add a note describing when the control is available.

Reply here to discuss, say it's fixed, or explain why it's intended — no mention needed.

@neur0map

neur0map commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

🦊 mika's review

Incremental review: new commits since the last checkpoint.

Summary

  • Preserve renderer overrides in the SDDM Wayland session.
  • Hide Wayfire HDR controls in live sessions without Vulkan.
  • Add regression tests for capability detection and environment imports.

Change diagram

flowchart LR
  Env["User manager environment"] --> Wrapper["SDDM session wrapper"]
  Wrapper -->|WLR_RENDERER| Session["Wayfire session"]
  Session --> Caps["Wayfire HDR capability"]
  Caps --> Hub["Displays controls"]
Loading

Estimated review effort: 3/5 · risk: medium

📁 Walkthrough details

ryoku/lockscreen/sddm/ryoku-wayland-session

  • Import WLR_RENDERER from the user manager so renderer overrides reach the session.
    • Add WLR_RENDERER to the session environment allowlist.

ryoku/wm/wayfire/caps.go

  • Remove CapOutputHdr from live Wayfire capabilities unless WLR_RENDERER is vulkan.
  • Preserve the full HDR capability manifest for offline probes.
    • Gate live HDR capability on renderer selection.

ryoku/wm/wayfire/caps_renderer_test.go

  • Cover HDR capability reporting for offline, Vulkan, and default-renderer probes.
    • Add renderer-dependent capability regression tests.

ryoku/wm/wayfire/session_wrapper_test.go

  • Exercise the wrapper's environment import with a stubbed systemctl, without starting a compositor.
  • Check that the test does not mistake an inherited renderer for an imported value.
    • Add session renderer import regression tests.

ryoku/CHANGELOG.md

  • Document the HDR control visibility and session renderer override fixes.
    • Add an unreleased fix entry.

No actionable findings. Mika looked for bugs, security issues, and risks in the diff and came up empty on clear defects.

🛠 Deterministic checks run
  • golangci-lint: not installed (skip)

🚦 Merge recommendation: changes_required


🦊 Generated by Mika — the Ryoku org's self-hosted AI code reviewer. Machine findings: verify before merging.

@neur0map neur0map added area:ryoku Ryoku project area type:chore Maintenance work labels Nov 23, 2026
Comment thread ryoku/wm/wayfire/caps_renderer_test.go Resolved
Comment thread ryoku/wm/wayfire/caps.go Resolved
@LangerSword
LangerSword changed the base branch from main to unstable-dev November 23, 2026 14:37

@neur0map neur0map left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🔍 Review findings — 1 blocking issue(s): see the inline comments and the walkthrough for details.

t.Run("offline probe keeps the manifest", func(t *testing.T) {
// socketPath also scans XDG_RUNTIME_DIR for a live socket, so an
// empty WAYFIRE_SOCKET alone is not offline on a compositor desktop.
t.Setenv("XDG_RUNTIME_DIR", t.TempDir())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🟡 minor · Maintainability · fix: low effort

Commit 9e5d4db2 has no scope or colon in its subject. Change it to the required [area] scope: summary format before merging.

Reply here to discuss, say it's fixed, or explain why it's intended — no mention needed.

@LangerSword
LangerSword force-pushed the fix/wayfire-hdr-renderer branch from 9e5d4db to 7b15094 Compare November 23, 2026 14:42

@neur0map neur0map left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🔴 Changes requested — 0 critical and 1 major issue(s): see the inline comments and the walkthrough for fixes and an agent-ready prompt.

Comment thread VERSION Resolved
Comment thread VERSION Resolved
@LangerSword

Copy link
Copy Markdown
Author

Fixed the findings: the session-wrapper comment no longer names a compositor, the area changelog note is in, and the renderer tests isolate XDG_RUNTIME_DIR and clear inherited WLR_RENDERER. Base is now unstable-dev. New head 7b15094.

Note: Fixed: HDR renderer gate now passes WM isolation, changelog, and test isolation checks
@LangerSword
LangerSword force-pushed the fix/wayfire-hdr-renderer branch from 7b15094 to 9914432 Compare November 23, 2026 16:30
@neur0map
neur0map dismissed their stale review November 23, 2026 16:32

Blocking findings were addressed (verified at 99144324ed).

@LangerSword

Copy link
Copy Markdown
Author

VERSION is restored to 1.1.1; the branch no longer rolls the release number back. New head 9914432.

@Sipper1236 Sipper1236 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice fix—the HDR control now follows the live renderer, and the session-wrapper test covers the environment handoff. Approved.

@LangerSword

Copy link
Copy Markdown
Author

@Sipper1236 This is approved at current head 99144324 and the target checks pass. Merge call is yours when you have time. No rush.

@neur0map

Copy link
Copy Markdown
Member

Thanks for the work here, Wayfire is on its way out of Ryoku so I'm not adding more to it and I'm closing this one

@neur0map neur0map closed this Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ryoku Ryoku project area type:chore Maintenance work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants