Merge pull request #10 from theupriser/bugfix/dkms-for-leds

Bugfix/dkms for leds
This commit is contained in:
theupriser authored and GitHub committed 2026-09-24 12:57:33 +02:00
commit 40dfaee0b5
5 files changed
+56 -24

No files matched your search

+4 -2
View File
@@ -147,8 +147,10 @@ gamescope and the Plasma desktop. Primary target: the Valve Steam Machine
device check, never flashes) and a faked version (dev-env device check, never flashes) and a faked version (dev-env
`BIOS_VERSION=F7F0107 ./run.sh --fremont`). `BIOS_VERSION=F7F0107 ./run.sh --fremont`).
- The entry point loops: menu, run, "back to the menu" (or `[m]`/`[r]` when a - The entry point loops: menu, run, "back to the menu" (or `[m]`/`[r]` when a
restart is needed), until `q`; the restart question is asked once at the restart is needed), until `q`. When a restart is needed, `q` asks "Restart
end. Scripted input that runs out ends the loop like `q`. now? [Y/n]" (`quit_prompt`): `n` goes back to the menu, the next `q` asks
again. Scripted input that runs out quits without restarting (never
restart on EOF: `ask_yn` would take its default).
- Steamify shortcut (`launcher`): the icon runs `curl | bash` of - Steamify shortcut (`launcher`): the icon runs `curl | bash` of
`releases/latest/download/steamify.sh` in Konsole, so it's `releases/latest/download/steamify.sh` in Konsole, so it's
always the newest release. Its icon, `assets/steam-gaming-settings.svg` always the newest release. Its icon, `assets/steam-gaming-settings.svg`
+14 -2
View File
@@ -5,7 +5,19 @@ All notable changes, per version and per commit. Versions follow
`steamify.sh`. Versions before 0.7.0 were numbered afterwards, `steamify.sh`. Versions before 0.7.0 were numbered afterwards,
one per merged pull request. one per merged pull request.
## 0.9.0 - 2026-09-24 ## 0.9.1 - 2026-09-24
- `2e107e5` **fix: LED driver for every kernel on a fresh install**
- The DKMS override was written to `/etc/dkms` before `dkms` was installed,
when that folder doesn't exist yet, so it silently failed and the build
for other kernels (e.g. LTS) failed as in 0.6. The folder is created first
now, and a failed write stops with an error.
- **feat: Restart question on quit is "Restart now? [Y/n]"**
- When something needs a restart, `q` asks with yes as the default; `n` goes
back to the menu and the next `q` asks again. Ctrl+C quits without
restarting; scripted input that runs out never restarts.
## 0.9.0 - 2026-09-24 (#9)
The wizard is now called **Steamify CachyOS**, and can put a shortcut to The wizard is now called **Steamify CachyOS**, and can put a shortcut to
itself on the desktop. itself on the desktop.
@@ -32,7 +44,7 @@ itself on the desktop.
bundle under both names, so `.../download/setup-gamescope-boot.sh` keeps bundle under both names, so `.../download/setup-gamescope-boot.sh` keeps
working. The Steamify shortcut runs `steamify.sh`. working. The Steamify shortcut runs `steamify.sh`.
- `b0553ae` **docs: Shorter README intro** - `b0553ae` **docs: Shorter README intro**
- **feat: The shortcut's window closes itself after a countdown** - `afc05b0` **feat: The shortcut's window closes itself after a countdown**
- After the wizard ends, a 10-second countdown closes the Konsole window - After the wizard ends, a 10-second countdown closes the Konsole window
(Enter closes it right away); after an error it stays open until Enter. (Enter closes it right away); after an error it stays open until Enter.
- A failed download now counts as an error (`pipefail`) instead of running - A failed download now counts as an error (`pipefail`) instead of running
+3 -1
View File
@@ -80,7 +80,9 @@ to restart (needed for changes to how the PC starts).
After each run the menu comes back with the new state, so you can change more After each run the menu comes back with the new state, so you can change more
in one go; quit with **q**. When something needs a restart, you choose in one go; quit with **q**. When something needs a restart, you choose
between going back to the menu and restarting now; quitting asks once more. between going back to the menu and restarting now. Quitting then asks
"Restart now? [Y/n]": **n** takes you back to the menu (and the next **q**
asks again); Ctrl+C quits without restarting.
Run it again whenever you like - to change your choices, to turn things off Run it again whenever you like - to change your choices, to turn things off
again, or after a CachyOS update (press `a` in the menu to re-apply again, or after a CachyOS update (press `a` in the menu to re-apply
+7 -2
View File
@@ -56,8 +56,13 @@ install_valve_led_driver() {
# got the running kernel's tree and failed (wrong kernel, and gcc against # got the running kernel's tree and failed (wrong kernel, and gcc against
# a clang-built tree). DKMS reads this override after the package's # a clang-built tree). DKMS reads this override after the package's
# dkms.conf; written before the install so its own build works too. # dkms.conf; written before the install so its own build works too.
printf '%s\n' "# Written by cachyos-gamescope-boot: build for DKMS's target kernel." \ # On a fresh system dkms isn't installed yet, so /etc/dkms doesn't exist.
'MAKE[0]="make KVERSION=${kernelver}"' | sudo tee "$LED_DKMS_OVERRIDE" >/dev/null sudo mkdir -p "$(dirname "$LED_DKMS_OVERRIDE")"
if ! printf '%s\n' "# Written by cachyos-gamescope-boot: build for DKMS's target kernel." \
'MAKE[0]="make KVERSION=${kernelver}"' | sudo tee "$LED_DKMS_OVERRIDE" >/dev/null; then
err "Couldn't write $LED_DKMS_OVERRIDE; without it the LED driver only builds for the running kernel."
return 1
fi
if ! pacman -Qi leds-valve-dkms-git >/dev/null 2>&1; then if ! pacman -Qi leds-valve-dkms-git >/dev/null 2>&1; then
info "Installing leds-valve-dkms-git from the AUR via $aur_helper (non-interactive)..." info "Installing leds-valve-dkms-git from the AUR via $aur_helper (non-interactive)..."
+28 -17
View File
@@ -15,7 +15,7 @@
set -uo pipefail set -uo pipefail
# Release version, see CHANGELOG.md. # Release version, see CHANGELOG.md.
VERSION=0.9.0 VERSION=0.9.1
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@@ -78,13 +78,36 @@ after_run() {
done done
} }
quit_prompt() {
# On q: when something needs a restart, offer it (default yes); "n" goes
# back to the menu, and the next q asks again. Returns 0 to show the menu
# again, 1 to quit (nothing to restart, or input ended in scripted runs).
local reply
restart_needed || return 1
echo
if [[ -n "${BIOS_NEEDS_RESTART:-}" ]]; then
warn "The BIOS update is written during the next restart. Keep the power on and"
warn "don't touch the machine until it has fully started again, even if the screen stays black."
else
info "The changes take effect after a restart."
fi
read -rp "$(echo -e "${c_bold}Restart now?${c_reset} [Y/n] (n = back to the menu, Ctrl+C = quit without restarting) ")" reply || return 1
case "$reply" in
""|y|Y) restart_now ;;
esac
return 0
}
# Menu loop: after each run the menu comes back with the new state, until # Menu loop: after each run the menu comes back with the new state, until
# the user quits; the restart question comes then, once, for everything. # the user quits; the restart question comes then, once, for everything.
RESTART_FOR_LOGIN=false RESTART_FOR_LOGIN=false
SUDO_KEEPALIVE=false SUDO_KEEPALIVE=false
while true; do while true; do
detect_components detect_components
run_menu || break if ! run_menu; then
quit_prompt && continue
break
fi
plan_changes plan_changes
if [[ ${#TO_DISABLE[@]} -eq 0 && ${#TO_ENABLE[@]} -eq 0 ]]; then if [[ ${#TO_DISABLE[@]} -eq 0 && ${#TO_ENABLE[@]} -eq 0 ]]; then
@@ -130,21 +153,9 @@ while true; do
done done
echo echo
# A staged BIOS update is written during the restart. if restart_needed; then
if [[ -n "${BIOS_NEEDS_RESTART:-}" ]]; then # Only reached when input ended (scripted runs): never restart then.
warn "The BIOS update is written during the next restart. Keep the power on and" info "Not restarted; the changes take effect after a restart."
warn "don't touch the machine until it has fully started again, even if the screen stays black."
if ask_yn "Restart now to install the BIOS update?" n; then
restart_now
else
info "The BIOS update installs at your next restart."
fi
elif [[ "$RESTART_FOR_LOGIN" == true ]]; then
if ask_yn "Restart now so the changes take effect?" n; then
restart_now
else
info "Restart whenever you're ready."
fi
else else
info "Bye." info "Bye."
fi fi