TransWikia.com

Can't connect Wi-Fi with Ubuntu 18.04 and 20.04 (Lenovo ThinkPad E490, Realtek RTL8822BE)

Ask Ubuntu Asked by Diego Moreno on January 3, 2022

I have been working with Ubuntu 18.04 for several months now (with dual boot alongside Windows 10, which has no problems), and yesterday, out of nowhere, my Wi-Fi adapter stopped working (not listing anything) or stopped even showing.

There are A LOT of questions about this issue all over, but so far, nothing has worked for me. Here is what I have tried:

EDIT:
After a few reboots and using windows, I tried it again and now it shows the wireless adapter (as "DISABLED"):

    lshw -C network
WARNING: you should run this program as super-user.
  *-network                 
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:04:00.0
       logical name: enp4s0
       version: 10
       serial: 64:1c:67:a9:cd:7c
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 firmware=rtl8168g-3_0.0.1 04/23/13 latency=0 link=no multicast=yes port=MII
       resources: irq:16 ioport:3000(size=256) memory:a1304000-a1304fff memory:a1300000-a1303fff
  *-generic DISABLED
       description: Wireless interface
       product: RTL8822BE 802.11a/b/g/n/ac WiFi adapter
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:05:00.0
       logical name: wlp5s0
       version: ff
       serial: c0:b5:d7:a2:1b:65
       width: 32 bits
       clock: 66MHz
       capabilities: bus_master vga_palette cap_list ethernet physical wireless
       configuration: broadcast=yes driver=rtw_pci driverversion=5.4.0-42-generic firmware=N/A latency=255 link=no maxlatency=255 mingnt=255 multicast=yes wireless=IEEE 802.11
       resources: irq:142 ioport:2000(size=256) memory:a1200000-a120ffff
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.

But I can actually see the Wi-Fi controller here:

sudo lspci
[...]
02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader (rev 01)
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)
05:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822BE 802.11a/b/g/n/ac WiFi adapter (rev ff)
07:00.0 Non-Volatile memory controller: SK hynix BC501 NVMe Solid State Drive 512GB

And the driver module for the RTL8822BE (rtw88) is visible too:

sudo lsmod
Module                  Size  Used by
cpuid                  16384  0
rfcomm                 81920  16
cmac                   16384  3
algif_hash             16384  1
algif_skcipher         16384  1
af_alg                 24576  6 algif_hash,algif_skcipher
bnep                   24576  2
nls_iso8859_1          16384  1
snd_sof_pci            20480  0
snd_sof_intel_hda_common    69632  1 snd_sof_pci
snd_soc_hdac_hda       24576  1 snd_sof_intel_hda_common
snd_sof_intel_hda      20480  1 snd_sof_intel_hda_common
snd_sof_intel_byt      20480  1 snd_sof_pci
snd_sof_intel_ipc      20480  1 snd_sof_intel_byt
snd_sof               106496  4 snd_sof_pci,snd_sof_intel_hda_common,snd_sof_intel_byt,snd_sof_intel_ipc
snd_sof_xtensa_dsp     16384  1 snd_sof_pci
snd_hda_codec_hdmi     61440  1
snd_hda_ext_core       28672  3 snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
snd_soc_acpi_intel_match    32768  2 snd_sof_pci,snd_sof_intel_hda_common
snd_hda_codec_conexant    28672  1
snd_hda_codec_generic    81920  1 snd_hda_codec_conexant
snd_soc_acpi           16384  2 snd_sof_pci,snd_soc_acpi_intel_match
snd_soc_core          245760  3 snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hda
snd_compress           24576  1 snd_soc_core
ac97_bus               16384  1 snd_soc_core
snd_pcm_dmaengine      16384  1 snd_soc_core
x86_pkg_temp_thermal    20480  0
intel_powerclamp       20480  0
snd_hda_intel          53248  3
snd_intel_dspcfg       24576  3 snd_hda_intel,snd_sof_pci,snd_sof_intel_hda_common
coretemp               20480  0
snd_hda_codec         131072  5 snd_hda_codec_generic,snd_hda_codec_conexant,snd_hda_codec_hdmi,snd_hda_intel,snd_soc_hdac_hda
uvcvideo               98304  0
kvm_intel             286720  0
kvm                   663552  1 kvm_intel
videobuf2_vmalloc      20480  1 uvcvideo
videobuf2_memops       20480  1 videobuf2_vmalloc
snd_hda_core           90112  9 snd_hda_codec_generic,snd_hda_codec_conexant,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
videobuf2_v4l2         24576  1 uvcvideo
videobuf2_common       49152  2 videobuf2_v4l2,uvcvideo
thinkpad_acpi         110592  0
crct10dif_pclmul       16384  1
videodev              225280  3 videobuf2_v4l2,uvcvideo,videobuf2_common
ghash_clmulni_intel    16384  0
btusb                  57344  0
mc                     53248  4 videodev,videobuf2_v4l2,uvcvideo,videobuf2_common
aesni_intel           372736  4
nvram                  16384  1 thinkpad_acpi
snd_hwdep              20480  1 snd_hda_codec
snd_pcm               106496  8 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_sof,snd_sof_intel_hda_common,snd_soc_core,snd_hda_core,snd_pcm_dmaengine
crypto_simd            16384  1 aesni_intel
cryptd                 24576  3 crypto_simd,ghash_clmulni_intel
ledtrig_audio          16384  4 snd_hda_codec_generic,snd_hda_codec_conexant,snd_sof,thinkpad_acpi
snd_seq_midi           20480  0
rtwpci                 24576  0
rtw88                 610304  1 rtwpci
btrtl                  24576  1 btusb
glue_helper            16384  1 aesni_intel
mei_hdcp               24576  0
snd_seq_midi_event     16384  1 snd_seq_midi
snd_rawmidi            36864  1 snd_seq_midi
snd_seq                69632  2 snd_seq_midi,snd_seq_midi_event
intel_rapl_msr         20480  0
btbcm                  16384  1 btusb
input_leds             16384  0
joydev                 24576  0
btintel                24576  1 btusb
mac80211              843776  2 rtwpci,rtw88
serio_raw              20480  0
intel_cstate           20480  0
intel_rapl_perf        20480  0
cfg80211              704512  2 mac80211,rtw88
snd_seq_device         16384  3 snd_seq,snd_seq_midi,snd_rawmidi
snd_timer              36864  2 snd_seq,snd_pcm
bluetooth             581632  41 btrtl,btintel,btbcm,bnep,btusb,rfcomm
i915                 1986560  14
libarc4                16384  1 mac80211
rtsx_pci_ms            24576  0
snd                    90112  20 snd_hda_codec_generic,snd_seq,snd_hda_codec_conexant,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_timer,snd_compress,thinkpad_acpi,snd_soc_core,snd_pcm,snd_rawmidi
processor_thermal_device    24576  0
ecdh_generic           16384  2 bluetooth
intel_rapl_common      24576  2 intel_rapl_msr,processor_thermal_device
soundcore              16384  1 snd
int3403_thermal        16384  0
int340x_thermal_zone    16384  2 int3403_thermal,processor_thermal_device
intel_soc_dts_iosf     20480  1 processor_thermal_device
int3400_thermal        20480  0
acpi_thermal_rel       16384  1 int3400_thermal
ecc                    28672  1 ecdh_generic
mei_me                 40960  1
mei                   106496  3 mei_hdcp,mei_me
drm_kms_helper        184320  1 i915
memstick               20480  1 rtsx_pci_ms
i2c_algo_bit           16384  1 i915
intel_pch_thermal      16384  0
fb_sys_fops            16384  1 drm_kms_helper
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
wmi_bmof               16384  0
intel_wmi_thunderbolt    20480  0
mac_hid                16384  0
ucsi_acpi              16384  0
typec_ucsi             40960  1 ucsi_acpi
typec                  45056  1 typec_ucsi
acpi_pad              184320  0
sch_fq_codel           20480  2
parport_pc             40960  0
ppdev                  24576  0
lp                     20480  0
parport                53248  3 parport_pc,lp,ppdev
drm                   491520  5 drm_kms_helper,i915
ip_tables              32768  0
x_tables               40960  1 ip_tables
autofs4                45056  2
hid_generic            16384  0
usbhid                 57344  0
hid                   131072  2 usbhid,hid_generic
rtsx_pci_sdmmc         28672  0
crc32_pclmul           16384  0
psmouse               155648  0
nvme                   49152  1
r8169                  90112  0
nvme_core             102400  3 nvme
i2c_i801               32768  0
ahci                   40960  1
realtek                24576  1
rtsx_pci               69632  2 rtsx_pci_sdmmc,rtsx_pci_ms
libahci                32768  1 ahci
wmi                    32768  2 intel_wmi_thunderbolt,wmi_bmof
video                  49152  2 thinkpad_acpi,i915
pinctrl_cannonlake     36864  0
pinctrl_intel          28672  1 pinctrl_cannonlake

