From 7f8781ab7ffab9ed34903c3ca2b1b3cc0894dc4e Mon Sep 17 00:00:00 2001 From: Kian Dadkhah Date: Sat, 7 Nov 2026 14:50:26 -0500 Subject: [PATCH 1/2] [ryoku] shell: read DDC brightness after Controls finishes opening 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 --- ryoku/shell/CHANGELOG.md | 4 ++++ .../shell/modules/sidebar/ControlsLevels.qml | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ryoku/shell/CHANGELOG.md b/ryoku/shell/CHANGELOG.md index 5f08410cf9..3ff9247570 100644 --- a/ryoku/shell/CHANGELOG.md +++ b/ryoku/shell/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog: ryoku/shell/ ## Unreleased +- **Opening Controls no longer makes the whole screen hitch.** With an external + monitor on DDC/CI, the panel read its brightness the moment it opened, and that + read stalled every display for a fraction of a second. It now reads once the + panel has finished opening, so the external brightness slider fills in a moment later. - **Windows reach the Shima dock again.** Under the Shima bar style the frame and the dock both reserved the dock's band, which left a dock-tall gap between windows and the dock. The frame's reservation is now the only one there. diff --git a/ryoku/shell/quickshell/shell/modules/sidebar/ControlsLevels.qml b/ryoku/shell/quickshell/shell/modules/sidebar/ControlsLevels.qml index 5974b8820c..2437c7e68e 100644 --- a/ryoku/shell/quickshell/shell/modules/sidebar/ControlsLevels.qml +++ b/ryoku/shell/quickshell/shell/modules/sidebar/ControlsLevels.qml @@ -45,8 +45,9 @@ Item { function syncActive(): void { if (root.active && root.showBrightness) { Devices.startProbes(root); - root.readExternalBrightness(); + externalReadDelay.restart(); } else { + externalReadDelay.stop(); root.volumeOpen = false; root.brightnessOpen = false; root.writeBrightness(); @@ -109,6 +110,15 @@ Item { } } + // A DDC/CI read that overlaps the panel's layers mapping stalled every + // output's frames for 45-200 ms on each open (seen on NVIDIA I2C), so the + // live level is read once the reveal has settled. + Timer { + id: externalReadDelay + interval: SidebarState.enterDuration + 400 + onTriggered: root.readExternalBrightness() + } + Timer { id: brightnessWrite interval: 90 From 1117259600a18c6bbcb1b5595f5130882091b9c8 Mon Sep 17 00:00:00 2001 From: Kian Dadkhah Date: Sat, 7 Nov 2026 14:59:13 -0500 Subject: [PATCH 2/2] [ryoku] shell: shorten the Controls DDC read delay to 250 ms 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. --- ryoku/shell/CHANGELOG.md | 4 ++-- .../quickshell/shell/modules/sidebar/ControlsLevels.qml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ryoku/shell/CHANGELOG.md b/ryoku/shell/CHANGELOG.md index 3ff9247570..1add6d0fad 100644 --- a/ryoku/shell/CHANGELOG.md +++ b/ryoku/shell/CHANGELOG.md @@ -3,8 +3,8 @@ ## Unreleased - **Opening Controls no longer makes the whole screen hitch.** With an external monitor on DDC/CI, the panel read its brightness the moment it opened, and that - read stalled every display for a fraction of a second. It now reads once the - panel has finished opening, so the external brightness slider fills in a moment later. + read stalled every display for a fraction of a second. It now reads a quarter + second after the panel appears, so the external brightness slider fills in a moment later. - **Windows reach the Shima dock again.** Under the Shima bar style the frame and the dock both reserved the dock's band, which left a dock-tall gap between windows and the dock. The frame's reservation is now the only one there. diff --git a/ryoku/shell/quickshell/shell/modules/sidebar/ControlsLevels.qml b/ryoku/shell/quickshell/shell/modules/sidebar/ControlsLevels.qml index 2437c7e68e..fd38276ccb 100644 --- a/ryoku/shell/quickshell/shell/modules/sidebar/ControlsLevels.qml +++ b/ryoku/shell/quickshell/shell/modules/sidebar/ControlsLevels.qml @@ -111,11 +111,11 @@ Item { } // A DDC/CI read that overlaps the panel's layers mapping stalled every - // output's frames for 45-200 ms on each open (seen on NVIDIA I2C), so the - // live level is read once the reveal has settled. + // output's frames for 45-200 ms on each open (seen on NVIDIA I2C); from + // 100 ms on there were none, so the live level is read after the map. Timer { id: externalReadDelay - interval: SidebarState.enterDuration + 400 + interval: 250 onTriggered: root.readExternalBrightness() }