Compiling TP-Link Archer T4U driver

Hello, newbie first post here,
as the title suggests I'm trying to set up a TP-Link Archer T4U USB WIFI adapter. On the official TP-link website there is a Linux driver and an instruction set on how to set it up, however something is going wrong. The instructions call for the command "make clean" to be run in the appropriate folder. I have make installed

make -v
GNU Make 4.3
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc... yada yada

Running the command gives the following result:

make clean
/bin/sh: line 1: bc: command not found
Makefile:719: T4U(EUUS)_V3_180511_Linux/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED/ No such file or directory
make: *** No rule to make target 'T4U(EUUS)_V3_180511_Linux/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX2
0170518-4444_AddLED/'. Stop.


…her T4U(EUUS)_V3_180511_Linux/rtl88x2BU_WiFi_linux_v5.2.4.1_22719.20170613_COEX20170518-4444_AddLED took 13ms
[:red_circle:] Γ— ls
drwxrwxrwx - 22 Aug 2017 ο„• core
drwxrwxrwx - 22 Aug 2017 ο„• hal
drwxrwxrwx - 22 Aug 2017 ξ—Ό include
drwxrwxrwx - 22 Aug 2017 ο„• os_dep
drwxrwxrwx - 22 Aug 2017 ο„• platform
.rwxrwxrwx 64 13 Jun 2017 ο€– clean
.rwxrwxrwx 54 13 Jun 2017 ο€– ifcfg-wlan0
.rwxrwxrwx 110 13 Jun 2017 ο€– Kconfig
.rwxrwxrwx 55k 13 Jun 2017  Makefile
.rwxrwxrwx 2,9k 13 Jun 2017 ο…›
.rwxrwxrwx 423 13 Jun 2017 ο€– runwpa
.rwxrwxrwx 294 13 Jun 2017 ο€– wlan0dhcp

The file does seem to be there. A further detail is that according to the website, the supported operating system is Linux kernel version 2.6.18~4.4. , maybe that has something to do with it or will be a further problem? I'm honestly so out of my depth here, that I don't know how to begin to look for mistakes.


inxi -Faz
System: Kernel: 5.15.5-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen root=UUID=43fbd08b-dbc1-48a9-ad91-769cffa24540
rw [email protected] quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
systemd.unified_cgroup_hierarchy=1 loglevel=3
Desktop: KDE Plasma 5.23.3 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 vt: 1 dm: SDDM
Distro: Garuda Linux base: Arch Linux
Machine: Type: Desktop Mobo: ASRock model: B450M Steel Legend serial:
UEFI: American Megatrends v: P3.60 date: 11/03/2020
CPU: Info: 8-Core model: AMD Ryzen 7 2700X bits: 64 type: MT MCP arch: Zen+ family: 17 (23)
model-id: 8 stepping: 2 microcode: 800820D cache: L1: 768 KiB L2: 4 MiB L3: 16 MiB
flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 118386
Speed: 2611 MHz min/max: 2200/3700 MHz boost: enabled Core speeds (MHz): 1: 2611 2: 2892
3: 2478 4: 2411 5: 4286 6: 4221 7: 3358 8: 2477 9: 2448 10: 2525 11: 4345 12: 4069 13: 2939
14: 2710 15: 4103 16: 2585
Vulnerabilities: Type: itlb_multihit status: Not affected
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2
mitigation: Full AMD retpoline, IBPB: conditional, STIBP: disabled, RSB filling
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics: Device-1: NVIDIA GM200 [GeForce GTX 980 Ti] vendor: driver: nvidia v: 495.44
alternate: nouveau,nvidia_drm bus-ID: 06:00.0 chip-ID: 10de:17c8 class-ID: 0300
Display: x11 server: X.Org compositor: kwin_x11 driver: loaded: nvidia
unloaded: modesetting alternate: fbdev,nouveau,nv,vesa display-ID: :0 screens: 1
Screen-1: 0 s-res: 3600x1080 s-dpi: 87 s-size: 1051x331mm (41.4x13.0") s-diag: 1102mm (43.4")
Monitor-1: DVI-I-1 res: 1680x1050 hz: 60 dpi: 90 size: 474x296mm (18.7x11.7") diag: 559mm (22")
Monitor-2: HDMI-0 res: 1920x1080 hz: 60 dpi: 82 size: 598x336mm (23.5x13.2") diag: 686mm (27")
OpenGL: renderer: NVIDIA GeForce GTX 980 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 495.44 direct render: Yes
Audio: Device-1: NVIDIA GM200 High Definition Audio vendor: driver: snd_hda_intel v: kernel
bus-ID: 06:00.1 chip-ID: 10de:0fb0 class-ID: 0403
Device-2: AMD Family 17h HD Audio vendor: ASRock driver: snd_hda_intel v: kernel
bus-ID: 08:00.3 chip-ID: 1022:1457 class-ID: 0403
Sound Server-1: ALSA v: k5.15.5-zen1-1-zen running: yes
Sound Server-2: JACK v: 1.9.19 running: no
Sound Server-3: PulseAudio v: 15.0 running: no
Sound Server-4: PipeWire v: 0.3.40 running: yes
Network: Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASRock driver: r8169
v: kernel port: f000 bus-ID: 04:00.0 chip-ID: 10ec:8168 class-ID: 0200
IF: enp4s0 state: down mac:
IF-ID-1: enp1s0f0u2 state: unknown speed: -1 duplex: half mac:
Bluetooth: Device-1: Xiaomi Mi/Redmi series (RNDIS) type: USB driver: rndis_host v: kernel bus-ID: 1-2:5
chip-ID: 2717:ff80 class-ID: 0a00 serial:
Report: bt-service: enabled,stopped note: tool can't run
Drives: Local Storage: total: 3.18 TiB used: 1.04 TiB (32.7%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: Western Digital model: WDS500G2B0A-00SM50 size: 465.76 GiB
block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: rev: 00WD
scheme: MBR
ID-2: /dev/sdb maj-min: 8:16 vendor: Western Digital model: WD20EZRZ-00Z5HB0 size: 1.82 TiB
block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400
serial: rev: 0A80 scheme: MBR
ID-3: /dev/sdc maj-min: 8:32 vendor: Western Digital model: WD10EZEX-22BBHA0 size: 931.51 GiB
block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200
serial: rev: 1A01 scheme: GPT
Partition: ID-1: / raw-size: 931.22 GiB size: 931.22 GiB (100.00%) used: 23.33 GiB (2.5%) fs: btrfs
dev: /dev/sdc2 maj-min: 8:34
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%) used: 576 KiB (0.2%) fs: vfat
dev: /dev/sdc1 maj-min: 8:33
ID-3: /home raw-size: 931.22 GiB size: 931.22 GiB (100.00%) used: 23.33 GiB (2.5%) fs: btrfs
dev: /dev/sdc2 maj-min: 8:34
ID-4: /var/log raw-size: 931.22 GiB size: 931.22 GiB (100.00%) used: 23.33 GiB (2.5%) fs: btrfs
dev: /dev/sdc2 maj-min: 8:34
ID-5: /var/tmp raw-size: 931.22 GiB size: 931.22 GiB (100.00%) used: 23.33 GiB (2.5%) fs: btrfs
dev: /dev/sdc2 maj-min: 8:34
Swap: Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 23.4 GiB used: 2 MiB (0.0%) priority: 100 dev: /dev/zram0
Sensors: System Temperatures: cpu: 32.5 C mobo: N/A gpu: nvidia temp: 47 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Info: Processes: 355 Uptime: 1h 14m wakeups: 0 Memory: 23.4 GiB used: 4.73 GiB (20.2%) Init: systemd
v: 249 tool: systemctl Compilers: gcc: 11.1.0 Packages: pacman: 1685 lib: 495 Shell: fish
v: 3.3.1 default: Bash v: 5.1.12 running-in: konsole inxi: 3.3.09