And even the driver is present:

ls /lib/firmware/rtlwifi/rtl8822befw.bin 
/lib/firmware/rtlwifi/rtl8822befw.bin

and here:

ls /lib/firmware/rtw88/rtw8822b_fw.bin
/lib/firmware/rtw88/rtw8822b_fw.bin

I tried restarting the network service:

sudo service network-manager restart

I tried reinstalling Ubuntu 18.04 (3 times…) e and now Ubuntu 20.04. Nothing has worked…
And the weirdest thing is, when I am "trying Ubuntu 18.04" from a Bootable USB stick, Wi-Fi works just fine, I can even connect to my network during the installation process, but as soon as the installed version boots, it never works again.

Can anyone help me?

This is the result of ifconfig -a

enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.86.215  netmask 255.255.255.0  broadcast 192.168.86.255
        inet6 fe80::4454:48f6:fc28:db11  prefixlen 64  scopeid 0x20<link>
        ether 64:1c:67:a9:cd:7c  txqueuelen 1000  (Ethernet)
        RX packets 13303  bytes 13329507 (13.3 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 11144  bytes 1302142 (1.3 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 2314  bytes 212337 (212.3 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2314  bytes 212337 (212.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp5s0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether c0:b5:d7:a2:1b:65  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

2 Answers

Hi I tried following this:

https://help.ubuntu.com/stable/ubuntu-help/net-wireless-troubleshooting-hardware-check.html.en

Which was excellent but I couldn't get the RTL8822BE working. So this is my answer (first answer on the board if it's not allowed here please remove). I purchased another wifi/BT m.2 card for my laptop (Asus Vivobook).

I got this:

Intel Wireless-Ac 9260, 2230, 2X2 Ac+Bt, Gigabit, No Vpro. It says it was designed for 8th gen Intel processors which what my laptop has.

It was very straight forward. Remove and replace the card Connectors and Antennas all the same as the Realtek. Boot into either of my OS(s) W10 or Ubuntu and run updates, select my WiFi network and login in. It was $17usd

If you're really stuck I hope this helps.

Answered by Christine_Ubuntu on January 3, 2022

EDIT 2: I finally found a similar error described here (and a similar one here). After testing on my laptop, I could confirm that the problem happens only when I boot from the updated Linux ubuntu 5.4.0-42-generic kernel.

uname -a
Linux ubuntu 5.4.0-42-generic #46~18.04.1-Ubuntu SMP Fri Jul 10 07:21:24 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

dmesg | grep rtw
[   10.321995] rtw_core: loading out-of-tree module taints kernel.
[   10.322041] rtw_core: module verification failed: signature and/or required key missing - tainting kernel
[   10.715315] rtw_8822be 0000:05:00.0: enabling device (0000 -> 0003)
[   11.576504] rtw_8822be 0000:05:00.0: Firmware version 27.2.0, H2C version 13
[   12.362399] rtw_8822be 0000:05:00.0 wlp5s0: renamed from wlan0
[  154.000006] rtw_8822be 0000:05:00.0: failed to read ASPM, ret=-5
[  154.003024] rtw_8822be 0000:05:00.0: failed to send h2c command
[  154.147617] rtw_8822be 0000:05:00.0: firmware failed to restore hardware setting
[  154.150646] rtw_8822be 0000:05:00.0: failed to send h2c command

To test out that this was the problem, I had to boot from a previous kernel (in my case the Linux ubuntu 5.3.0-28-generic). You can do that by rebooting the laptop, go into the Grub screen, choose Advanced options from Ubuntu and choosing a previous version to boot from. And after doing that, my Wi-Fi was working normally:

uname -a
Linux ubuntu 5.3.0-28-generic #30~18.04.1-Ubuntu SMP Fri Jan 17 06:14:09 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

dmesg | grep rtw
[   12.777529] rtw_pci 0000:05:00.0: enabling device (0000 -> 0003)
[   12.848050] rtw_pci 0000:05:00.0: pci msi enabled
[   13.032126] rtw_pci 0000:05:00.0 wlp5s0: renamed from wlan0

lshw -C network
WARNING: you should run this program as super-user.
[...]
  *-network
       description: Wireless interface
       product: RTL8822BE 802.11a/b/g/n/ac WiFi adapter
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:05:00.0
       logical name: wlp5s0
       version: 00
       serial: c0:b5:d7:a2:1b:65
       width: 64 bits
       clock: 33MHz
       capabilities: bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=rtw_pci driverversion=5.3.0-28-generic firmware=N/A ip=192.168.86.186 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:142 ioport:2000(size=256) memory:a1200000-a120ffff
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.

EDIT 1: this was just temporary. The problem is back.

Now it shows as:

lshw -C network
WARNING: you should run this program as super-user.
[...]
  *-generic
       description: Wireless interface
       product: Illegal Vendor ID
       vendor: Illegal Vendor ID
       physical id: 0
       bus info: pci@0000:05:00.0
       logical name: wlp5s0
       version: ff
       serial: c0:b5:d7:a2:1b:65
       width: 32 bits
       clock: 66MHz
       capabilities: bus_master vga_palette cap_list ethernet physical wireless
       configuration: broadcast=yes driver=rtw_8822be driverversion=5.4.0-42-generic firmware=N/A latency=255 link=no maxlatency=255 mingnt=255 multicast=yes wireless=IEEE 802.11
       resources: irq:142 ioport:2000(size=256) memory:a1200000-a120ffff
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.

I am trying everything again, like this:

sudo make install
make -C /lib/modules/5.4.0-42-generic/build M=/home/diego/Downloads/rtw88 modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-42-generic'
  Building modules, stage 2.
  MODPOST 10 modules
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-42-generic'
Install rtw88 SUCCESS

But it is still not working.


FIRST ANSWER:

I don't why or how this problem appeared, but here is how I fixed it:

After reinstalling Ubuntu 18.04 3 times and Ubuntu 20.04 1 time (all alongside Windows 10 as dual boot), I deleted the Ubuntu partition (from Windows disk manager), reincorporated the unused space to the Windows partition and rebooted. After that I noticed the GNU GRUB was still active at every boot. So I followed these steps to removed everything from Ubuntu until my laptop was just like it was before I installed Ubuntu for the first time. With just Windows 10.

So I just installed Ubuntu 18.04 (again alongside Windows 10 as dual boot) and now everything works just fine. That's it.

Answered by Diego Moreno on January 3, 2022

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP