RTL8822BE network adapter question

Hello everyone !
I’ve installed Endeavour OS in my wife’s laptop, and it’s working great.
Me and her, are having the same laptops (Lenovo IdeaPad S340) and i’m currently running Arch Linux on mine.
The thing is, i cannot make my wifi adapter work (RTL8822BE), even though it gets recognized by the kernel.
It used to work OOTB until kernel 5.4, but with the advent of 5.5, networking went downhill.
So, what is different with Endeavour OS?
Which driver is it using, to achive this?
I’ve burned my brains over this…

linux-lts kernel is 5.4 series, maybe that could be used as a workaround?

1 Like

welcome @4744-77

The latest EndeavourOS live iso image, comes with kernel 5.7.8 and the RTL8822BE adapter is working flawlessly, before even updating the system.
That’s why i’m asking.
A quick look at the Arch packages used, doesn’t reveal anything useful…
$ comm -23 <(pacman -Qenq | sort) <(pacman -Qgq base-devel | sort)
Edit: Maybe i need some help from the devs here…

Welcome aboard!

Welcome! lets see if our devs can help you out. @manuel @joekamprad Uh, Houston, we’ve had a problem.

what says:

rfkill list

if it says it is blocking some wifi and bluetooth try to blacklist ideapad_laptop

sudo tee /etc/modprobe.d/blacklist-ideapad.conf <<< "blacklist ideapad_laptop"

and reboot

sudo rfkill list
0: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
1: ideapad_bluetooth: Bluetooth
Soft blocked: no
Hard blocked: no
2: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
That was the first thing i’ve checked, but thank you anyway.
As for the “ideapad_laptop” kernel module suggestion, it has nothing to do with the networking.
It only controls a specific battery protection mechanism in IdeaPad laptops, as per here

i know no blocking at yours so no need for that blacklisting

could you post your boot journal? may it gives a hint on what goes nuts:

lspci > log.txt && lsusb >> log.txt && journalctl -b -0 >> log.txt && cat log.txt | curl -F 'f:1=<-' ix.io

