Repository navigation
[ryoku] shell: read DDC brightness after Controls finishes opening - #759
Open
techapostle wants to merge 2 commits into
Open
techapostle wants to merge 2 commits into
techapostle wants to merge 2 commits into
Conversation
Controls started `ddcutil getvcp` the moment it opened. On a desktop with an external monitor on DDC/CI that read (about 0.3 s, almost all kernel time on NVIDIA I2C) overlapped the panel's overlay layers mapping, and every output dropped frames: a second display running a 120 Hz frame probe showed two stalls per open, about 45 ms and 80 to 200 ms. Neither the read alone, the read with the panel already mapped (opening the Brightness drawer), nor mapping a bare overlay reproduced it. The open path now starts the read once the enter motion has settled, and stops the pending read on close. The read still runs on every open and nothing runs while the panel is closed. Note: Fixed: opening Controls no longer makes every screen stutter when an external monitor's brightness is controlled over DDC/CI
The stall only overlaps the first ~100 ms while the panel's layers map, not the reveal motion. Bracketed on the same setup (100 ms, 250 ms, enterDuration, enterDuration+200, enterDuration+400, three warm opens each) every delay showed no stalls, so a fixed 250 ms keeps margin, fills the slider in sooner and no longer depends on the motion speed.
6 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Opening Controls (Super+Escape) on a desktop whose external monitor is driven over DDC/CI made every output stutter.
ControlsLevels.qmlranddcutil getvcp 10the moment the panel opened. That call takes about 0.3 s, nearly all of it kernel time on NVIDIA I2C, and it overlapped the panel's overlay layers mapping.Measured with a separate 120 Hz frame-probe client on a second display:
getvcprun on its ownSo the stall needs DDC traffic overlapping the map. The
qsprocess peaks at about 70% of one core for about 0.4 s on a cold open and stays low on warm opens, so this is not a CPU or GPU load spike.The open path now starts the read through a 250 ms timer, and closing stops a pending read. The stall only overlaps the first ~100 ms while the layers map: delays of 100 ms, 250 ms,
enterDuration,enterDuration + 200andenterDuration + 400all showed no stalls over three warm opens each, so a fixed 250 ms keeps margin without tying the read to the motion speed. The read still runs on every open and nothing runs while the panel is closed, which keeps the docs/sidebars.md rule that display probing runs only while its surface is active. The trade-off: the live level lands about 0.5 s after opening instead of about 0.35 s. On a warm reopen the slider shows the last known value until then; on a cold open it reads as unavailable until then.Separate from this change: the first cold open after a shell reload still showed one ~47 ms stall from building the surface. It did not recur in later runs.
Area
ryoku
How it was tested
Arch, Hyprland 0.57.0, NVIDIA, external monitor on DDC bus 1, Ryoku 1.0.7 (f7197d7), with this change applied to the live shell:
ryoku-shell quicksettingswhile the frame probe recorded. Stalls on open went from two per open to none on warm opens.bin/ryoku-dev-lint-qmlandbin/ryoku-dev-verify-qml-bindingspass. qmllint shows only the unqualifiedSidebarStateaccess the file already has.Checklist
[area] scope: summarycommit subject.CHANGELOG.mdupdated in the area I touched.--no-verify.luac -p), shell scripts passbash -n, and QML passesqmllintwhere applicable.