Repository navigation
Conversation
TVs and many OLED monitors have no DDC/CI, so the brightness keys and the Display panel slider did nothing on them. When the DDC probe fails on an external display, dim with hyprsunset gamma instead, never below 20% so the screen stays readable. The failed probe is remembered for a minute because each one takes several seconds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Automated AI review
Verified: on the happy path the fallback does what the description says. When the DDC probe fails on an external display, steps go to Two behavioural problems showed up in sandboxed runs with stubbed Starting hyprsunset from this script keeps the brightness lock held
Controls: with hyprsunset already running (as after the nightlight toggle), repeated steps work. Adding Impact: on a session where hyprsunset is not already running, the first gamma step works, then the brightness keys and the Display panel slider silently stop for every display (laptop panel, Apple and DDC monitors included) until hyprsunset exits. The panel shows the value it tried to set until its next refresh (within 5 s while open). Suggested change: close the descriptor for the launch, for example Any DDC helper failure switches a working DDC monitor to global gamma, and the dimming stays
Impact: on a monitor where DDC works, one failed DDC call turns the keys and slider into global gamma for 60 s, which also dims every other output. Dimming set in that window survives the return to DDC control: reads then report the DDC value, and nothing in the brightness UI brings gamma back to 100. How often real monitors produce such failures was not measured. Suggested change: mark a display as DDC-less only when the read probe fails, not on invalid arguments or failed writes (consider requiring more than one failed probe for a monitor that has answered before). When DDC control succeeds while gamma is below 100, restore gamma. Related open PRs
Smaller notes
Optional test improvement: of nine single-line mutations of the new logic, the updated test caught only the removal of the 20% floor. Not caught: the 60 s marker never honoured or never written (the DDC-less mock has no I2C bus, so the DDC helper's own cache hides it; the author's bus-found, Review informationTest scope: source review of the pinned head and merge-base, and of hyprsunset 0.4.0, hyprctl (Hyprland 0.56.2), uwsm 0.27.0, systemd-run 262 and util-linux setsid 2.42.4 source. The PR's test and scenario scripts ran in an isolated sandbox with every display, DDC and hyprsunset command stubbed; the AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check. Opt out: To stop receiving these reviews, reply to this comment saying so. |
|
Are you 100% sure my PR doesn't fix this already? It went through a lot of iterations + upstream research. If so, please close this to reduce noise for maintainers |
|
Checked it on my LG TV before answering. They fix different things: #9876 is for monitors where DDC works but the first write gets ignored. My TV has no working DDC/CI at all. ddcutil finds the bus, but getvcp 10 fails, so your helper (tested at f1617fa) exits after the read and never gets to the write it retries. So they complement each other rather than overlap. I'd keep this one open for now. |
|
Heads-up on overlap: #14525 (remember a DDC display whose brightness can't be read) and #14397 (skip DDC buses ddcutil reports as invalid) both change the same "DDC probe failed" path in |
TVs and many OLED monitors don't support DDC/CI, so on those displays the brightness keys and the Display panel slider do nothing. Follows up on #8302.
When the DDC probe fails on an external display,
omarchy-brightness-displaynow dims withhyprsunsetgamma instead:detectfinds an I2C bus, thengetvcptimes out). Without this, each key press and each panel refresh would stall.Known limits:
Tested on an LG OLED TV over DP (via a dock) with no DDC/CI.
test/shell.d/brightness-display-test.shcovers the fallback, the 20% floor, and retrying DDC after the fallback expires.🤖 Generated with Claude Code