Repository navigation
Ignore DDC buses of displays ddcutil reports as invalid - #14397
myblu-admin wants to merge 2 commits into
Conversation
ddcutil detect lists monitors it could not talk to over DDC as "Invalid display" and still prints their I2C bus. omarchy-brightness-display-ddc harvested that bus, so every brightness read on such a monitor (e.g. an LG TV on DVI) ran a VCP read that failed only after ~6s of EIO retries, and the failure path deleted the cache, so the next read repeated the ~9s detect as well. omarchy-monitor-state, which the Display panel runs on every refresh, took ~21s per call as a result. Only a block headed "Display N" now yields a bus; invalid displays fall through to the existing 60s unavailable cache. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
The first test listed the invalid display ahead of the valid one, which passes even if the parser never resets "usable" on a non-Display header. Add the reverse order, and check that a valid display listed after an invalid one is still usable. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Reviewed, nothing found to change. What was checked: ddcutil's own report code ( Where it ran: on a disposable Omarchy worker, against this head merged with current Second opinion: Codex Medium reviewed the diff and found no defects. Independence isn't guaranteed, because it can read this session's notes. It pointed out one limit that's worth stating rather than fixing here: Related: #14525 caches a failed This is now waiting on the maintainer. |
|
Checked again now that #14525 has merged, and this is still needed. Why it still matters: #14525 caches a failed Where it ran: on a disposable Omarchy worker, against this head merged with current Second opinion: Codex Medium and muse-wonder (pi, thinking high) were each asked whether #14525 makes this redundant. Both found it is not and found no defect in the change against current Nothing was pushed. This is waiting on the maintainer. |
Problem
omarchy-brightness-display-ddctakes ~21s per call on a monitor that has an I2C bus but does not speak DDC/CI (here: an LG TV on DVI-D-1). Becauseomarchy-monitor-statecalls it on every refresh, the Display panel's DISPLAYS list stays stale for ~20s after enabling or disabling a monitor, and the panel's 5s poll keeps ddcutil busy the whole time it is open (766 ddcutil EIO lines in the journal in 15 minutes).Why
ddcutil --skip-ddc-checks detect --brieflists such a monitor as Invalid display but still prints its I2C bus:detect_busdoes not look at the block header, so it harvests bus 2.read_vcpon that bus then fails after ~6s of EIO retries, and the failure path deletes the cache file (deliberately, so transient failures are retried), so the next call repeats the ~9s detect as well.Measured on Omarchy 4.0.4-1, Hyprland 0.56.2, ddcutil 2.2.7, i9-9900K + RTX 2060 SUPER:
detect)Fix
Only a block headed
Display Nyields a bus. Blocks headedInvalid display(orPhantom display) fall through to the existing 60s unavailable cache, the same path as a monitor ddcutil does not list at all. The transient-read-failure behaviour for valid displays is unchanged.Test
test/shell.d/brightness-display-test.shgains a case where the ddcutil mock emits an Invalid display block ahead of the valid one. It checks that the invalid monitor gets no backend, that its bus is never probed withgetvcp, and that the result is cached (onedetectacross two calls). The case fails onquattroand passes with this change; the rest of the file and./test/clipass.🤖 Generated with Claude Code