Files
chromebox_10th_audio_driver/scripts/remove-kaisa-hdmi-deb.sh
jack 17f0a4521f docs(kaisa): ProAudio 主路线、WirePlumber default-profile 与一键脚本
- 新增 OPERATION_PipeWire_Kaisa_ProAudio / UCM_HiFi,核心问题复盘与恢复 Ubuntu 重测手顺;HDMI 旧文改为 stub。
- 脚本:apply / verify-pro-audio、strip default-profile、reapply-session、remove deb 与 UCM overlay、verify-audio-environment。
- systemd-user:kaisa-pro-audio-reapply.service 示例。
- README、docs 索引、REPO_INDEX、REPRO deb 存档说明;deb 标为未来计划;reference/ucm2 与采集脚本小改。
- debian 与 _bmad-output 规划文件随本次工作区一并更新。

Made-with: Cursor
2026-04-08 11:07:13 +08:00

53 lines
1.7 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# 卸载历史上可能安装过的 kaisa-hdmi-pipewire-fixapt purge并 reinstall alsa-ucm-conf
# 以恢复发行版自带的 UCM 文件(与 apply-kaisa-pro-audio.sh 中 KEEP_DEB=0 时前两步一致)。
#
# 不改动用户级 WirePlumber不自动重启 PipeWire。若曾用手工 UCM overlay另见
# ./scripts/remove-kaisa-ucm-overlay.sh
# 若要走 pro-audio 主路线purge 完成后可执行:
# ./scripts/apply-kaisa-pro-audio.sh --keep-deb
#
# 用法:
# ./scripts/remove-kaisa-hdmi-deb.sh
# ./scripts/remove-kaisa-hdmi-deb.sh --no-reinstall-ucm # 仅 purge不 touch alsa-ucm-conf
set -euo pipefail
NO_REINSTALL=0
while [[ $# -gt 0 ]]; do
case "$1" in
--no-reinstall-ucm) NO_REINSTALL=1 ;;
-h|--help)
sed -n '2,18p' "$0" | sed 's/^# \{0,1\}//'
exit 0
;;
*)
echo "未知参数: $1(用 --help" >&2
exit 1
;;
esac
shift
done
if ! command -v sudo &>/dev/null; then
echo "需要 sudo。" >&2
exit 1
fi
if dpkg -s kaisa-hdmi-pipewire-fix &>/dev/null; then
echo ">>> apt purge -y kaisa-hdmi-pipewire-fix"
sudo apt purge -y kaisa-hdmi-pipewire-fix
else
echo "(dpkg 无已登记包 kaisa-hdmi-pipewire-fix跳过 purge若曾改名安装请自行 apt purge 包名)"
fi
if [[ "$NO_REINSTALL" -eq 0 ]]; then
echo ">>> apt install --reinstall -y alsa-ucm-conf"
sudo apt install --reinstall -y alsa-ucm-conf
else
echo "(--no-reinstall-ucm跳过 alsa-ucm-conf reinstall)"
fi
echo "remove-kaisa-hdmi-deb: 完成。建议登录用户会话下: systemctl --user restart wireplumber pipewire pipewire-pulse"
echo "若仍有手工 UCM: ./scripts/remove-kaisa-ucm-overlay.sh"
echo "若应用 pro-audio: ./scripts/apply-kaisa-pro-audio.sh --keep-deb"