From ThinkWiki
Revision as of 20:08, 9 January 2022 by TpUser0 (Talk | contribs) (firmware added)
Jump to: navigation, search

rtw89 is the Linux driver for Realtek 802.11ax WiFi devices starting with the Realtek 8852AE ASIC. Rather than updating the exiting rtw88 driver, Realtek engineers wrote and contributed a completely rewritten one for their redesigned wireless chipset of the 8852AE, which will be used in future Realtek WiFi chips as well.

The driver is part of wireless-drivers-next and will be included in Linux kernel 5.16. Patches for kernels 5.4 to 5.15 are available.

For example, the Lenovo ThinkPad P14s Gen2 series from 2021 requires the new driver.

Kernel patches

The patch series to get the rtw89 driver into the kernel sources requires the kernel and/or its modules to be compiled by the end-user, alternatively some distributions may provide a pre-compiled DKMS package for the driver as well.

One way to patch an existing kernel is to download the v6 patch from lore.kernel.org; It is sufficient to copy&paste the whole message into one files, e.g. rtw89v6.patch. Alternatively, using links or lynx (example with links) the v6 patch series can be downloaded from the shell:

# links -dump "https://lore.kernel.org/all/482cc641-7ba1-7d7a-f2eb-5d39aea9a5cd@lwfinger.net/T/" > /tmp/rtw89v6.patch

Applying the whole patch series to an existing kernel source tree:

$ cd /usr/src/linux
$ patch -p1 < /tmp/rtw89v6.patch

After patching the kernel, the rtw89 driver is available for selection in the kernel configuration (example: make menuconfig):

     -> Device Drivers
       -> Network device support (NETDEVICES [=y])
         -> Wireless LAN (WLAN [=y])
           -> Realtek devices (WLAN_VENDOR_REALTEK [=y])
             -> Realtek 802.11ax wireless chips support (RTW89 [=m])
               -> Realtek 8852AE PCI wireless network adapter (RTW89_8852AE [=m])

After booting this kernel, the driver will be automatically loaded on compatible hardware.

$ uname -r
$ lspci -d :8852 -nn
03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8852AE 802.11ax PCIe Wireless Network Adapter [10ec:8852]
$ lsmod | grep rtw89
rtw89_pci              45056  0
rtw89_core            880640  1 rtw89_pci


The driver requires specific firmware, which should be supplied by the general (non-free) firmware package of your Linux distribution. It a firmware blob is missing, it can be downloaded manually and put in the required path (normally /lib/firmware)

For the Realtek 8852AE the firmware binary file is rtw89/rtw8852a_fw.bin (in freedesktop.org drm-firmware since Feb 2021).

External links

  • Phoronix article about initial rtw89 development
  • rtw89 GitHub repository