fix(shikane): detect silent deadlocks; re-apply profile on sway reload
watchdog: covers both observed deadlock flavours -- the loud one that repeats "Received invalid input AtomicChangeDone at state Discarded", and the silent one that logs nothing and just never leaves VariantInProgress. shikane-recover-on-reload.sh (new, previously referenced by sway/config but never committed): shikanectl reload -> sleep 2 -> watchdog check, falling back to a service restart when reload cannot recover. clamshell-mode.sh: documents why the laptop panel is no longer enabled unconditionally on lid-open, which raced shikane's "External Display" profile (eDP-1 disabled by design) and produced "Atomic commit failed: Device or resource busy" churn.
This commit is contained in:
1 parent
0ceec0b4ab
commit
d1bd6aae48
3 files changed
+43
-9
No files matched your search
@@ -1,4 +1,12 @@
|
||||
#!/bin/sh
|
||||
# Lid-driven laptop panel handling.
|
||||
#
|
||||
# shikane is authoritative for output layout/scaling
|
||||
# (~/.config/shikane/config.toml + shikane-watchdog.timer). This script used to
|
||||
# run `swaymsg output eDP-1 enable` whenever the lid was open, which on every
|
||||
# `swaymsg reload` raced the shikane "External Display" profile (eDP-1 off) and
|
||||
# contributed to "Atomic commit failed: Device or resource busy" churn.
|
||||
# It now only ever disables.
|
||||
|
||||
LAPTOP_OUTPUT="eDP-1"
|
||||
LID_STATE_FILE="/proc/acpi/button/lid/LID/state"
|
||||
@@ -6,7 +14,7 @@ LID_STATE_FILE="/proc/acpi/button/lid/LID/state"
|
||||
read -r LS < "$LID_STATE_FILE"
|
||||
|
||||
case "$LS" in
|
||||
*open) swaymsg output "$LAPTOP_OUTPUT" enable ;;
|
||||
*closed) swaymsg output "$LAPTOP_OUTPUT" disable ;;
|
||||
*open) : ;; # leave to shikane
|
||||
*) echo "Could not get lid state" >&2 ; exit 1 ;;
|
||||
esac
|
||||
Reference in new issue
Block a user