RTL8822BU Linux driver

Hello! I wondered if there’s any chance that RTL8822BU Linux driver could be upgraded to the latest kernels. It worked fine up to 5.14 kernel, but now it’s unsupported, so for the last months I’m unable to use my usb 5G wifi and my navigation speed is stuck at 100M thanks to my internal wifi card, so I miss those 500M my usb wifi gives me. I would really appreciate if I could use it back in my Manjaro Linux…

System:
  Kernel: 5.16.14-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 11.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.16-x86_64
    root=UUID=b0af860c-520b-4918-a714-8e475fddc4b4 rw quiet apparmor=1
    security=apparmor udev.log_priority=3
  Desktop: KDE Plasma v: 5.24.4 tk: Qt v: 5.15.3 info: kdocker wm: kwin_x11
    vt: 7 dm: LightDM v: 1.30.0 Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop System: Gigabyte product: H110M-S2H v: N/A
    serial: <superuser required>
  Mobo: Gigabyte model: H110M-S2H-CF v: x.x serial: <superuser required>
    UEFI: American Megatrends v: F22 date: 06/12/2017
Battery:
  Message: No system battery data found. Is one present?
Memory:
  RAM: total: 7.65 GiB used: 4.33 GiB (56.6%)
  RAM Report:
    permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: Intel Core i5-7400 bits: 64 type: MCP arch: Kaby Lake family: 6
    model-id: 0x9E (158) stepping: 9 microcode: 0xEC
  Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 256 KiB
    desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB L3: 6 MiB
    desc: 1x6 MiB
  Speed (MHz): avg: 800 min/max: 800/3500 scaling: driver: intel_pstate
    governor: powersave cores: 1: 800 2: 800 3: 800 4: 800 bogomips: 24008
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat
    arch_capabilities arch_perfmon art avx avx2 bmi1 bmi2 bts clflush clflushopt
    cmov constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts
    ept ept_ad erms est f16c flexpriority flush_l1d fma fpu fsgsbase fxsr ht
    hwp hwp_act_window hwp_epp hwp_notify ibpb ibrs ida intel_pt invpcid
    invpcid_single lahf_lm lm mca mce md_clear mmx monitor movbe mpx msr mtrr
    nonstop_tsc nopl nx pae pat pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pln
    pni popcnt pse pse36 pti pts rdrand rdseed rdtscp rep_good sdbg sep smap
    smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow
    tsc tsc_adjust tsc_deadline_timer vme vmx vnmi vpid x2apic xgetbv1 xsave
    xsavec xsaveopt xsaves xtopology xtpr
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf
    mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled
  Type: mds mitigation: Clear CPU buffers; SMT disabled
  Type: meltdown mitigation: PTI
  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: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: disabled, RSB filling
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel HD Graphics 630 vendor: Gigabyte driver: i915 v: kernel
    ports: active: HDMI-A-1 empty: DP-1,HDMI-A-2,HDMI-A-3 bus-ID: 00:02.0
    chip-ID: 8086:5912 class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.3 compositor: kwin_x11 driver: X:
    loaded: modesetting alternate: fbdev,vesa gpu: i915 display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1360x768 s-dpi: 96 s-size: 359x203mm (14.13x7.99")
    s-diag: 412mm (16.24")
  Monitor-1: HDMI-A-1 mapped: HDMI-1 model: DGM CVTE TV built: 2010
    res: 1360x768 hz: 60 dpi: 60 size: 575x323mm (22.64x12.72")
    diag: 1171mm (46.1") ratio: 15:9, 16:10 modes: max: 1360x768 min: 720x400
  OpenGL: renderer: Mesa Intel HD Graphics 630 (KBL GT2) v: 4.6 Mesa 21.3.8
    direct render: Yes
Audio:
  Device-1: Intel 100 Series/C230 Series Family HD Audio vendor: Gigabyte
    driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:a170
    class-ID: 0403
  Sound Server-1: ALSA v: k5.16.14-1-MANJARO running: yes
  Sound Server-2: sndio v: N/A running: no
  Sound Server-3: JACK v: 1.9.20 running: no
  Sound Server-4: PulseAudio v: 15.0 running: yes
  Sound Server-5: PipeWire v: 0.3.49 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Gigabyte driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: e000 bus-ID: 01:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp1s0 state: down mac: <filter>
  Device-2: Qualcomm Atheros AR9287 Wireless Network Adapter driver: ath9k
    v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 bus-ID: 03:00.0
    chip-ID: 168c:002e class-ID: 0280
  IF: wlp3s0 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
Bluetooth:
  Message: No bluetooth data found.
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 1.93 TiB used: 961.79 GiB (48.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Kingston model: SUV400S37120G
    size: 111.79 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: 96R9 scheme: MBR
  ID-2: /dev/sdb maj-min: 8:16 vendor: Seagate model: ST2000DM006-2DM164
    size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    type: HDD rpm: 7200 serial: <filter> rev: CC26 scheme: MBR
  Optical-1: /dev/sr0 vendor: HL-DT-ST model: DVDRAM GH24NSD1 rev: LG00
    dev-links: cdrom
  Features: speed: 12 multisession: yes audio: yes dvd: yes
    rw: cd-r,cd-rw,dvd-r,dvd-ram state: running
Partition:
  ID-1: / raw-size: 52.11 GiB size: 51.04 GiB (97.95%) used: 37.75 GiB (74.0%)
    fs: ext4 dev: /dev/sda5 maj-min: 8:5 label: N/A
    uuid: b0af860c-520b-4918-a714-8e475fddc4b4
  ID-2: /boot/efi raw-size: 312.8 MiB size: 312.1 MiB (99.80%)
    used: 4.4 MiB (1.4%) fs: vfat dev: /dev/sda1 maj-min: 8:1 label: N/A
    uuid: EABA-FE4C
  ID-3: /home raw-size: 244.14 GiB size: 239.3 GiB (98.02%)
    used: 88.12 GiB (36.8%) fs: ext4 dev: /dev/sdb1 maj-min: 8:17 label: N/A
    uuid: 5af1c6ab-2712-463f-9c82-1370235b0375
  ID-4: /mnt/datuak raw-size: 1.58 TiB size: 1.56 TiB (98.37%)
    used: 804.35 GiB (50.5%) fs: ext4 dev: /dev/sdb5 maj-min: 8:21 label: N/A
    uuid: 9843afea-efb9-408e-b50e-6cf56756cf68
  ID-5: /mnt/windows raw-size: 59.37 GiB size: 57.94 GiB (97.59%)
    used: 31.57 GiB (54.5%) fs: ext4 dev: /dev/sda6 maj-min: 8:6 label: N/A
    uuid: 78376759-30ad-4506-b44d-00f687846e78
Swap:
  Alert: No swap data was found.
Unmounted:
  ID-1: /dev/sda2 maj-min: 8:2 size: 1 KiB fs: <superuser required> label: N/A
    uuid: N/A
  ID-2: /dev/sdb2 maj-min: 8:18 size: 1 KiB fs: <superuser required>
    label: N/A uuid: N/A
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 10 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-3:2 info: Sunplus Innovation Optical Mouse type: Mouse
    driver: hid-generic,usbhid interfaces: 1 rev: 2.0 speed: 1.5 Mb/s
    power: 98mA chip-ID: 1bcf:0005 class-ID: 0301
  Hub-2: 1-4:3 info: Genesys Logic Hub ports: 4 rev: 2.1 speed: 480 Mb/s
    power: 100mA chip-ID: 05e3:0610 class-ID: 0900
  Device-1: 1-4.4:5 info: Realtek RTL88x2bu [AC1200 Techkey]
    type: <vendor specific> driver: N/A interfaces: 1 rev: 2.1 speed: 480 Mb/s
    power: 500mA chip-ID: 0bda:b812 class-ID: 0000 serial: <filter>
  Device-2: 1-8:4 info: N/A type: Keyboard,HID driver: hid-generic,usbhid
    interfaces: 2 rev: 1.1 speed: 1.5 Mb/s power: 100mA chip-ID: 026d:0005
    class-ID: 0300
  Hub-3: 1-10:6 info: Genesys Logic Hub ports: 4 rev: 2.0 speed: 480 Mb/s
    power: 100mA chip-ID: 05e3:0608 class-ID: 0900
  Hub-4: 2-0:1 info: Super-speed hub ports: 4 rev: 3.0 speed: 5 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-5: 2-4:2 info: Genesys Logic hub ports: 4 rev: 3.0 speed: 5 Gb/s
    chip-ID: 05e3:0616 class-ID: 0900
Sensors:
  System Temperatures: cpu: 29.8 C mobo: 27.8 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 251 Uptime: 2h 30m wakeups: 0 Init: systemd v: 250
  tool: systemctl Compilers: gcc: 11.2.0 clang: 13.0.1 Packages: 1816
  pacman: 1796 lib: 465 flatpak: 20 Shell: Bash v: 5.1.16 running-in: konsole
  inxi: 3.3.15

Thanx for any help and excuse my poor English!!
:hugs: :hugs:

:+1: Welcome to Manjaro! :+1:

  1. Please read this:
    [HowTo] Provide System Information
    and press the three dots below your post and press the :pencil2: to give us more information so we can see what’s really going on.
    Now we know the symptom of the disease, but we need some more probing to know where the origin lies… :grin:
  2. An inxi --admin --verbosity=7 --filter --no-host --width would be the minimum required information for us to be able to help you. (Personally Identifiable Information like serial numbers and MAC addresses will be filtered out by the above command)
    Also, please copy-paste that output in-between 3 backticks ``` at the beginning and end of the code/text.

:+1:

1 Like
pamac build rtl8822bu-dkms-git

as @Aragorn already stated, there is a special package at the aur. here is a link for additional information but it is helpful if you would post the output of inxi --admin --verbosity=7 --filter --no-host --width to see what driver is installed.

https://wiki.archlinux.org/title/Network_configuration/Wireless#rtl8822bu

1 Like

Thank you! I hope I did it well…

I guess that’s the one I’m using since I started with Manjaro couple of years ago, and it worked fine, but 5.14 was the last kernel it worked properly…

your wifi-device is a qualcomm/atheros. please search the forum for this and please read this first:
https://wiki.archlinux.org/title/Network_configuration/Wireless#ath9k

Building module:
cleaning build area...
'make' all KVER=5.16.18-1-MANJARO...........(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.16.18-1-MANJARO (x86_64)
Errorea rtl8822bu-dkms-git konfiguratzen
Consult /var/lib/dkms/rtl8822bu/20180723/build/make.log for more information.
Errorea: rtl8822bu-dkms-git: komandoa ez da behar bezala exekutatu
Transakzio osteko kakoak exekutatzen...
Arming ConditionNeedsUpdate...
Install DKMS modules
==> dkms install --no-depmod rtl8822bu/20180723 -k 5.17.1-3-MANJARO
Error! Bad return status for module build on kernel: 5.17.1-3-MANJARO (x86_64)
Consult /var/lib/dkms/rtl8822bu/20180723/build/make.log for more information.
==> WARNING: `dkms install --no-depmod rtl8822bu/20180723 -k 5.17.1-3-MANJARO' exited 10
==> dkms install --no-depmod rtl8822bu/20180723 -k 5.16.18-1-MANJARO
Error! Bad return status for module build on kernel: 5.16.18-1-MANJARO (x86_64)
Consult /var/lib/dkms/rtl8822bu/20180723/build/make.log for more information.
==> WARNING: `dkms install --no-depmod rtl8822bu/20180723 -k 5.16.18-1-MANJARO' exited 10
==> ERROR: Missing 4.14.275-1-MANJARO kernel modules tree for module rtl8822bu/20180723.
Refreshing PackageKit...

I was using rtl8822bu-dkms instead, now I tried installing rtl8822bu-dkms-git but it seems to be some problems…

youll need to install kernel headers first, if you want to use the dkms driver

1 Like

I have two wifi-devices, but the one I want to use (and used to use with all kernels until 5.14) is this one:

Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: Gigabyte driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
lanes: 1 port: e000 bus-ID: 01:00.0

The one marked as device-2 only runs up to 100M as can’t not use 5G, and the USB device, Realtek RTL8111/8168/841, runs up to 500M, as it takes the 5g signal. That’s the problem, I want to use Realtek one, but since kernel 5.14 was unsupported and upgraded to next kernels, Realtek wifi is not working any more…

You’ll need to install the kernel headers first.

To install headers for all installed kernels, run the following:

pamac install $(pamac list --quiet --installed | grep "^linux[0-9]*[-rt]*$" | awk '{print $1"-headers"}' ORS=' ')

And then try reinstalling the driver.

1 Like

I used rtl8822bu-dkms fine with all kernel updates up to 5.14. Problems started with 5.15, 5.16, 5.17…

It tells me it’s already done, so there’s nothing to do. The problem is that rtl8822bu-dkms is not working for kernels after 5.14. That’s my concern, if that driver will ever be upgraded to support all kernels after 5.14, because it’s stuck in 5.14 and there’s not been and upgrade of the driver for next kernels…

That is not done by Manjaro itself. The drivers need to be adapted and Manjaro doesn’t do that.

I suggest you then stick to kernel version 5.10 as it’s the latest LTS that the drivers work on…

Ok, thanks, that’s the answer I was looking for and I was afraid of it. The problem is that I tried to go back to kernel version 5.10, but then Virtual Box won’t work as now I have the headers for kernel version 5.16. It’s a bit of a mess… :sob: I’m afraid I will have that 5G wifi-device for nothing…
Thank you everybody! :kissing_heart:

You can always have multiple kernels installed and use them as neccessary?

Yep, I do it, but VirtualBox is working only with one of them, the one that doesn’t support my wifi-device, and I need VirtualBox for my job. It makes difficult to go back to kernel 5.10…

Install the headers for 5.10 and Virtual Box will work on that… but I am not an VBox user maybe they have specific kernel modules to install?
If you don’t use dkms?

I did it, and then VirtualBox didn’t work, it asked me to install the kernel headers -they were supposed to be all installed-, so I guess I’d uninstall VirtualBox and install and older version, not sure. Only I can say is that that move didn’t work for me.

Thank you all, I’ll continue with my old wifi-device and 100M until someone decides to update rtl8822bu driver to work with the newest kernels… :man_shrugging: :kissing_heart: :kissing_heart: :kissing_heart:

please read carefully, this might be the solution:
https://wiki.archlinux.org/title/Network_configuration/Wireless#ath9k

ath9k

External resources:

    https://wireless.wiki.kernel.org/en/users/drivers/ath9k
    Debian:ath9k

As of Linux 3.15.1, some users have been experiencing a decrease in bandwidth. In some cases this can fixed by setting the nohwcrypt=1 option for the ath9k module. See Kernel module#Setting module options.
Note: Use the command lsmod to see what modules are in use and change ath9k if it is named differently (e.g. ath9k_htc).

In the unlikely event that you have stability issues that trouble you, you could try using the backports-patchedAUR[broken link: package not found] package. An ath9k mailing list exists for support and development related discussions.
Power saving

Although Linux Wireless says that dynamic power saving is enabled for Atheros ath9k single-chips newer than AR9280, for some devices (e.g. AR9285) powertop might still report that power saving is disabled. In this case enable it manually.

On some devices (e.g. AR9285), enabling the power saving might result in the following error:

# iw dev wlan0 set power_save on

command failed: Operation not supported (-95)

The solution is to set the ps_enable=1 option for the ath9k module, see Kernel module#Setting module options.