Update: After following the very helpful advice by filo, I have noticed that my original problem was that I didn't have bc installed.

However a new problem has presented itself: Running make eventually gives the following error:

/usr/src/rtl8822bu- fatal error: net/ipx.h: No such file or directory
20 | #include <net/ipx.h>
| ^~~~~~~~~~
compilation terminated.

I've tried looking for the error and specific header file related issues, but have only found solved bug reports from arch related kernels and similar driver packages on AUR.

Any help is appreciated, and thanks in advance!

Hi there, welcome.
Why don't you try with one of these two in the AUR (install with paru packagename)?
Please always provide your inxi -Faz output from terminal or using the Garuda assistant


Thank you very much for the help. I'll be sure to search AUR and such for stuff like that in the future. However the specific package also gives an error which I can't seem to find much about. I have edited the main question.

Be sure to also test the rtl88x2bu-dkms-git driver:

AUR (en) - rtl88x2bu-dkms-git

It is best to never try to use the wifi driver directly from the manufacturer in Linux. Generally drivers they supply will be too old to use on a rolling distro based on Arch Linux. Installing the driver from this source generally creates far more problems than it ever resolves. Please never use the manufacturer's driver unless no other suitable driver exists in the AUR for your adapter.

If you cannot compile the driver on the Linux Zen kernel then install and test with linux-lts or linux-mainline (as well as other kernels). Perhaps linux-next-git and the linux kernels may also be worth testing.

If you are still having no luck please post:

rfkill list

lsmod | sort

It seems there was a kernel bug report filed on your error this summer:[email protected]/T/

Although, that report was for a similar Realtek adapter not your specific model. I have spotted several reports of the same error when compiling various other Realtek adapters in the rtl88xx series.

Welcome to Garuda, and best of luck with your issue.


Glad that fixed you up. :+1:

Please report on which kernel/driver combination resolved your issue.


In the end I used the default and up to date at time of writing 5.15.5-zen1-1-zen x86_64 Kernel with the AUR (en) - rtl88x2bu-dkms-git driver as suggested by tbg. It installs just as in the readme, though a system restart was necessary for me. No issues came up since.

Thanks again to filo and tbg.


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.