fix: Remove whatever is left of HDMI refresh boost, pin or no pin

This commit is contained in:
theupriser committed 2026-09-27 12:27:08 +02:00
1 parent 997cd0744d
commit 38642dc6db
4 files changed
+27 -27

No files matched your search

+5 -2
View File
@@ -222,8 +222,11 @@ gamescope and the Plasma desktop. Primary target: the Valve Steam Machine
`steamify-fremont-poweroff` (`patches/steamify-fremont-poweroff.c`) clears
it in a power-off-prepare handler, built for each kernel. It made the kernel pin
unnecessary: `kpin` is only available while on (`kpin_available`), and
`detect_components` unticks it (and `hdmi`, which needs the pinned
kernel), so a normal run removes an existing pin. CachyOS's
`detect_components` unticks it, so a normal run removes an existing pin.
`hdmi` (it needed the pin) is retired the same way: `hdmi_status` is on
while anything of it is left (saved displays, hotplug unit, EDID files,
old kernel parameter), `hdmi_available` only then, it's always unticked,
and `hdmi_disable` removes all of it. CachyOS's
`linux-cachyos` is clang-built, `-bore` GCC-built: let DKMS pick the
compiler, never pass `LLVM=1`. Test shutdown on the real machine for every
new major kernel.
+4 -2
View File
@@ -19,8 +19,10 @@ one per merged pull request.
rebooted.
- The kernel pin is no longer offered. An existing pin is shown unticked,
so the next run removes it and brings back CachyOS's current kernel;
HDMI refresh boost, which needs the pinned kernel, goes with it (newer
kernels do HDMI 2.1 themselves).
HDMI refresh boost, which needs the pinned kernel, is retired too
(newer kernels do HDMI 2.1 themselves): whatever is left of it (saved
displays, also ones not connected, its hotplug script, the old kernel
parameter) is unticked and removed by the next run, pin or no pin.
- Feature versions: each component records the version of what it set
up; when a release changes a component, installs with an older version
are ticked and updated by a normal run ("update" in the plan and the
+13 -20
View File
@@ -56,18 +56,17 @@ hdmi_cmdline_param() {
}
hdmi_available() {
# Stays available while on, so it can be turned off after the pin is gone.
detect_valve_fremont || return 1
# Saved displays too, so they can be removed without the pin.
hdmi_status || [[ -n "$(hdmi_saved)" ]] || { pinned_kernel_installed && [[ -n "$(hdmi_connectors)" ]]; }
# No longer offered (it needed the pinned kernel): only shown while
# anything of it is left, so a normal run removes it.
detect_valve_fremont && hdmi_status
}
hdmi_status() {
# On = the connected display runs on its saved EDID. Another display on
# the port is off, so ticking it sets that one up. The command line: set
# up by an older version, re-applying moves it over.
[[ -n "$(hdmi_active_ids)" ]] ||
{ [[ -n "$(hdmi_cmdline_param)" ]] && compgen -G "$HDMI_FW_DIR/steamify-*.bin" >/dev/null; }
# On while anything of it is left: saved displays (connected or not), the
# hotplug script, an EDID file, or the kernel parameter of versions
# before 2.1.0.
[[ -n "$(hdmi_saved)" || -f "$HDMI_UNIT" || -n "$(hdmi_cmdline_param)" ]] ||
compgen -G "$HDMI_FW_DIR/steamify-*.bin" >/dev/null
}
hdmi_saved() { [[ -f "$HDMI_MAP" ]] && grep -v '^#' "$HDMI_MAP"; }
@@ -688,16 +687,10 @@ hdmi_enable() {
}
hdmi_disable() {
# For the connected display; other saved displays stay (the app lists
# them). Without the pinned kernel none may stay: newer kernels read the
# EDID themselves.
local id
if [[ -n "$(hdmi_cmdline_param)" ]]; then
hdmi_forget all; hdmi_remove_boot_param || return 1; state_clear hdmi
elif [[ "${WANTED[kpin]:-1}" == 0 ]] || ! pinned_kernel_installed; then
# Everything, for every saved display: newer kernels read the whole EDID
# themselves, and an old one loaded at the next hotplug would be wrong.
hdmi_forget all
else
for id in $(hdmi_active_ids); do hdmi_forget "$id"; done
fi
ok "HDMI refresh boost removed for the connected display; it uses its own EDID again."
hdmi_remove_boot_param || return 1
state_clear hdmi
ok "HDMI refresh boost removed; displays use their own EDID again."
}
+5 -3
View File
@@ -108,9 +108,11 @@ detect_components() {
component_available "$c" || continue
{ feature_outdated "$c" || feature_new "$c"; } && WANTED[$c]=1
done
# The kernel pin is no longer needed (the power-off fix): drop it, and
# HDMI refresh boost, which needs it, on a normal run.
if component_available kpin; then WANTED[kpin]=0; WANTED[hdmi]=0; fi
# The kernel pin is no longer needed (the power-off fix), and HDMI
# refresh boost needed the pin: whatever is left of either is unticked,
# so a normal run removes it.
component_available kpin && WANTED[kpin]=0
component_available hdmi && WANTED[hdmi]=0
# The terminal-only Steamify shortcut from before 2.0.1: tick it, so a
# normal run replaces it with the app.
launcher_repair && WANTED[launcher]=1