I got my Wifi 7 back, and I learned some stuff.
A couple weeks back, suddenly my MSI 6500 BE Wifi 7 USB stick stopped working. I guess Realtek uses a non compliant method to make these things go vroom (with their RLT8912AU chip) and in the the newer kernels a choice was made to no longer support those. I can understand that, but my onboard wifi sucks and pulling cables is not immediately an available option, I bought the stick before I knew I was switching over to Linux fulltime, so, here I was.
In the end i had to:
sudo dnf install git kernel-devel kernel-headers make gcc dkms
git clone https://github.com/morrownr/rtw89.git
cd rtw89
make clean
make
sudo make install
sudo modprobe -r mt7925u #stop the wrong driver it was using for it.
sudo modprobe rtw_8922au
I thought I tried all these steps before, but building the driver somehow didn't work then. So maybe there is some step missing.
Things i did but not sure if that was necessary:
echo "blacklist mt7925u" | sudo tee /etc/modprobe.d/blacklist-mt7925.conf sudo modprobe -r mt7925u #Blacklist old driver
sudo nano /etc/modprobe.d/rtw89.conf
add these lines to that file:
options rtw89_usb disable_usb_autosuspend=y
options rtw89_core disable_ps_mode=y
then i
sudo modprobe rtw89_8922au_git
but it said
`rtw89 git:(main) sudo modprobe rtw89_8922au_git
modprobe: ERROR: could not insert 'rtw89_8922au_git': Key was rejected by service `
so now i had to manually sign this kernel change because i use secureboot for some multiplayer games.
sudo dnf install openssl keyutils
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=RTW89 Driver/"
sudo /usr/src/kernels/$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der /lib/modules/$(uname -r)/extra/rtw89/rtw89_8922au_git.ko
sudo mokutil --import MOK.der #*It will ask you to create a temporary password. **Don't forget it.***
- Restart your computer.
- Before Fedora boots, a blue screen titled "Shim UEFI Key Management" or "MOK Manager" will appear.
- Select Enroll MOK → Continue → Yes.
- Enter the password you created in Step 2.
- Select Reboot.
Still got errors, because more things need to be signed with my new keys?
cd ~/rtw89
sudo find /lib/modules/$(uname -r)/extra/rtw89/ -name "*.ko" -exec /usr/src/kernels/$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der {} \;
sudo depmod -a
sudo modprobe rtw89_8922au_git
Phew, now it was showing up in more then just a notification. I couldn't connect to my WPA2/WPA3 network, so as a last step I changed my network to WPA2 only, now i'm finally connected with wifi7 again, which in my usecase gives me a lot more stable/lower latency connection :) it took a bit of tinkering. Maybe sharing it like this will save the next person some time.
**EDIT
the WPA2/WPA3 switch was causing problems for other users of my network. I changed the USB-sticks mode so it wont hang on configuring interface while, on the router, WPA2/3 (transition) mode is still enabled
nmcli connection show
Find the connection that needs to be told to keep their encryption method steady and give it this rule:
sudo nmcli connection modify fcf94a45-ba9e-4591-8cbb-e2e899229fa9 802-11-wireless-security.pmf 1
Also added this, don't know if it is crucial:
sudo nano /etc/modprobe.d/rtw89.conf
add this lines to that file:
options rtw89_8922au_git disable_vht=n disable_he=n
EDIT 2
New kernel, new day in the terminal coal mines. I made a script that should do the work for me next time.
#!/bin/bash
# Automation script for rtw89 driver updates on Fedora
# Target: /usr/local/bin/rtw89-update
DRIVER_DIR="$HOME/rtw89"
KERN_VER=$(uname -r)
SIGN_TOOL="/usr/src/kernels/$KERN_VER/scripts/sign-file"
MOK_PRIV="$DRIVER_DIR/MOK.priv"
MOK_DER="$DRIVER_DIR/MOK.der"
echo "--- Starting rtw89 update for kernel: $KERN_VER ---"
# 1. Update and Build
cd "$DRIVER_DIR" || { echo "Error: Driver directory not found"; exit 1; }
echo "[1/4] Pulling latest driver code..."
git pull
echo "[2/4] Rebuilding driver..."
make clean && make -j$(nproc)
sudo make install
# 2. Bulk Sign
echo "[3/4] Signing all modules in /extra/rtw89/..."
sudo find "/lib/modules/$KERN_VER/extra/rtw89/" -name "*.ko" -exec "$SIGN_TOOL" sha256 "$MOK_PRIV" "$MOK_DER" {} \;
# 3. Load
echo "[4/4] Refreshing module list and loading..."
sudo depmod -a
sudo modprobe rtw89_8922au_git
if [ $? -eq 0 ]; then
echo "--- SUCCESS: WiFi Driver loaded ---"
else
echo "--- FAILURE: Check dmesg for errors ---"
fi
If you 'sudo nano /usr/local/bin/rtw89-update' you can apparently call that script afterward with just rtw89-update , neat! dont forget to sudo chmod +x /usr/local/bin/rtw89-update so the os knows to treat it as an executable.
Great read, thx for sharing. Hope it helps someone else!