Repository navigation
Conversation
|
Reviewed by Claude Opus 5 at high effort, with an independent second opinion from Codex XHigh. Tests were run on a disposable VM built from the Omarchy ISO, not on the review host. Nothing pushed to your branch — the two substantive findings are design calls that are yours and the maintainer's to make, not mine to decide by pushing. Tests: The mechanism looks right for the LG. Your fallback is exactly the 1. A failed write now disables reads too, for 60 seconds ( That empty read reaches 2. The false OSD survives on the panel's scroll-wheel path. 3. Every later write pays full DDC checks for the rest of the session. 4. Cost and retry bound both check out. A slider drag does not verify per step: 5. The new tests do not prove "temporarily". Codex flagged this and I confirmed it by mutation on the worker: the suite still passes with Codex agreed with findings 1 and 3, which I had already reached and demonstrated before it finished — its independence is not currently guaranteed, so read that as agreement rather than as confirmation. Findings 2, the wall-clock gap in 4, and the mutation-checkable claim in 5 came from it and are its own contribution. On the linked issues: this addresses #8931 as filed. It does not touch #8523 — that one is the internal backlight, where Waiting on you for findings 1 and 3, and on the maintainer for whether the class-2 behaviour in #8931's thread — a monitor that rejects every write, so the slider disappears — is the outcome you both want. |
8117472 to
d2ebc3b
Compare
|
Everything except the timeout is addressed in the two commits above. Finding 1: I chose to keep the display readable. A rejected write now simply fails. On a monitor that rejects every write the slider stays visible and snaps back to the real value, and no OSD is shown. No write only negative cache, since the key lock and the single in flight write in the panel already bound repeat attempts. Finding 3: I removed the marker entirely. Every write probes the fast path and retries with full checks, so nothing can latch. Displays that need full checks pay one extra failed attempt per write, a fraction of a second on a path that is slow either way. Finding 2: The wheel path now shows the OSD from the exit handler only when the helper exits zero. A failed write drops any queued follow up and refreshes so the slider snaps back. Finding 5: The tests assert that a rejected fast write is retried with full checks and that a read still succeeds afterwards. Each mutation now fails a named assertion. Finding 4: Left out as pre existing and noted in the description. |
A rejected write now simply fails instead of marking the connector unavailable, so a single verify failure no longer hides the brightness slider for a minute. The full-checks marker is gone as well: every write probes the fast path and retries with full checks, which keeps the helper stateless at the cost of one extra attempt on displays that need the full checks. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015EZqaWWvjgPA8FxycKiVfv
The bar icon wheel path showed the OSD before the write finished, so a display that rejects writes still looked like it changed. The OSD now waits for the helper to exit zero, and a failed write drops any queued follow-up and refreshes so the slider snaps back to the real value. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015EZqaWWvjgPA8FxycKiVfv
d2ebc3b to
db46f54
Compare
|
Re-reviewed at db46f54 by Claude Opus 5 at high effort, with an independent second opinion from Codex XHigh. Everything measured below ran on a disposable VM built from the Omarchy ISO, not on the review host. Findings 1, 2, 3 and 5 are fixed, and I checked each by running it rather than by reading it. Finding 1 — a rejected write no longer touches the bus cache. Three consecutive rejected writes against a mock Finding 3 — the marker is gone and the fast path is probed every time. On a display that always needs the fallback, three writes produced exactly six Finding 2 — the wheel sets Finding 5 — the one I was most sceptical of, and it holds. Six mutations, each caught by a named assertion: Tests at db46f54: On the timeout you left out of scope, I measured what it costs so the decision is on the record. With a mock Three things still open, none of which I think should block.
So Codex also observed that the new QML behaviour has no test — deleting the success-OSD block or the failure refresh leaves the whole suite green. That is true, and it is the one place the suite is now weaker than the helper it covers. I rejected one of its claims: it said a second input during a failed start can strand On #10120, which was filed after your push: orthogonal at this head, and worth saying explicitly because it was not orthogonal at 5e2338d. #10120 is the read path — Also cleared from last time: the question about a monitor that rejects every write is largely answered — the slider stays and snaps back rather than vanishing. Nothing is waiting on you. This is with the maintainer now. Codex reviewed at xhigh. It reached the fixes for findings 1 and 3 alongside conclusions I had already demonstrated, so read that as agreement rather than confirmation — its sandbox restricts writes, not reads, so its independence is not currently guaranteed. The false-negative reasoning above, the Quickshell start-failure mechanism, and the missing QML test coverage are its own contributions, and I verified each before repeating it. |
Refreshing on a rejected write re-reads brightness, and an empty read clears brightnessAvailable and hides the slider until the next poll -- the race the comment above the handler already warns about. Track the percentage the hardware last confirmed and revert to that instead. Letting a write in flight own brightnessPercent, rather than having the 5s poll overwrite it mid-write, makes it the value the hardware still owes us. That retires pendingBrightnessPercent and brightnessSetQueued. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TbAGLrXMLvUZXmJxaRh1K7
|
A rejected write made the panel read its state again. An empty read clears A write in flight now owns
Hardware testI ran the commands from this branch on the affected display (LG UltraGear 27GM950B-B, DisplayPort). After each command I read the actual value with
I did not run the QML in a live shell, because this desktop uses the packaged shell. The helper is verified on the hardware. The panel behaviour is covered by the tests only. Upstream status (rockowitz/ddcutil#626)The maintainer replied on 7 September. He added the option We cannot use the new option now. Arch Linux supplies ddcutil 2.2.7, and 2.2.7 stops with |
|
Great news! The upstream issue paid off and ddcutil 3.0.1 is now released and packaged in Arch Extra, so this PR now uses the public Note: this does expect the new version to be present for this to work. Currently |
|
Confirming this on a second monitor and GPU, with the root cause, and some latency numbers for the approach in this PR. Setup: Dell Alienware AW3926QW on DP-3, NVIDIA RTX 5070 Ti (driver 610.57, Root cause (details and a raw i2c reproduction in rockowitz/ddcutil#626): every ddcutil process probes slave address 0x37 by writing a single 0x00 byte. This monitor treats that as a malformed DDC/CI frame and discards the next message. A read gets a null response and ddcutil silently retries; a Set VCP is dropped. That is why a read on the same handle before the write "primes" the display: it is the sacrificial message. It is not NVIDIA-specific (the LG in #626 is on amdgpu), and ddcutil 3.0.2 still sends the probe on the What the PR's ddcutil invocation costs here (3.0.2, stock settings, fresh process per call, monitor value read back over raw i2c afterwards):
So the PR makes the write correct on this hardware, which is the important part, but a keypress becomes 0.4–0.8 s and a held key advances at 1–2 steps per second (the script's For comparison, the same script with a local shim that answers its two ddcutil calls directly over i2c-dev (no probe, no EDID read, no sleeps) is ~65 ms per keypress including the OSD and ~18 steps/s on a held key, all writes landing. Not proposing that for Omarchy, just to show where the floor is once the probe is out of the way. Suggestions, in case they help the design:
Happy to test revisions on this hardware. |
|
Update from the ddcutil side, since it changes the picture for this PR. The root cause is fixed upstream. In rockowitz/ddcutil#626 the maintainer changed the slave-address probe (it is now a one byte read with a zero length write fallback, instead of the one byte write these monitors choke on) and made
For comparison, this PR's invocation took 390–840 ms here on 3.0.2, because the first write was always lost and the retry was always needed. What that means for the PR, as I see it:
One small, independent win: Happy to re-test any revision on this hardware. |
|
Re-reviewed at f1617fa by Claude Opus 5.5, with a second opinion from Codex at medium effort. The tests ran on a disposable VM built from the current Omarchy ISO, not on the review host. Nothing was pushed to your branch. Blocking: on the ddcutil that Omarchy ships today, every external brightness write fails. The current ISO installs ddcutil 2.2.7-1. The package databases of the Omarchy mirrors list 2.2.7-1 on ddcutil rejects the arguments before it opens any bus, so this does not depend on the monitor. The helper hides stderr and exits 1, and These are the options as I see them. The choice is yours or the maintainer's:
Smaller findings in
The panel test checks the source text, not the behaviour. On the worker, I changed Tests at f1617fa, with the shell linked to the branch on the worker: From the last review: the stale Related: #13332 decides that a display has no DDC/CI when this helper exits nonzero. With this PR on ddcutil 2.2.7, every DDC monitor would exit nonzero, so the two PRs need to agree on that exit contract. Codex found the same 2.2.7 failure from the measured facts I gave it. It agreed with me there, and its independence is not guaranteed. The three This is now waiting on you: the PR needs to handle ddcutil 2.2.7, or the maintainer needs to decide to hold it until the mirrors carry 3.x. |
|
Another affected model: Dell Alienware AW3926QW (39" 5k2k) over USB-C.
Same symptom as #14648 / #8931: Tested the ddcutil invocations directly on hardware (not the PR branches themselves):
So this PR's approach works on the AW3926QW and is faster than dropping the flag. |
|
Looked again at f1617fa because of two changes since the last review: the new hardware report above, and #14691, which fixes the same bug a different way. The branch has not moved, so the earlier test results still apply and nothing was re-run except the check below. Nothing was pushed. The ddcutil 2.2.7 problem is still there. I checked the Omarchy mirrors on a disposable VM today. Competing fix: #14691. It drops The parts of this branch that #14691 does not have are still worth having once stable carries ddcutil 3.x and verification can rely on it:
Those would make a good follow-up then. Whether to hold this pull request for that, or rework it on top of #14691, is the maintainer's call. Second opinion: Codex at medium effort, given both diffs and the mirror facts and asked which should win. It also chose #14691, for the same 2.2.7 reason. That is agreement, and its independence is not guaranteed. It could not fetch #14691's diff itself, so I checked that diff against the description it was given. Waiting on the maintainer. |
[Medium impact] The PR appears safe to merge; no new actionable issues were found. SummaryThis PR uses full DDC checks and readback verification, reports failed writes, and keeps brightness changes tied to their monitor.
|
|
Looked at d0158f3 because the branch moved. This was not a full review: Claude Opus 5.5 read the new diff, but no second opinion ran. The configured reviewer (Codex Medium) answers, but this machine has used up its review allowance for today. Classifying the change and choosing between competing fixes both need that second opinion, so the classification is unsettled for now. No tests were run and nothing was pushed. The blocker from the last review is gone, going by the diff. The external write in #14691 is open again. The last comment recommended #14691 over this pull request only because this one broke brightness on ddcutil 2.2.7. That reason no longer applies. Both now write with full DDC checks. #14691 keeps Nothing is waiting on you. This item comes round again when a second opinion can run. |
|
Looked at a98eb81 because the branch moved again. This was not a full review either. Claude Opus 5.5 read the new commit, but no second opinion ran. The configured reviewer (Codex Medium) answers, but this machine has used up its review allowance for today. The classification still needs that second opinion, so it stays unsettled and the class labels stay off. No tests were run and nothing was pushed. What the new commit does, going by the diff: it moves the panel's brightness bookkeeping out of The full review on a worker, and the choice between this and #14691, come on the next pass that has a second opinion. Nothing is waiting on you. |
|
Note 🤖 Claude Opus 5.5 responding on behalf of john-griffin Another monitor with the same symptom, the AOC AGP277KXM over DisplayPort (amdgpu, ddcutil 3.0.2, Omarchy 4.5.0), plus a trace that I think explains the cause. With Sending the same pair twice in one call keeps the fast path and lands every time on this monitor: ddcutil --bus "$bus" --skip-ddc-checks --noverify setvcp 10 "$raw_target" 10 "$raw_target"
ddcutil 2.2.7 already loops over multiple |
The monitor panel now shows one display at a time from per-display brightness levels. The brightness controller follows the shown display (the focused one unless the picker shows another) and takes its level from those polls; the bar wheel and IPC write to the same display.
|
Reviewed The earlier ddcutil 2.2.7 option problem is gone from the diff, and #14691 closed without merging. This pass found two remaining panel integration problems by tracing the source:
The new Apple cache and brightness model test cases also belong in the existing area test files under the base branch's No contributor code or tests ran in this session: our triage policy permits execution only after branch protection is confirmed, and the release branches reported |
A verified write now updates the shown display's cached level, and a poll that started before a write can't put the old level back, so showing a display again starts from what its hardware holds. The panel returns to the focused display before its open-time read, so the controller doesn't reject that read as stale.
The brightness model and native lifecycle tests now live in monitor-test.sh, and the Apple cache test upstream removed stays removed.
|
Not done: a display switch during a running poll keeps the previous poll's level until the next one (≤5 s), which isn't worth a queued re-read. Happy to split the helper and panel changes if the maintainer prefers. |
|
Re-reviewed The open-time ordering is corrected: Two cases still lose the value of a successful write:
The new cache tests cover completion on the selected monitor and protection of the poll-start monitor; they do not cover these two sequences. The native fixture loads the controller and slider rather than the full panel wiring. No contributor code or tests ran, and nothing was pushed. Our triage rules require confirmed release-branch protection before executing contributor code; |
|
Both cases fixed in 53ea914: a verified write is now recorded for the display it was written to, and a poll that was running when it landed can't replace it. This replaces the generation-based |
|
Re-reviewed Successful writes are now saved for their original monitor, and the poll merges every write completed while it was running over its older readings. One related sequence still leaves the controller behind the cache: start A at 30%, request 70%, then select B and return to A before the write finishes. Returning creates a new A epoch using the cached 30%. When the old A write succeeds, Opus 5.5 High agrees with this remaining source trace. muse-wonder via pi at high thinking effort treats the A → B → A behavior as intended epoch conservatism. I am retaining the finding because the stale value determines the next hardware write, rather than only delaying the slider display. No contributor code or tests ran, no worker/UI captures were taken, and nothing was pushed. Our triage rules require confirmed branch protection before execution; |
|
I checked the new handoff from #20297 against Aditya Kumar's equal-value move guard is a small integration candidate: No changes were pushed, and the #20297 handoff remains pending. The earlier findings at this head are unchanged. Our triage rules require confirmed branch protection before executing contributor code; |
|
Hi @Murderlon thanks so much for this. I tested ddcutil 3.0.3-dev with the probe fix from rockowitz/ddcutil#626 on an LG UltraGear+ with DP-1 and unmodified quattro lands 5/5 writes cleanly (~66 ms even with --skip-ddc-checks --verify, vs. ~1.1 s on 3.0.2 with full checks). Rather than merging the slower 3.0.2 workaround here, we're going to wait for ddcutil 3.0.3 to land hopefully super soon and revisit any remaining verification/panel improvements cleanly on top of it. I'll keep this PR open. |
Fixes #8931
Upstream investigation: rockowitz/ddcutil#626
Why
Some DDC monitors ignore brightness writes while Omarchy reports success. The previous revision also required an option unavailable in ddcutil 2.2.7, which Omarchy stable still ships.
What changed
Why the larger diff
The extra work makes verified writes reliable all the way to the UI. The panel preserves newer input while a write runs, rolls back failures, and prevents old results from affecting another monitor. A dedicated brightness controller and regression tests keep those guarantees in one place, reducing scattered state and making future changes safer.
DDC call timeouts remain a separate follow-up.
Tradeoffs
Every external write now pays for full DDC checks and readback verification. This favors compatibility and confirmed results over the skipped-check optimization. There is no retry loop or compatibility branch.
Blast Radius
Brightness keys, the panel slider, and bar-icon scrolling share the write result. Read failures still invalidate their own cache; a rejected write leaves the readable display cache intact.
Verification
./test/clipassed. Apple retry failure was exercised using a real cached HID node with a stubbed writer.getvcp 10reads confirmed the requested values. The installed package was unchanged.