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.
21 lines
707 B
Bash
Executable File
21 lines
707 B
Bash
Executable File
#!/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"
|
|
|
|
read -r LS < "$LID_STATE_FILE"
|
|
|
|
case "$LS" in
|
|
*closed) swaymsg output "$LAPTOP_OUTPUT" disable ;;
|
|
*open) : ;; # leave to shikane
|
|
*) echo "Could not get lid state" >&2 ; exit 1 ;;
|
|
esac
|