无法使用 Ubuntu 18.04 和 20.04 连接 Wi-Fi(Lenovo ThinkPad E490,Realtek RTL8822BE)

无法使用 Ubuntu 18.04 和 20.04 连接 Wi-Fi(Lenovo ThinkPad E490,Realtek RTL8822BE)

我已经使用 Ubuntu 18.04 几个月了(与 Windows 10 双启动,没有任何问题),昨天,我的 Wi-Fi 适配器突然停止工作(没有列出任何内容)甚至停止显示。

关于这个问题有很多问题,但到目前为止,我都找不到任何解决办法。以下是我尝试过的方法:

编辑:经过几次重新启动并使用 Windows 后,我再次尝试,现在它显示无线适配器(“已禁用”):

    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.

但我实际上可以在这里看到 Wi-Fi 控制器:

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

以及 RTL8822BE 的驱动模块(rtw88) 也可见:

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

甚至司机也在场:

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

和这里:

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

我尝试重新启动网络服务:

sudo service network-manager restart

我尝试重新安装 Ubuntu 18.04(3 次...)以及现在的 Ubuntu 20.04。什么都没起作用...最奇怪的是,当我从可启动的 USB 棒“尝试 Ubuntu 18.04”时,Wi-Fi 工作正常,我甚至可以在安装过程中连接到我的网络,但是一旦安装的版本启动,它就再也无法工作了。

谁能帮我?

这是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

答案1

编辑2:我终于找到了类似的错误描述这里(以及类似的这里在我的笔记本电脑上测试后,我可以确认问题仅在从更新的Linux ubuntu 5.4.0-42-generic内核启动时发生。

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

为了测试是否存在这个问题,我必须从以前的内核(在我的情况下是Linux ubuntu 5.3.0-28-generic)启动。你可以这样做通过重新启动笔记本电脑,进入 Grub 屏幕,选择Advanced options from Ubuntu并选择要从其启动的先前版本。完成此操作后,我的 Wi-Fi 即可正常工作:

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.

编辑1:这只是暂时的。问题又回来了。

现在显示为:

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.

我正在再次尝试一切,比如

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

但它仍然不起作用。


第一个答案

我不知道为什么或如何出现此问题,但这是我修复它的方法:

在重新安装了 Ubuntu 18.04 3 次和 Ubuntu 20.04 1 次(与 Windows 10 一起作为双启动)后,我删除了 Ubuntu 分区(从 Windows 磁盘管理器中删除),将未使用的空间重新合并到 Windows 分区并重新启动。之后我注意到 GNU GRUB 在每次启动时仍然处于活动状态。所以我按照这些步骤删除了 Ubuntu 中的所有内容,直到我的笔记本电脑恢复到我第一次安装 Ubuntu 之前的状态。只有 Windows 10。

所以我刚刚安装了 Ubuntu 18.04(再次与 Windows 10 一起作为双启动),现在一切都运行正常。就是这样。

答案2

嗨我尝试按照这个:

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

这很棒,但我无法让 RTL8822BE 工作。所以这是我的答案(如果不允许,请删除板上的第一个答案)。我为我的笔记本电脑(华硕 Vivobook)购买了另一张 wifi/BT m.2 卡。

我懂了:

英特尔 Wireless-Ac 9260、2230、2X2 Ac+Bt、千兆、无 Vpro。据说它是为第 8 代英特尔处理器设计的,我的笔记本电脑就配备了这种处理器。

这非常简单。移除并更换卡连接器和天线,与 Realtek 相同。启动我的操作系统 W10 或 Ubuntu 并运行更新,选择我的 WiFi 网络并登录。价格为 17 美元

如果你真的陷入困境我希望这会有所帮助。

相关内容