mirror of
https://github.com/theupriser/steamify-cachyos-dev.git
synced 2026-10-05 12:45:56 +02:00
feat: the hw suite (H1, H4, H5, R1.7 CEC) and host-side suite blocks
vmsuite.sh runs NN-name.host.sh blocks on the host (reboot, scripts/vmcec.sh) with prelude-host.sh; every block that applies Steamify says so first (INFO) so the shared console is not silent for minutes. 68 checks pass.
This commit is contained in:
1 parent
b91ef9172e
commit
6d264acaf2
12 files changed
+50
-2
No files matched your search
Executable → Regular
+1
@@ -1,4 +1,5 @@
|
||||
# F3: every item and --boot desktop: all on, the boot-desktop unit enabled, VRAM left out with a warning.
|
||||
info "applying Steamify (installs packages, builds kernel modules: a few minutes)..."
|
||||
out=$(sf --defaults --options gaming,theme,glyphs,single,launcher,notify,vram,cec,machine,poweroff --boot desktop); rc=$?
|
||||
[[ $rc -eq 0 ]] && pass "F3 exit 0" || fail "F3 exit $rc"
|
||||
expect_on gaming theme glyphs single launcher notify machine poweroff cec
|
||||
|
||||
Executable → Regular
+1
@@ -1,4 +1,5 @@
|
||||
# F4: --options theme,single,machine --boot desktop: single brings the conversion; the rest stays off.
|
||||
info "applying Steamify (installs packages, builds kernel modules: a few minutes)..."
|
||||
sf --defaults --options theme,single,machine --boot desktop >/dev/null; rc=$?
|
||||
[[ $rc -eq 0 ]] && pass "F4 exit 0" || fail "F4 exit $rc"
|
||||
expect_on gaming theme single machine
|
||||
|
||||
Executable → Regular
+1
@@ -1,5 +1,6 @@
|
||||
# F5: --options launcher,vram,poweroff: poweroff brings Steam Machine support; conversion off, plasmalogin unchanged.
|
||||
dm_before=$(current_display_manager)
|
||||
info "applying Steamify (installs packages, builds kernel modules: a few minutes)..."
|
||||
sf --defaults --options launcher,vram,poweroff >/dev/null; rc=$?
|
||||
[[ $rc -eq 0 ]] && pass "F5 exit 0" || fail "F5 exit $rc"
|
||||
expect_on machine poweroff launcher
|
||||
|
||||
Executable → Regular
+1
@@ -1,4 +1,5 @@
|
||||
# F7: on an install, --boot desktop, again, --boot gamescope: only Boot into changes; the menu ticks stay.
|
||||
info "applying Steamify (installs packages, builds kernel modules: a few minutes)..."
|
||||
sf --defaults --options gaming,theme,single,launcher,notify,machine,poweroff >/dev/null
|
||||
base=$(ticks | sed 's/boot //')
|
||||
sf --boot desktop >/dev/null; rc=$?
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# H1 (LED driver) and H5 (power-off module) with the faked Steam Machine.
|
||||
info "applying Steamify (installs packages, builds kernel modules: a few minutes)..."
|
||||
sf --defaults --options gaming,theme,glyphs,single,launcher,notify,cec,machine,poweroff >/dev/null; rc=$?
|
||||
[[ $rc -eq 0 ]] && pass "Steamify applied (exit 0)" || fail "Steamify exit $rc"
|
||||
# H1
|
||||
lsmod | grep -q '^leds_valve' && pass "H1 leds_valve loaded" || fail "H1 leds_valve not loaded"
|
||||
n=$(compgen -G "/sys/class/leds/valve-leds*" | wc -l); [[ $n -eq 17 ]] && pass "H1 17 valve-leds nodes" || fail "H1 $n valve-leds nodes"
|
||||
own=$(stat -c %U /sys/class/leds/valve-leds*/brightness 2>/dev/null | sort -u | tr '\n' ' '); [[ "$own" == "$(id -un) " ]] && pass "H1 the nodes belong to the user" || fail "H1 node owner: $own"
|
||||
# H5
|
||||
for k in $(ls /usr/lib/modules); do
|
||||
compgen -G "/usr/lib/modules/$k/updates/dkms/steamify-fremont-poweroff.ko*" >/dev/null && pass "H5 power-off module built for $k" || fail "H5 no power-off module for $k"
|
||||
done
|
||||
sudo modprobe -r steamify_fremont_poweroff 2>/dev/null
|
||||
out=$(sudo modprobe steamify_fremont_poweroff 2>&1); rc=$?
|
||||
# in the VM there is no GPIO wake bit: it loads, or answers "No such device"
|
||||
[[ $rc -eq 0 ]] || grep -q "No such device" <<< "$out" && pass "H5 the module loads (or: No such device, no GPIO wake bit)" || fail "H5 modprobe: $out"
|
||||
@@ -0,0 +1,10 @@
|
||||
# H4: Boot into desktop, reboot: Plasma straight after boot; Boot into gaming: SDDM autologin into gamescope (session file).
|
||||
conf=/etc/sddm.conf.d/10-gamescope-autologin.conf
|
||||
info "applying Steamify (a few minutes)..."
|
||||
guest 'sf --defaults --options gaming,theme,single,machine --boot gamescope >/dev/null; echo done' | tail -n 1 | grep -q done && pass "H4 conversion applied" || fail "H4 apply"
|
||||
guest "grep -h '^Session=' $conf" | grep -qi gamescope && pass "H4 gaming: the SDDM autologin session is gamescope" || fail "H4 gaming session: $(guest "grep -h Session= $conf")"
|
||||
guest 'sf --boot desktop >/dev/null; echo done' | tail -n 1 | grep -q done && pass "H4 --boot desktop" || fail "H4 --boot desktop"
|
||||
reboot_guest && pass "H4 the VM is back after the reboot" || { fail "H4 no ssh after the reboot"; return 0 2>/dev/null || exit 0; }
|
||||
up=""; for _ in $(seq 40); do vm_ssh "pgrep -u $VM_USER -x plasmashell" >/dev/null 2>&1 && { up=1; break; }; sleep 3; done
|
||||
[[ -n "$up" ]] && pass "H4 Plasma straight after the boot (boot into desktop)" || fail "H4 no plasmashell after the reboot"
|
||||
guest 'sf --boot gamescope >/dev/null; echo done' | tail -n 1 | grep -q done && pass "H4 --boot gamescope" || fail "H4 --boot gamescope"
|
||||
@@ -0,0 +1,4 @@
|
||||
# R1.7 / H2: HDMI-CEC with vivid (fake TV and remote): scripts/vmcec.sh prints PASS/FAIL/SKIP (2 SKIP in the VM: wake from TV, sleep).
|
||||
info "applying Steamify (a few minutes)..."
|
||||
guest 'sf --defaults --options gaming,theme,glyphs,single,launcher,notify,cec,machine,poweroff >/dev/null; sudo modprobe vivid; echo done' | tail -n 1 | grep -q done && pass "CEC: Steamify applied, vivid loaded" || fail "CEC setup"
|
||||
"$repo/scripts/vmcec.sh" --no-sleep 2>&1 | sed 's/\x1b\[[0-9;]*m//g' | grep -E '^(PASS|FAIL|SKIP)|PASS|FAIL' | sed -E 's/^[^A-Z]*(PASS|FAIL|SKIP)/\1 CEC:/' | cut -c1-140
|
||||
@@ -6,6 +6,7 @@ for n in 1 3 4 5 6 7 8 9 10; do grep -qE "^ +$n +[a-z-]+ +\[x\]" <<< "$out" && p
|
||||
grep -qE "^ +11 .*\[ \]" <<< "$out" && pass "R1.1 Update BIOS not ticked" || fail "R1.1 Update BIOS ticked"
|
||||
grep -q "Boot into: \[gamescope\]" <<< "$out" && pass "R1.1 boots into gamescope by default" || fail "R1.1 boot default is not gamescope"
|
||||
# R1.2: everything OK, back in the menu with all on
|
||||
info "applying Steamify (installs packages, builds kernel modules: a few minutes)..."
|
||||
out=$(menu '\ny\nm\nq\nn\n')
|
||||
grep -q '^\[ERROR\]' <<< "$out" && fail "R1.2 errors: $(grep -m1 '^\[ERROR\]' <<< "$out")" || pass "R1.2 no errors"
|
||||
grep -q "^\[OK\]" <<< "$out" && pass "R1.2 applied (the run printed [OK] lines)" || fail "R1.2 printed no [OK] line"
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Sourced in front of a *.host.sh block (scripts/vmsuite.sh): the block runs on the host with the VM's ssh helpers.
|
||||
. "$repo/scripts/common.sh"
|
||||
info() { echo "INFO $*"; }
|
||||
pass() { echo "PASS $*"; }; fail() { echo "FAIL $*"; }; skip() { echo "SKIP $*"; }
|
||||
# guest <cmd...>: a command in the guest with the Plasma session environment and Steamify's libs
|
||||
guest() { { cat "$repo/share/vmtest/prelude.sh"; echo "$*"; } | vm_ssh -o ConnectTimeout=6 -o LogLevel=ERROR bash -s 2>&1 | sed 's/\x1b\[[0-9;]*m//g'; }
|
||||
waitssh() { local _; for _ in $(seq 60); do vm_ssh -o ConnectTimeout=4 'uptime -p' >/dev/null 2>&1 && return 0; sleep 5; done; return 1; }
|
||||
reboot_guest() { vm_ssh 'sudo systemctl reboot' >/dev/null 2>&1; sleep 25; waitssh; }
|
||||
@@ -1,6 +1,7 @@
|
||||
# Sent to the guest in front of every block (scripts/vmsuite.sh): helpers and Steamify's libs.
|
||||
# ssh has no Plasma session: the theme item (Vapor layout) needs one (vmrun.sh does the same).
|
||||
export XDG_RUNTIME_DIR=/run/user/$(id -u) WAYLAND_DISPLAY=wayland-0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus
|
||||
info() { echo "INFO $*"; }
|
||||
pass() { echo "PASS $*"; }; fail() { echo "FAIL $*"; }; skip() { echo "SKIP $*"; }
|
||||
sudo mountpoint -q /mnt || sudo mount -t 9p -o trans=virtio,version=9p2000.L repo /mnt
|
||||
cd /mnt || exit 1
|
||||
|
||||
Reference in new issue
Block a user