Issues started after a new commit to Realtek rtw88 driver, 5.5 kernel series.
The related bug is [HERE](https://bugzilla.kernel.org/show_bug.cgi?id=206411

yes… i could find a solution with hints from the info out of journal and hardware info :wink:

http://ix.io/2tIh

Sorry, no “lsusb” in my system

Below is my dmesg listing rtw_pci (the problematic driver) errors.
These are showing up, in an endless sequence.

$ dmesg | grep rtw_pci

[ 5.805410] rtw_pci_link_ps+0x4f/0x90 [rtwpci]
[ 5.805533] rtw_pci 0000:02:00.0: failed to read ASPM, ret=-5
[ 8.439679] rtw_pci 0000:02:00.0: mac power on failed
[ 8.439682] rtw_pci 0000:02:00.0: failed to power on mac
[ 8.439683] rtw_pci 0000:02:00.0: leave idle state failed
[ 8.439811] rtw_pci 0000:02:00.0: failed to leave ips state
[ 8.439813] rtw_pci 0000:02:00.0: failed to leave idle state

Still, when i fire up the EndeavourOS Live Image in my computer, to my surprise, the network works like a charm !

Hello @4744-77
What are the current modules loaded for the wifi.

lspci -kv

Aug 09 19:27:03 inferno kernel: rtw_pci 0000:02:00.0: Firmware version 27.2.0, H2C version 13

Aug 09 19:27:03 inferno kernel: usb 1-2: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested

Aug 09 19:27:03 inferno kernel: usbcore: registered new interface driver ath9k_htc

Aug 09 19:27:04 inferno kernel: ------------[ cut here ]------------
Aug 09 19:27:04 inferno kernel: failed to read DBI register, addr=0x0719
Aug 09 19:27:04 inferno kernel: WARNING: CPU: 0 PID: 408 at drivers/net/wireless/realtek/rtw88/pci.c:1157 rtw_dbi_read8.constprop.0+0xa0/0xb0 [rtwpci]
Aug 09 19:27:04 inferno kernel: Modules linked in: cmac algif_hash algif_skcipher af_alg snd_hda_codec_hdmi snd_sof_pci snd_sof_intel_byt snd_sof_intel_ipc snd_sof_intel_hda_common snd_soc_hdac_hda snd_sof_xtensa_dsp snd_sof_intel_hda snd_sof bnep snd_soc_skl snd_soc_sst_ipc snd_soc_sst_dsp x86_pkg_temp_thermal intel_powerclamp snd_hda_ext_core coretemp snd_soc_acpi_intel_match snd_soc_acpi kvm_intel snd_soc_core snd_compress snd_hda_codec_realtek ac97_bus snd_hda_codec_generic kvm ledtrig_audio snd_pcm_dmaengine nls_iso8859_1 snd_hda_intel nls_cp437 snd_intel_dspcfg irqbypass vfat crct10dif_pclmul crc32_pclmul snd_hda_codec fat hid_multitouch ghash_clmulni_intel iTCO_wdt mei_hdcp aesni_intel iTCO_vendor_support snd_hda_core crypto_simd snd_hwdep ath9k_htc cryptd intel_rapl_msr glue_helper wmi_bmof intel_wmi_thunderbolt rapl snd_pcm rtwpci ath9k_common uvcvideo intel_cstate ath9k_hw intel_uncore rtw88 input_leds pcspkr snd_timer videobuf2_vmalloc ath snd videobuf2_memops videobuf2_v4l2 btusb soundcore
Aug 09 19:27:04 inferno kernel:  i2c_i801 mac80211 btrtl btbcm videobuf2_common btintel mei_me intel_lpss_pci videodev joydev cfg80211 mei bluetooth intel_lpss idma64 mc mousedev libarc4 processor_thermal_device intel_rapl_common ecdh_generic intel_pch_thermal intel_soc_dts_iosf ecc i2c_hid ideapad_laptop sparse_keymap rfkill wmi battery int3403_thermal int340x_thermal_zone tpm_crb ac tpm_tis tpm_tis_core evdev tpm int3400_thermal acpi_thermal_rel rng_core mac_hid pkcs8_key_parser crypto_user ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 hid_logitech_hidpp hid_logitech_dj hid_generic usbhid hid serio_raw atkbd libps2 crc32c_intel sdhci_pci cqhci sdhci xhci_pci mmc_core xhci_hcd i8042 serio i915 intel_gtt i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops cec rc_core drm agpgart
Aug 09 19:27:04 inferno kernel: CPU: 0 PID: 408 Comm: wpa_supplicant Tainted: G     U            5.7.12-arch1-1 #1
Aug 09 19:27:04 inferno kernel: Hardware name: LENOVO 81N7/LNVNB161216, BIOS ALCN31WW(V2.08) 07/08/2020
Aug 09 19:27:04 inferno kernel: RIP: 0010:rtw_dbi_read8.constprop.0+0xa0/0xb0 [rtwpci]
Aug 09 19:27:04 inferno kernel: Code: be ed 03 00 00 48 8b 40 50 e8 dc 85 42 e4 5b 5d 41 88 04 24 31 c0 41 5c c3 be 19 07 00 00 48 c7 c7 30 b3 7d c0 e8 27 a4 8b e3 <0f> 0b b8 fb ff ff ff 5b 5d 41 5c c3 0f 1f 40 00 0f 1f 44 00 00 55
Aug 09 19:27:04 inferno kernel: RSP: 0018:ffff9b3580813970 EFLAGS: 00010282
Aug 09 19:27:04 inferno kernel: RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
Aug 09 19:27:04 inferno kernel: RDX: 0000000000000001 RSI: 0000000000000092 RDI: 00000000ffffffff
Aug 09 19:27:04 inferno kernel: RBP: ffff9431231a1ea0 R08: 00000000000003a0 R09: 0000000000000000
Aug 09 19:27:04 inferno kernel: R10: 0000000000000000 R11: 0000000000000001 R12: ffff9b3580813997
Aug 09 19:27:04 inferno kernel: R13: ffff9431231a5bc8 R14: 0000000000000000 R15: 0000000000000100
Aug 09 19:27:04 inferno kernel: FS:  00007fb30241acc0(0000) GS:ffff943128600000(0000) knlGS:0000000000000000
Aug 09 19:27:04 inferno kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Aug 09 19:27:04 inferno kernel: CR2: 0000562a550f1488 CR3: 00000002548e8002 CR4: 00000000003606f0
Aug 09 19:27:04 inferno kernel: Call Trace:
Aug 09 19:27:04 inferno kernel:  rtw_pci_link_ps+0x4f/0x90 [rtwpci]
Aug 09 19:27:04 inferno kernel:  rtw_leave_ips+0x1a/0x70 [rtw88]
Aug 09 19:27:04 inferno kernel:  rtw_ops_config+0x91/0xc0 [rtw88]
Aug 09 19:27:04 inferno kernel:  ieee80211_hw_config+0x222/0x3d0 [mac80211]
Aug 09 19:27:04 inferno kernel:  __ieee80211_start_scan+0x23d/0x7f0 [mac80211]
Aug 09 19:27:04 inferno kernel:  ieee80211_request_scan+0x2c/0x50 [mac80211]
Aug 09 19:27:04 inferno kernel:  nl80211_trigger_scan+0x463/0x730 [cfg80211]
Aug 09 19:27:04 inferno kernel:  genl_rcv_msg+0x1b8/0x310
Aug 09 19:27:04 inferno kernel:  ? genl_family_rcv_msg_attrs_parse.isra.0+0xd0/0xd0
Aug 09 19:27:04 inferno kernel:  netlink_rcv_skb+0x75/0x140
Aug 09 19:27:04 inferno kernel:  genl_rcv+0x24/0x40
Aug 09 19:27:04 inferno kernel:  netlink_unicast+0x242/0x340
Aug 09 19:27:04 inferno kernel:  netlink_sendmsg+0x243/0x480
Aug 09 19:27:04 inferno kernel:  sock_sendmsg+0x5e/0x60
Aug 09 19:27:04 inferno kernel:  ____sys_sendmsg+0x253/0x290
Aug 09 19:27:04 inferno kernel:  ? copy_msghdr_from_user+0x6e/0xa0
Aug 09 19:27:04 inferno kernel:  ___sys_sendmsg+0x97/0xe0
Aug 09 19:27:04 inferno kernel:  ? __lru_cache_add+0x75/0xa0
Aug 09 19:27:04 inferno kernel:  __sys_sendmsg+0x81/0xd0
Aug 09 19:27:04 inferno kernel:  do_syscall_64+0x49/0x90
Aug 09 19:27:04 inferno kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Aug 09 19:27:04 inferno kernel: RIP: 0033:0x7fb302865137
Aug 09 19:27:04 inferno kernel: Code: 0b 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 89 54 24 1c 48 89 74 24 10
Aug 09 19:27:04 inferno kernel: RSP: 002b:00007ffcf74f65e8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
Aug 09 19:27:04 inferno kernel: RAX: ffffffffffffffda RBX: 0000562a550b47c0 RCX: 00007fb302865137
Aug 09 19:27:04 inferno kernel: RDX: 0000000000000000 RSI: 00007ffcf74f6620 RDI: 0000000000000006
Aug 09 19:27:04 inferno kernel: RBP: 0000562a550b46d0 R08: 0000000000000004 R09: 00007fb302924a40
Aug 09 19:27:04 inferno kernel: R10: 00007ffcf74f66f4 R11: 0000000000000246 R12: 0000562a550f0430
Aug 09 19:27:04 inferno kernel: R13: 00007ffcf74f6620 R14: 00007ffcf74f66f4 R15: 0000562a550f1490
Aug 09 19:27:04 inferno kernel: ---[ end trace 31c74387d6b12e07 ]---

Aug 09 19:27:04 inferno kernel: rtw_pci 0000:02:00.0: failed to read ASPM, ret=-5

02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822BE 802.11a/b/g/n/ac WiFi adapter (rev ff) (prog-if ff)
!!! Unknown header type 7f
Kernel driver in use: rtw_pci
Kernel modules: rtwpci

AFTER A REBOOT TO WINDOWS AND THEN BACK TO ARCH:

0000:00:1d.2/02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822BE 802.11a/b/g/n/ac WiFi adapter
Subsystem: Lenovo ThinkPad E595
Flags: bus master, fast devsel, latency 0, IRQ 255
I/O ports at 3000
Memory at a1200000 (64-bit, non-prefetchable)
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [148] Device Serial Number 00-e0-4c-ff-fe-b8-22-01
Capabilities: [158] Latency Tolerance Reporting
Capabilities: [160] L1 PM Substates
Kernel driver in use: rtw_pci
Kernel modules: rtwpci

linux-lts 5.4.55-1 is not working too? current kernel is 5.7.12 if this is the issue i would go for lts, and wait for 5.8 to check again

I’d gladly agree with you on this, BUT Endeavour OS has solved this issue already !!
Just trying to figure out what the Devs did.
Endeavour OS Live Iso Image contains 5.7.8 kernel, and Networking WORKS like a charm.
Cannot understand what’s happening
My Arch installation runs currently on 5.7.12 kernel, and i cannot - for the life of me - make it work…
It is the Very Same machine i’m trying it on.
Thanks everybody for your help guys.
It’s deeply appreciated.

You could try the https://github.com/rtlwifi-linux/rtlwifi_new

Or

rtw88-dkms-git

Already did, but to no avail.