diff --git a/migrations/1768567957_downgrade_wireplumber_for_bt_crash.sh b/migrations/1768567957_downgrade_wireplumber_for_bt_crash.sh deleted file mode 100755 index 96ce6b6..0000000 --- a/migrations/1768567957_downgrade_wireplumber_for_bt_crash.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash -set -e - -# WirePlumber 0.5.13 Bluetooth profile autoswitch causes GNOME crashes -# when switching from A2DP to HSP/HFP (handsfree) profile. -# -# See: https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/merge_requests/31 -# See: https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/776 - -PACMAN_CONF="/etc/pacman.conf" -MARKER="# WIREPLUMBER-IGNORE-START" -MARKER_END="# WIREPLUMBER-IGNORE-END" -IGNORE_LINE="IgnorePkg = wireplumber libwireplumber" - -WORKAROUND_DIR="$MANJIKAZE_DIR/workarounds/wireplumber-0.5.12-downgrade" - -status "Applying WirePlumber 0.5.12 downgrade workaround for Bluetooth audio crash..." - -# Check current wireplumber version -current_version=$(pacman -Q wireplumber 2>/dev/null | awk '{print $2}' | sed 's/-.*$//') - -if [[ "$current_version" == "0.5.13" ]]; then - status "WirePlumber 0.5.13 detected, downgrading to 0.5.12..." - - # Check if workaround packages exist - if [[ ! -f "$WORKAROUND_DIR/wireplumber-0.5.12-1-x86_64.pkg.tar.zst" ]]; then - status "ERROR: Workaround packages not found in $WORKAROUND_DIR" - status "Please ensure the workaround packages are present." - exit 1 - fi - - # Downgrade packages - sudo pacman -U --noconfirm \ - "$WORKAROUND_DIR/libwireplumber-0.5.12-1-x86_64.pkg.tar.zst" \ - "$WORKAROUND_DIR/wireplumber-0.5.12-1-x86_64.pkg.tar.zst" - - status "WirePlumber downgraded to 0.5.12" - - # Restart wireplumber - systemctl --user restart wireplumber.service 2>/dev/null || true - status "WirePlumber service restarted" -else - status "WirePlumber version is $current_version (not 0.5.13), no downgrade needed." -fi - -# Add IgnorePkg to pacman.conf if not already present -if grep -q "$MARKER" "$PACMAN_CONF"; then - status "WirePlumber update ignore is already active in pacman.conf" -else - status "Adding WirePlumber to IgnorePkg in pacman.conf..." - - # Create backup - sudo cp "$PACMAN_CONF" "$PACMAN_CONF.pre-wireplumber-ignore-$(date +%s)" - - # Add IgnorePkg after [options] section - sudo sed -i "/^\[options\]/a\\ -$MARKER\\ -$IGNORE_LINE\\ -$MARKER_END" "$PACMAN_CONF" - - status "WirePlumber updates will now be ignored during system updates." -fi - -status "" -status "Workaround applied successfully!" -status "" -status "Note: When the GNOME fix is released (MR #31), a follow-up migration" -status "will remove this workaround automatically." diff --git a/migrations/1774539058_remove_wireplumber_bt_crash_workaround.sh b/migrations/1774539058_remove_wireplumber_bt_crash_workaround.sh new file mode 100755 index 0000000..a1c28d4 --- /dev/null +++ b/migrations/1774539058_remove_wireplumber_bt_crash_workaround.sh @@ -0,0 +1,29 @@ +#!/bin/bash +set -e + +PACMAN_CONF="/etc/pacman.conf" +MARKER="# WIREPLUMBER-IGNORE-START" +MARKER_END="# WIREPLUMBER-IGNORE-END" + +if grep -q "$MARKER" "$PACMAN_CONF" 2>/dev/null; then + status "Removing WirePlumber IgnorePkg workaround from pacman.conf..." + sudo sed -i "/$MARKER/,/$MARKER_END/d" "$PACMAN_CONF" +else + status "WirePlumber IgnorePkg workaround is not active." +fi + +if pacman -Q wireplumber >/dev/null 2>&1; then + current_version=$(pacman -Q wireplumber | awk '{print $2}' | sed 's/-.*$//') +else + status "WirePlumber is not installed, skipping package cleanup." + return 0 +fi + +if [[ "$current_version" == "0.5.12" ]]; then + status "WirePlumber 0.5.12 detected, upgrading to the repo version..." + sudo pacman -S --noconfirm --noprogressbar --quiet wireplumber libwireplumber + systemctl --user restart wireplumber.service 2>/dev/null || true + status "WirePlumber upgraded and service restarted." +else + status "WirePlumber version is $current_version, no forced upgrade needed." +fi diff --git a/workarounds/wireplumber-0.5.12-downgrade/README.md b/workarounds/wireplumber-0.5.12-downgrade/README.md deleted file mode 100644 index f42cb77..0000000 --- a/workarounds/wireplumber-0.5.12-downgrade/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# WirePlumber 0.5.12 Downgrade - Bluetooth Audio Crash Fix - -## The Problem - -GNOME Shell crashes (with forced logout) when your Bluetooth headphones switch -from HD audio playback (A2DP) to handsfree mode (HSP/HFP), for example when -starting an online meeting. - -### Root Cause - -WirePlumber 0.5.13 introduces new Bluetooth profile autoswitch logic (MR #739/776) -that sends loopback nodes. GNOME's `libgnome-volume-control` cannot handle this -correctly yet and crashes. - -**Related issues:** -- https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/776 -- https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/2654 -- https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/merge_requests/31 - -### Affected Configuration - -| Package | Affected version | -|---------|------------------| -| wireplumber | 0.5.13 ❌ | -| gnome-shell | 49.x | -| pipewire | 1.4.9 | - -## Solution: Downgrade to WirePlumber 0.5.12 - -> **Note:** If you're using manjikaze, the migration script handles this -> automatically. These manual steps are for debugging or standalone use. - -### Step 1: Perform the downgrade - -```bash -sudo pacman -U libwireplumber-0.5.12-1-x86_64.pkg.tar.zst \ - wireplumber-0.5.12-1-x86_64.pkg.tar.zst -``` - -### Step 2: Block updates temporarily - -Run the included script: - -```bash -sudo ./ignore-wireplumber-updates.sh -``` - -Or manually: add `IgnorePkg = wireplumber libwireplumber` to `/etc/pacman.conf`. - -### Step 3: Restart WirePlumber - -```bash -systemctl --user restart wireplumber -``` - -## When can I upgrade back to 0.5.13+? - -Once GNOME's libgnome-volume-control MR #31 is merged and released in a -gnome-shell update. Check the status at: -https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/merge_requests/31 - -After that, you can remove the IgnorePkg rule with: - -```bash -sudo ./restore-wireplumber-updates.sh -``` - ---- -*Last updated: 2026-01-16* diff --git a/workarounds/wireplumber-0.5.12-downgrade/ignore-wireplumber-updates.sh b/workarounds/wireplumber-0.5.12-downgrade/ignore-wireplumber-updates.sh deleted file mode 100755 index bdfb8fc..0000000 --- a/workarounds/wireplumber-0.5.12-downgrade/ignore-wireplumber-updates.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -# -# Block wireplumber updates in pacman until the GNOME fix is released -# -# See: https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/merge_requests/31 -# - -set -e - -PACMAN_CONF="/etc/pacman.conf" -BACKUP_FILE="/etc/pacman.conf.pre-wireplumber-ignore" -IGNORE_LINE="IgnorePkg = wireplumber libwireplumber" -MARKER="# WIREPLUMBER-IGNORE-START" -MARKER_END="# WIREPLUMBER-IGNORE-END" - -# Check if running as root -if [[ $EUID -ne 0 ]]; then - echo "This script must be run as root (sudo)." - exit 1 -fi - -# Check if already applied -if grep -q "$MARKER" "$PACMAN_CONF"; then - echo "WirePlumber ignore is already active in $PACMAN_CONF" - exit 0 -fi - -# Create backup -cp "$PACMAN_CONF" "$BACKUP_FILE" -echo "Backup created: $BACKUP_FILE" - -# Add IgnorePkg after [options] section -sed -i "/^\[options\]/a\\ -$MARKER\\ -$IGNORE_LINE\\ -$MARKER_END" "$PACMAN_CONF" - -echo "✓ WirePlumber updates will now be ignored." -echo "" -echo "During system updates you will see:" -echo " warning: wireplumber: ignoring package upgrade (0.5.12-1 => ...)" -echo "" -echo "Run './restore-wireplumber-updates.sh' to undo this." diff --git a/workarounds/wireplumber-0.5.12-downgrade/libwireplumber-0.5.12-1-x86_64.pkg.tar.zst b/workarounds/wireplumber-0.5.12-downgrade/libwireplumber-0.5.12-1-x86_64.pkg.tar.zst deleted file mode 100644 index 7114371..0000000 Binary files a/workarounds/wireplumber-0.5.12-downgrade/libwireplumber-0.5.12-1-x86_64.pkg.tar.zst and /dev/null differ diff --git a/workarounds/wireplumber-0.5.12-downgrade/restore-wireplumber-updates.sh b/workarounds/wireplumber-0.5.12-downgrade/restore-wireplumber-updates.sh deleted file mode 100755 index 75c0d40..0000000 --- a/workarounds/wireplumber-0.5.12-downgrade/restore-wireplumber-updates.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# -# Restore wireplumber updates in pacman after the GNOME fix is released -# -# Use this script once gnome-shell contains the fix from: -# https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/merge_requests/31 -# - -set -e - -PACMAN_CONF="/etc/pacman.conf" -MARKER="# WIREPLUMBER-IGNORE-START" -MARKER_END="# WIREPLUMBER-IGNORE-END" - -# Check if running as root -if [[ $EUID -ne 0 ]]; then - echo "This script must be run as root (sudo)." - exit 1 -fi - -# Check if marker exists -if ! grep -q "$MARKER" "$PACMAN_CONF"; then - echo "No wireplumber ignore found in $PACMAN_CONF" - echo "Nothing to restore." - exit 0 -fi - -# Remove the ignore block -sed -i "/$MARKER/,/$MARKER_END/d" "$PACMAN_CONF" - -echo "✓ WirePlumber updates have been restored." -echo "" -echo "You can now update to the latest version with:" -echo " sudo pacman -Syu" diff --git a/workarounds/wireplumber-0.5.12-downgrade/wireplumber-0.5.12-1-x86_64.pkg.tar.zst b/workarounds/wireplumber-0.5.12-downgrade/wireplumber-0.5.12-1-x86_64.pkg.tar.zst deleted file mode 100644 index ad77fb4..0000000 Binary files a/workarounds/wireplumber-0.5.12-downgrade/wireplumber-0.5.12-1-x86_64.pkg.tar.zst and /dev/null differ