Repository navigation
Remember a DDC display whose brightness cannot be read - #14525
Conversation
A display ddcutil detects but which does not answer getvcp 10 had its cache entry deleted on every failed read, so each call re-ran the full detect scan and the read again. Some monitors drop and re-train their link when probed, so with the monitor panel polling they blanked over and over. Cache the failure as unavailable for the same 60 seconds as a display detect does not find. Fixes #6855 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryRemembers displays whose DDC brightness cannot be read, while preserving immediate recovery for buses that answered before.
Reviews (2) · Last reviewed commit: "Retry a known DDC bus after one failed r..." · Reviewed by Greptile |
Caching every failed read as unavailable also caught a monitor that normally answers: one flaky getvcp from a panel poll hid its brightness control and turned its brightness keys into no-ops for 60 seconds. A failed read on a bus whose cache entry carries the range, which only a successful read writes, now drops the cache, as before, so the next call detects again; any other failed read is left alone for the window. The bare bus find_bus writes before reading does not count, so a caller overlapping a first probe cannot erase the negative cache it leaves. The display in #6855 never has a range cached, so it is still probed at most once a minute. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
|
Reviewed by Claude Opus 5.5, with Codex Medium as a second opinion over three rounds; its first two rounds each found a real defect in how failures were cached, and both are fixed in 0e3dc60 on this branch. What changed in 0e3dc60. As first opened, any failed Verified on a worker built from the Omarchy ISO, at 0e3dc60 and merged with
Limits.
Open PR #14397 changes This is waiting on the maintainer. |
* Remember a DDC display whose brightness cannot be read A display ddcutil detects but which does not answer getvcp 10 had its cache entry deleted on every failed read, so each call re-ran the full detect scan and the read again. Some monitors drop and re-train their link when probed, so with the monitor panel polling they blanked over and over. Cache the failure as unavailable for the same 60 seconds as a display detect does not find. Fixes omacom#6855 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Retry a known DDC bus after one failed read Caching every failed read as unavailable also caught a monitor that normally answers: one flaky getvcp from a panel poll hid its brightness control and turned its brightness keys into no-ops for 60 seconds. A failed read on a bus whose cache entry carries the range, which only a successful read writes, now drops the cache, as before, so the next call detects again; any other failed read is left alone for the window. The bare bus find_bus writes before reading does not count, so a caller overlapping a first probe cannot erase the negative cache it leaves. The display in omacom#6855 never has a range cached, so it is still probed at most once a minute. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com> --------- Co-authored-by: Omarchybot <317366263+omarchybot@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Codex Medium <noreply@openai.com> (cherry picked from commit 37b1f3a)
A display that
ddcutil detectlists but which does not answergetvcp 10was probed in full on every call toomarchy-brightness-display-ddc. Whenread_vcpfailed,read_brightnessdeleted the connector's cache file, so nothing remembered the failure: the next call re-randdcutil --skip-ddc-checks detect --briefand the read again. Some monitors, or the converters in front of them, drop and re-train the link when probed, and the monitor panel refreshes every few seconds while it is open, so those displays blanked over and over. Four reporters see this on AMD and Intel, from 4.0.0rc4 to 4.0.3.A failed read now writes the same
unavailable <timestamp>entry a display thatdetectdoes not find already gets, so it is probed at most once per 60 seconds. A display whose read fails only transiently loses DDC brightness until that window passes, and a cached bus left stale by a replug is rediscovered when it does. The test that pinned the old retry-every-call behaviour now checks that a failed read is cached without a second detect or read, and that an expired entry is retried.#14397 touches
detect_busin the same script for displays ddcutil reports as invalid; it is a different case and does not fix this one.Verified on a worker built from the Omarchy ISO:
test/shell.d/brightness-display-test.shfails with the fix reverted and passes with it, and./test/cliand the other brightness tests pass. Reviewed by Claude Opus 5.5 and, as a second opinion, Codex Medium, which found nothing to change.Fixes #6855