我正在尝试在 RHEL 8 上为 8821CE 安装 wifi 卡驱动程序。我暂时使用 88XXau 作为 USB wifi 适配器。我一直在寻找解决方案一段时间,并遇到了两个主要的 git 存储库:
https://github.com/lwfinger/rtlwifi_new/tree/rtw88
https://github.com/tomaspinho/rtl8821ce/
据我所知,rtw88 仍然不支持 8821CE 卡。
编辑代码并按照问题部分解决与内核版本相关的编译问题后,我成功安装了 /tomaspinho dkms 模块:
https://github.com/tomaspinho/rtl8821ce/issues?q=centos
据我所知,这基本上涉及更改一些 ifdef 定义以适应使用最新或向后移植代码的旧内核。
现在我已经正确安装了 dkms 模块,并且可以在 lsmod 输出中看到该模块已加载,但仍未检测到该卡,我想知道从现在起我可以做什么。
预先感谢您的帮助。
lsmod:
lsmod | grep 8821
8821ce 2023424 0
cfg80211 806912 2 88XXau,8821ce
核心:
uname -r
4.18.0-193.1.2.el8_2.x86_64
消息:
dmesg | grep 8821
[ 0.758821] pci_bus 0000:00: root bus resource [mem 0xfee00000-0xffffffff window]
[ 3.187034] 8821ce: loading out-of-tree module taints kernel.
[ 3.218784] rtl8821ce 0000:02:00.0: enabling device (0000 -> 0003)
[ 3.248873] Modules linked in: crc32_pclmul(+) 8821ce(OE+) 88XXau(OE+) crc32c_intel amd_iommu_v2 gpu_sched i2c_algo_bit ttm hid_logitech_hidpp drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops cfg80211 nvme drm ghash_clmulni_intel serio_raw r8169 nvme_core rfkill realtek pinctrl_amd hid_logitech_dj dm_mirror dm_region_hash dm_log dm_mod
[ 3.248981] ? rtw_chbw_to_freq_range+0x40/0x96 [8821ce]
[ 3.249021] ? rtw_is_dfs_ch+0x34/0x70 [8821ce]
[ 3.249067] ? rtw_regd_apply_flags+0xc9/0xda [8821ce]
[ 3.249113] rtw_wiphy_register+0x1e/0x20 [8821ce]
[ 3.249159] rtw_cfg80211_ndev_res_register+0x11/0x17 [8821ce]
[ 3.249203] rtw_os_ndev_register+0xf2/0x157 [8821ce]
[ 3.249248] rtw_os_ndevs_register+0x9e/0xce [8821ce]
[ 3.249292] rtw_os_ndevs_init+0x24/0x3a [8821ce]
[ 3.249334] rtw_drv_init+0x4f/0xac [8821ce]
[ 3.249389] rtw_drv_entry+0x48/0x1000 [8821ce]
[ 3.249485] WARNING: CPU: 6 PID: 528 at /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/os_dep/linux/os_intfs.c:1681 rtw_os_ndev_register+0x64/0x157 [8821ce]
[ 3.249485] Modules linked in: crc32_pclmul(+) 8821ce(OE+) 88XXau(OE+) crc32c_intel amd_iommu_v2 gpu_sched i2c_algo_bit ttm hid_logitech_hidpp drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops cfg80211 nvme drm ghash_clmulni_intel serio_raw r8169 nvme_core rfkill realtek pinctrl_amd hid_logitech_dj dm_mirror dm_region_hash dm_log dm_mod
[ 3.249537] RIP: 0010:rtw_os_ndev_register+0x64/0x157 [8821ce]
[ 3.249589] rtw_os_ndevs_register+0x9e/0xce [8821ce]
[ 3.249632] rtw_os_ndevs_init+0x24/0x3a [8821ce]
[ 3.249675] rtw_drv_init+0x4f/0xac [8821ce]
[ 3.249722] rtw_drv_entry+0x48/0x1000 [8821ce]
[ 3.258088] WARNING: CPU: 6 PID: 528 at /var/lib/dkms/rtl8821ce/v5.5.2_34066.20200325/build/os_dep/linux/os_intfs.c:3141 rtw_os_ndevs_register+0xa6/0xce [8821ce]
[ 3.258090] Modules linked in: crct10dif_pclmul(+) crc32_pclmul 8821ce(OE+) 88XXau(OE+) crc32c_intel amd_iommu_v2 gpu_sched i2c_algo_bit ttm hid_logitech_hidpp drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops cfg80211 nvme drm ghash_clmulni_intel serio_raw r8169 nvme_core rfkill realtek pinctrl_amd hid_logitech_dj dm_mirror dm_region_hash dm_log dm_mod
[ 3.258154] RIP: 0010:rtw_os_ndevs_register+0xa6/0xce [8821ce]
[ 3.258215] rtw_os_ndevs_init+0x24/0x3a [8821ce]
[ 3.258262] rtw_drv_init+0x4f/0xac [8821ce]
[ 3.258319] rtw_drv_entry+0x48/0x1000 [8821ce]
[ 10.280025] Bluetooth: hci0: rtl: examining hci_ver=08 hci_rev=000c lmp_ver=08 lmp_subver=8821
[ 10.280028] Bluetooth: hci0: rtl: loading rtl_bt/rtl8821c_config.bin
[ 10.283364] Bluetooth: hci0: rtl: loading rtl_bt/rtl8821c_fw.bin
[ 21.489998] dm_crypt amdgpu crct10dif_pclmul crc32_pclmul 8821ce(OE) 88XXau(OE) crc32c_intel amd_iommu_v2 gpu_sched i2c_algo_bit ttm hid_logitech_hidpp drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops cfg80211 nvme drm ghash_clmulni_intel serio_raw r8169 nvme_core rfkill realtek pinctrl_amd hid_logitech_dj dm_mirror dm_region_hash dm_log dm_mod
ifconfig(wlp4s0f3u2 是我的 USB wifi 适配器):
ifconfig -a
eno1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether f8:b4:6a:b5:fb:23 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
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 6454 bytes 443527 (433.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6454 bytes 443527 (433.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:74:aa:45 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
virbr0-nic: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 52:54:00:74:aa:45 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
wlp4s0f3u2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 2312
inet 192.168.2.22 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::e1d3:1071:71d9:6b63 prefixlen 64 scopeid 0x20<link>
.....
我可以使用此命令看到该卡,但我不确定这是否是由于驱动程序造成的:
lshw -C network
*-network UNCLAIMED
description: Network controller
product: RTL8821CE 802.11ac PCIe Wireless Network Adapter
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:02:00.0
version: 00
width: 64 bits
clock: 33MHz
capabilities: cap_list
configuration: latency=0
resources: ioport:f000(size=256) memory:fe900000-fe90ffff
更新 由于我正在尝试不同的驱动程序,因此我将它们列入黑名单 /etc/modprob.d 以确保一次仅加载一个驱动程序,请告诉我这是否足够
我在 rtw88 上提出了一个问题(https://github.com/lwfinger/rtlwifi_new/issues/608),他们确认固件丢失并将其添加到存储库中,但这产生了一个新问题:
[ 12.378158] rtw_8821ce 0000:02:00.0: Firmware version 24.5.0, H2C version 12
[ 12.404834] rtw_8821ce 0000:02:00.0: rfe 2 isn't supported
[ 12.404937] rtw_8821ce 0000:02:00.0: failed to setup chip efuse info
[ 12.404939] rtw_8821ce 0000:02:00.0: failed to setup chip information
更新2 在更新代码库后,lwfinger 通过 rtw88 驱动程序解决了这个问题。驱动程序现在可以按 8821ce 的预期工作了!
答案1
如果您的系统安装了任何冲突的驱动程序,您也必须将它们列入黑名单。这将包括 rtw88_xxxx 等驱动程序。
还可以尝试使用以下存储库中的内核模块。
https://github.com/brektrou/rtl8821CU
只需如下所示编辑 Makefile 即可构建 rtl8821ce 模块
CONFIG_USB_HCI = n
CONFIG_PCI_HCI = y