- Ubuntu 24.04.3 LTS (Linux kernal 6.8.0-71-generic)
- Buffalo WI-U2-433DMS (RTL8821AU)
In this tutorial, the following driver shared on GitHub is used.
Check if the the Wi-Fi adapter is recognized as a USB device.
$ lsusb
Bus 001 Device 001: ID ....:.... Linux Foundation 2.0 root hub
Bus 001 Device 002: ID ....:.... BUFFALO INC. (formerly MelCo., Inc.) 802.11ac WLAN Adapter
Bus 002 Device 001: ID ....:.... Linux Foundation 1.1 root hub
...
If the expected adapter is not found in the list, it may not be properly connected to a USB port, or the device has been broken.
$ sudo apt install linux-headers-generic build-essential dkms
...
Build and install the module rtw88 with DKMS.
$ sudo su -
# cd /usr/local/src
# git clone https://github.com/lwfinger/rtw88.git
# cd rtw88/
# dkms install $PWD
...
Building module:
Cleaning build area...
KVER=6.8.0-71-generic 'make' all...................................................
Cleaning build area...
...
depmod......
# make install_fw
...
# cp rtw88.conf /etc/modprobe.d/
# exit
And then, reboot the OS to load the installed modules.
$ sudo reboot
Now, the modules starting with rtw_ are found in the module list.
$ lsmod
Module Size Used by
...
rtw_8821au 12288 0
rtw_8821a 45056 1 rtw_8821au
rtw_88xxa 45056 1 rtw_8821a
rtw_usb 28672 1 rtw_8821au
rtw_core 352256 3 rtw_88xxa,rtw_usb,rtw_8821a
...
The modules have been installed and recognized as a wireless network interface, but it's not connected yet to any access points.
$ sudo lshw -C network
...
*-network DISABLED
description: Wireless interface
physical id: 4
bus info: usb@1:2
logical name: ...
serial: ...
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=rtw_8821au driverversion=6.8.0-71-generic firmware=N/A link=no multicast=yes wireless=IEEE 802.11
If the nmcli command is not installed, install the package network-manager.
$ sudo apt install network-manager
Show available Wi-Fi access points using nmcli.
$ sudo nmcli device wifi list
IN-USE BSSID SSID MODE CHAN RATE SIGNAL BARS SECURITY
...
Connect one of the access points by its SSID and password.
$ sudo nmcli device wifi connect ${SSID} password ${PASSWORD}
# (Optional) Enabling autoconnect.
$ sudo nmcli connection modify ${SSID} connection.autoconnect yes
$ sudo nmcli connection show --active
NAME UUID TYPE DEVICE
...
Now, the Wi-Fi adapter has been connected as you can see ip=... link=yes at the configuration field.
$ sudo lshw -C network
...
*-network
description: Wireless interface
physical id: 4
bus info: usb@1:2
logical name: ...
serial: ...
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=rtw_8821au driverversion=6.8.0-71-generic firmware=N/A ip=... link=yes multicast=yes wireless=IEEE 802.11