From f7837f82b932e4467e22d9279524cb7bed5391d1 Mon Sep 17 00:00:00 2001 From: Rick Peters Date: Fri, 25 Sep 2026 09:17:05 +0200 Subject: [PATCH] fix: Restart steamos-manager after HDMI-CEC changes It only offers Steam its HDMI-CEC settings when cecd was there at its start. --- CHANGELOG.md | 2 ++ TECHNICAL.md | 3 ++- lib/cec.sh | 10 ++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c645efe..5629644 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ one per merged pull request. the TV turns on and off with the PC. On a Steam Machine, steamos-manager configures it from Steam's settings. - Works with any `/dev/cec*` (GPU or USB adapter); the menu lists them. + - Restarts steamos-manager, which only offers Steam its HDMI-CEC settings + when cecd was there at its start. - The README no longer says Steam Machine support alone gives HDMI-CEC: `cecd` wasn't installed, so it didn't. diff --git a/TECHNICAL.md b/TECHNICAL.md index 0e6333a..cecc9dd 100644 --- a/TECHNICAL.md +++ b/TECHNICAL.md @@ -188,7 +188,8 @@ Steam Machine; the CachyOS kernel has DisplayPort CEC built in) or a USB adapter. The menu lists the CEC devices found. Also turn on CEC on the TV (Sony: BRAVIA Sync, Samsung: Anynet+, LG: SimpLink). On a Steam Machine `steamos-manager` writes cecd's settings from Steam's (wake the TV, put it to -sleep), in `~/.config/cecd/config.d/`. +sleep), in `~/.config/cecd/config.d/`, and Steam shows its HDMI-CEC +settings; the wizard restarts steamos-manager so that happens right away. It's experimental: on SteamOS itself CEC can wake the Steam Machine right after it goes to sleep (Samsung TVs, diff --git a/lib/cec.sh b/lib/cec.sh index 59ecb9a..27388a6 100644 --- a/lib/cec.sh +++ b/lib/cec.sh @@ -9,6 +9,14 @@ CEC_PKGS=(cecd cec-audio-control inputattach-cec-units) +restart_steamos_manager() { + # steamos-manager only offers its HDMI-CEC interface (Steam's CEC + # settings) when cecd was there at its start. + systemctl --user is-active -q steamos-manager.service 2>/dev/null && + systemctl --user restart steamos-manager.service + return 0 +} + cec_status() { pacman -Q "${CEC_PKGS[@]}" >/dev/null 2>&1; } fetch_holo_pkg() { @@ -60,6 +68,7 @@ cec_enable() { systemctl --user enable steamos-manager-configure-cecd.service 2>/dev/null if compgen -G "/dev/cec*" >/dev/null; then systemctl --user restart cecd.service 2>/dev/null + restart_steamos_manager ok "HDMI-CEC on ($(cd /dev && echo cec*)). Turn on CEC on your TV too (e.g. Sony: BRAVIA Sync, Samsung: Anynet+, LG: SimpLink)." else warn "No CEC device (/dev/cec*) found: your GPU may not support CEC. A USB CEC adapter" @@ -77,6 +86,7 @@ cec_disable() { state_clear cec fi sudo udevadm control --reload + restart_steamos_manager ok "HDMI-CEC removed." }