From 6194b5c27198a1d13299f3fa671f213e98a1fb0e Mon Sep 17 00:00:00 2001 From: The_miro Date: Thu, 9 Jul 2026 15:48:23 +0200 Subject: [PATCH] fix(hyprlua): drop racy cw+ccw autostart rotation workaround MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The double-rotate on every Hyprland start existed to fix monitor scale getting corrupted by rotation. Verified live (Hyprland 0.55.4): scale stays exactly pinned across a transform change as long as it's set explicitly (monitors.lua already does scale=1.0, not "auto"), so the workaround is no longer needed upstream. It was also a source of a real race: unified-rotate.sh reads current transform via `hyprctl monitors -j`, and the fixed 0.3s gap between the two invocations isn't guaranteed long enough for the first rotate to commit before the second reads state — especially with a dozen other autostart commands firing concurrently in the same block. A lost race leaves the monitor (and touchscreen, which unified-rotate.sh also retargets) transform mismatched after boot. Root-caused this while investigating why a QEMU test VM's monitor stayed stuck at transform:1 after every fresh boot. unified-rotate.sh itself is untouched — still used by the manual rotate buttons on the touch bar. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01TLz6HWsXCwzQ97LrLt2em6 --- desktopenvs/hyprlua/hypr/usr/autostart.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/desktopenvs/hyprlua/hypr/usr/autostart.lua b/desktopenvs/hyprlua/hypr/usr/autostart.lua index ba51b7d..304fde5 100644 --- a/desktopenvs/hyprlua/hypr/usr/autostart.lua +++ b/desktopenvs/hyprlua/hypr/usr/autostart.lua @@ -8,7 +8,6 @@ hl.on("hyprland.start", function() hl.exec_cmd("bash ~/Dotfiles/desktopenvs/hyprlua/scripts/ulwatchdog.sh") hl.exec_cmd("bash ~/Dotfiles/desktopenvs/hyprlua/scripts/ewwstart.sh") hl.exec_cmd("udiskie -t -m nested -n") - hl.exec_cmd("~/.config/scripts/unified-rotate.sh cw && sleep 0.3 && ~/.config/scripts/unified-rotate.sh ccw") hl.exec_cmd("systemctl --user start hyprpolkitagent") hl.exec_cmd("hyprsunset") hl.exec_cmd("nm-applet")