Repository navigation
Drop the stale DDC brightness read after a write - #20065
edneymatias wants to merge 1 commit into
Conversation
Some monitors (Samsung Odyssey G5) answer the first VCP 0x10 read after a write with the value from before it. The display panel's next refresh then moved the slider back to the previous brightness. Read once after the write and discard the answer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[Medium impact] The PR appears safe to merge. Summary
Reviews (1) · Last reviewed commit: "Drop the stale DDC brightness read after..." · Reviewed by Greptile |
|
The CLI suite (141 checks) and The automated case models the stale reply; the worker has no Odyssey G5, so it cannot establish the physical result. This still needs confirmation from a maintainer or an affected issue reporter against this full commit: set several brightness levels, wait through the panel's next five-second refresh, and confirm that both the slider and an independent brightness read stay at the new level. Please include the monitor model, connection, ddcutil version and tested SHA, and note whether repeated adjustments become noticeably slower. On an affected test machine, this checks out and activates the exact revision: git clone --filter=blob:none https://github.com/omacom/omarchy.git ~/omarchy-pr-20065
git -C ~/omarchy-pr-20065 fetch origin pull/20065/head
git -C ~/omarchy-pr-20065 checkout --detach d672a8f040c8a4d372858a916f2682a4a6fa728c
omarchy dev link ~/omarchy-pr-20065Reboot when prompted, then try 40%, 16% and 30% from the Display panel and read each back with There is also an interaction with #9876: its verified DDC write would exit on the reported G5 verification failure before this PR's discarded read runs. These address different monitor failures; a combined change would need to account for both. This PR remains open awaiting hardware confirmation. |
What changes
On a Samsung Odyssey G5 (HDMI, DDC/CI), the Display panel's brightness slider changes the monitor's brightness, then jumps back to the previous value: set 10 from 100 and the slider returns to 100, set 50 and it shows 10.
The cause is the monitor: the first VCP 0x10 read after a write returns the value from before the write, however long the read waits. Only the second read is correct. The panel's 5 s refresh does one read, so it gets the stale value.
(read1 is 2 s after the write.) This is also why a verified
setvcpfails on this monitor withDDCRC_VERIFY: ddcutil's verification read gets the old value.omarchy-brightness-display-ddcnow reads VCP 0x10 once right after a successful write and discards the answer. That costs one extra DDC read per write and changes nothing for monitors that answer correctly.Verification
bash test/shell.d/brightness-display-test.sh: all pass. The new case models a monitor that answers late and fails on the base branch (the final read returns the old brightness). Two existing read-count assertions now count the throwaway read.Screenshots
No visible change beyond the slider staying where it was set: the fix is in the DDC helper the Display panel calls.
🤖 Generated with Claude Code