mirror of
https://github.com/theupriser/steamify-cachyos-dev.git
synced 2026-10-05 12:45:56 +02:00
fix: boot check: the power-off fix is loaded, or was tried at boot and refused (journal); it grepped dmesg for systemd's error, which only sometimes lands there
This commit is contained in:
1 parent
d614539d9e
commit
0447f35e7d
1 file changed
+7
-1
@@ -4,7 +4,13 @@ pass() { echo "PASS $*"; }; fail() { echo "FAIL $*"; }
|
|||||||
k=$(uname -r)
|
k=$(uname -r)
|
||||||
echo "kernel: $k"; echo "cmdline: $(cut -c1-140 /proc/cmdline)"
|
echo "kernel: $k"; echo "cmdline: $(cut -c1-140 /proc/cmdline)"
|
||||||
compgen -G "/usr/lib/modules/$k/updates/dkms/steamify-fremont-poweroff.ko*" >/dev/null && pass "power-off fix built for the running kernel" || fail "no power-off fix for $k"
|
compgen -G "/usr/lib/modules/$k/updates/dkms/steamify-fremont-poweroff.ko*" >/dev/null && pass "power-off fix built for the running kernel" || fail "no power-off fix for $k"
|
||||||
sudo dmesg | grep -q "steamify_fremont_poweroff" && pass "power-off fix loaded at boot" || fail "power-off fix not loaded"
|
# Loaded (a real Steam Machine), or tried at boot and refused with "No such device" (the VM has no AMD GPIO
|
||||||
|
# controller, so the module returns -ENODEV silently). The refusal is in the journal; it only sometimes
|
||||||
|
# reaches dmesg, which is what this used to grep.
|
||||||
|
if lsmod | grep -q '^steamify_fremont_poweroff'; then pass "power-off fix loaded at boot"
|
||||||
|
elif sudo journalctl -b -q --no-pager -u systemd-modules-load | grep -q "steamify_fremont_poweroff.*No such device"; then
|
||||||
|
pass "power-off fix tried at boot (No such device: no AMD GPIO controller in the VM)"
|
||||||
|
else fail "power-off fix not loaded, and not tried at boot"; fi
|
||||||
lsmod | grep -q '^leds_valve' && pass "leds_valve loaded" || fail "leds_valve not loaded"
|
lsmod | grep -q '^leds_valve' && pass "leds_valve loaded" || fail "leds_valve not loaded"
|
||||||
[[ -z "$(systemctl --failed --no-legend)" ]] && pass "no failed units" || { fail "failed units:"; systemctl --failed --no-legend; }
|
[[ -z "$(systemctl --failed --no-legend)" ]] && pass "no failed units" || { fail "failed units:"; systemctl --failed --no-legend; }
|
||||||
# B1: booted through the loader's own EFI boot entry, not the firmware's automatic disk entry (the
|
# B1: booted through the loader's own EFI boot entry, not the firmware's automatic disk entry (the
|
||||||
|
|||||||
Reference in new issue
Block a user