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