Name: mutiara-fixes-rtw8852c Version: 1.0 Release: 1%{?dist} Summary: Mutiara fix for Realtek 8852C unstable Bluetooth by reverting firmware version. License: GPLv2+ BuildArch: noarch # Source is not strictly needed since no files are packaged. # Source0: %{name}-%{version}.tar.gz Requires: /bin/mv, /bin/sh %description This package contains scriptlets to rename the rtw8852c firmware files in /lib/firmware during installation, which effectively causes the system to fall back to an older, usually more stable, version of the firmware. This is intended to resolve unstable or broken Bluetooth connectivity issues on devices using the Realtek 8852C chipset. Upon removal, the script reverses the renaming to restore the newer firmware files. %prep # No source files to prepare or unpack. %build # Nothing to compile. %install # Nothing to install, as the operations are done via scriptlets. mkdir -p %{buildroot} %post # Renames the original firmware files to .bak (to force fallback) echo "Mutiara-fixes: Renaming rtw8852c firmware files to .bak to enable stable Bluetooth firmware fallback..." # Check and rename file 1 if [ -f /lib/firmware/rtw8852c_fw-1.bin.xz ]; then mv /lib/firmware/rtw8852c_fw-1.bin.xz /lib/firmware/rtw8852c_fw-1.bin.xz.bak fi # Check and rename file 2 if [ -f /lib/firmware/rtw8852c_fw-2.bin.xz ]; then mv /lib/firmware/rtw8852c_fw-2.bin.xz /lib/firmware/rtw8852c_fw-2.bin.xz.bak fi echo "Mutiara-fixes: Firmware fallback enabled." %preun # Reverses the rename only during package removal ($1 = 0) if [ "$1" = "0" ]; then echo "Mutiara-fixes: Reversing rename for rtw8852c firmware files to restore newer versions..." # Check and reverse rename file 1 if [ -f /lib/firmware/rtw8852c_fw-1.bin.xz.bak ]; then mv /lib/firmware/rtw8852c_fw-1.bin.xz.bak /lib/firmware/rtw8852c_fw-1.bin.xz fi # Check and reverse rename file 2 if [ -f /lib/firmware/rtw8852c_fw-2.bin.xz.bak ]; then mv /lib/firmware/rtw8852c_fw-2.bin.xz.bak /lib/firmware/rtw8852c_fw-2.bin.xz fi echo "Mutiara-fixes: Newer firmware restored." else echo "Mutiara-fixes: Skipping reverse rename during package upgrade." fi %files # No files are packaged or installed by this RPM. %changelog * Tue Dec 16 2025 Kara - 1.0-1 - Initial package creation to fix rtw8852c Bluetooth stability via firmware fallback.