10

I think this worked on the previous Linux versions, but with the new version, the dongle just doesn't get recognized. From the drivers offered on TP-Link's page, there is a Linux installation guide which doesn't seem to be working.

Anyone has any ideas if there's a way I can make this work? I have the feeling it has something to do with the new kernel...

6 Answers6

17

There are several different hardware revisions, so first you'll need to figure out which one you have. There are a couple different methods:

  • Look at the the device
    • Either on the label of the device or on the metal where it plugs in should be the FCC-ID. The version is at the end of this value starting with V, for example TE7T4UV32 is v3.2

      For more information, see here: https://www.tp-link.com/support/faq/46/

  • Match the device ID
    • Plug the device in, and run this command: lsusb. You should see an entry like this one:

      Bus 001 Device 007: ID 2357:0115 TP-Link 802.11ac NIC

      The hardware ID should tell you which version you have:

      • 2357:0101: v1
      • 2357:010d: v2
      • 2357:0115: v3

Now you can install the driver depending which hardware version you have:

v1 and v2

These devices have the rtl8812au chipset and you should be able to do as Pilot6 suggested:

sudo apt install rtl8812au-dkms

v3

Make sure you have at least kernel 6.2 installed, e.g. if you're using Ubuntu LTS:

sudo apt install linux-generic-hwe-$(lsb_release -rs)

More details

This device has the rtl8812bu chipset. Previously, you had to manually install a kernel module, but this is no longer necessary with newer kernels.

So all you need to do is make sure you have a newer kernel installed:

  1. Check which kernel you have installed:

    uname -r
    

    If it's 6.2 or later, the device should work out of the box. Otherwise, keep reading

  2. If you need to install a newer kernel, make sure you're running a supported version of Ubuntu: https://ubuntu.com/about/release-cycle

  3. If you're running an LTS version of Ubuntu, you can install a newer kernel like this:

    sudo apt install linux-generic-hwe-$(lsb_release -rs)
    

    ⓘ You may get errors if you already had the rtl88x2bu installed from the instructions below; you can ignore them for now

  4. Make sure it installs a kernel that is version 6.2 or higher and reboot

  5. The device should just work. You can optionally confirm the correct driver is loaded like this:

    $ lsmod | grep 2bu
    rtw88_8822bu           16384  0
    rtw88_usb              24576  1 rtw88_8822bu
    rtw88_8822b           233472  1 rtw88_8822bu
    
  6. (Optional) If you previously installed the driver manually, you can uninstall it. See the next section

Uninstall the manually installed v3 driver

If you had previously installed the v3 driver manually as documented below, you can uninstall it. This will make upgrades faster because it will skip trying to install the manual driver each time a new kernel is installed, and prevent errors. The downside is the device will no longer work with older kernels.

  1. List all versions of the driver installed, e.g.

    $ dkms status
    rtl88x2bu/5.6.1, 5.4.0-96-generic, x86_64: built
    rtl88x2bu/5.8.7.1, 5.15.0-130-generic, x86_64: installed
    rtl88x2bu/5.8.7.1, 6.2.0-37-generic, x86_64: installed
    
  2. For each installed version (the first column), uninstall it for all kernels, e.g.

    sudo dkms remove rtl88x2bu/5.6.1 --all
    sudo dkms remove rtl88x2bu/5.8.7.1 --all
    
  3. (Optional) Uninstall older kernels that don't support the device

    To prevent accidentally booting with an older kernel that doesn't support the device, you can uninstall older kernels:

    1. List all installed kernels

      dpkg -l | grep linux-image | grep ^i
      
    2. Uninstall any kernels older than 6.2

      ⚠️ This may require some trial and error and if you're not comfortable you can just skip this step. For example, here are the steps I had to do:

      1. I saw linux-image-5.15.0-130-generic was installed, so I ran this command to uninstall it and the headers package:

        sudo apt purge linux-image-5.15.0-130-generic linux-headers-5.15.0-130-generic
        
      2. But then I noticed it was going to install another old kernel (linux-image-unsigned-5.15.0-130-generic), so I modified the command like this:

        sudo apt purge linux-image-5.15.0-130-generic linux-headers-5.15.0-130-generic linux-image-unsigned-5.15.0-130-generic
        

        This gave me the desired result, but it also uninstalled linux-generic, linux-headers-generic, and linux-image-generic. I knew in my case this was okay because I'm using the HWE kernel (linux-generic-hwe-22.04).

Install the driver manually for older kernels

If you're using a kernel older than 6.2 and can't upgrade, you'll need to do a little more work to get it working. Thankfully there's a working driver available for it here: https://github.com/cilynx/rtl88x2bu

To get it working, you'll need to first install some packages and check out the Git repo:

sudo apt-get install build-essential dkms git
git clone https://github.com/cilynx/rtl88x2bu.git

Then follow the instructions here to install the driver:

cd rtl88x2bu
./deploy.sh

Note: I previously recommended the driver suggested by Diego (https://github.com/EntropicEffect/rtl8822bu), but I can no longer recommend that driver:

  • After resuming from suspend, it would no longer connect to wireless networks and I would have to unplug and replug the device
  • That driver is a fork of a fork and unfortunately there is no way to report issues

Upgrade the manually installed driver

If you've previously installed the kernel driver for the v3 device and need to upgrade it:

  1. Update the git repository

    • If you already have it checked out: git pull
    • Otherwise, re-clone it (see above)
  2. Run the deploy script again

    ./deploy.sh
    

    If you get an error, you may need to remove the driver first:

    sudo dkms remove rtl88x2bu/5.8.7.1 --all
    
  3. Install the driver for all other kernels (the deploy script only installs it for the current kernel)

    ls /boot/initrd.img-* | cut -d- -f2- | \
        sudo xargs -n1 /usr/lib/dkms/dkms_autoinstaller start
    

    (Source: Command to rebuild all DKMS modules for all installed kernels?)

bmaupin
  • 5,371
4

Only the bu https://github.com/EntropicEffect/rtl8822bu driver worked for me on kernel 5.4.0-7642-generic. The driver TPLink provides here https://www.tp-link.com/us/support/download/archer-t4u/#Driver is not compatible with newer Kernels.

Diego
  • 41
1

https://github.com/aircrack-ng/rtl8812au/blob/v5.6.4.2/README.md

Test this driver, works perfectly in 20.04.

Gualán
  • 11
0

Since this topic is one of the first ones on google search for the problem, I'd like to add that the driver suggested in this topic does no seems to work on 5.11 kernel (currently in 21.04 and 21.10)

But the driver from GITHub Linux Driver for USB WiFi Adapters that are based on the RTL8812BU and RTL8822BU Chipsets appears to work just fine.

zx485
  • 2,865
-1

My TP-Link AC600 - Archer T2U Plus ver 1.0 ID: 2357:0120

Bus 001 Device 002: ID 2357:0120 TP-Link 802.11ac WLAN Adapter

works with rtl8814au driver (on Ubuntu 20.04 Server)

sudo apt install git dkms
git clone https://github.com/aircrack-ng/rtl8814au.git
cd rtl8814au
sudo make dkms_install
iwconfig
-1

Ubuntu 20.04 kernel 5.13 for me it works with driver from https://www.cudytech.com/wu1200_software_download