feat: vmcec.sh tests HDMI-CEC against a fake TV; vmwake.sh wakes the VM over QMP

run.sh opens a QMP socket; the skill documents the CEC test and its gotchas.
This commit is contained in:
theupriser committed 2026-09-25 11:14:00 +02:00
1 parent 788d345a9d
commit 19b6ba4d97
4 files changed
+277 -21

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
# Wake the VM from sleep (suspend to RAM), e.g. after the TV's power button
# in the HDMI-CEC test. Uses the QMP socket run.sh opens in the VM directory.
# Env: VM_DIR (the repo if it holds disk.qcow2, else ~/vms/cachyos-test).
set -euo pipefail
here="$(cd "$(dirname "$0")/.." && pwd)"
VM_DIR="${VM_DIR:-$([[ -f "$here/disk.qcow2" ]] && echo "$here" || echo "$HOME/vms/cachyos-test")}"
sock="$VM_DIR/qmp.sock"
[[ -S "$sock" ]] || { echo "No QMP socket at $sock (VM not running, or started before run.sh had -qmp)." >&2; exit 1; }
printf '%s\n' '{"execute":"qmp_capabilities"}' '{"execute":"system_wakeup"}' |
socat -t 2 - UNIX-CONNECT:"$sock" 2>/dev/null | grep -c '"return"' >/dev/null && echo "Wake-up sent."