Use USB wifi on archlinux
1. My situation
I have IPTIME WIFI USB WLAN card looks like this. This one use Realtek 8812bu chip.
My desktop enviroment is based on Ryzen 1700 & Archlinx 5.11.10-arch1-1.
I expect one of modules under /lib/modules/5.11.10-arch1-1/kernel/drivers/net/wireless/realtek/ might be able to use USB WLAN card but it wasn't.
So, I built a module from git and installed a driver and now it worked.
## 2. Build and install driver
I refered this articlehttps://askubuntu.com/questions/1018375/how-do-i-install-driver-for-rtl88x2bu
Thanks to questioner and answererIn my case, my desktop unabled to connect to WLAN so dksm, bc, git packages coundn't be installed. So i compile on laptop, same archlinux-5.11.10 and copy a module to desktop thorugh USB.
1. Clone repo, install package, build
git clone https://github.com/cilynx/rtl88x2bu.git
sudo pacman -S bc linux-headers linux base-devel
cd rtl88x2bu
make -j16
# This instrution make 88x2bu.ko module
2. Install and check
# Copy 88x2bu.ko anywhere you want
sudo depmod -a
insmode ./88x2bu.ko
# Check wlpXXXXXX device.
ip address
ip link set wlpXXXXXX down
# Try connect to wifi
sudo wifi-menu
ETC : Failure
I was trying to install a archlinux on my desktop.
But my desktop was too faraway from the ethernet cable.
I was not able to run a pacstrap command to download a image.
So,
I built a module on my laptop.
Installation media archiso kernel was 5.11.2 so i downloaded the kernel source from kernel.org and compile.
I modified a Makefile and change a EXTRAVERSION varialbe for matching version magic string.
tar -xvf linux-5.11.2 && cp linux-5.11.2 /lib/modules
make menuconfig -> and check General Setup > preemptible option.
make -j8
cd ~/rtl88xbu && make KSRC=/lib/moudles/linux-5.11.2 -j8
I copied the module to installation media kernel on runtime and tried to insmod a module. but it wan't worked.