赞
踩
在openSUSE-Leap-15.6-DVD-x86_64下停用USB无线网卡驱动rtw88_8822bu改用rtl88x2bu
一、openSUSE-Leap-15.6-DVD-x86_64自带USB无线网卡驱动rtw88_8822bu能够正常上网但不能让USB无线网卡内置小灯闪蓝光
当有数据流量通过USB无线网卡,其内置小灯会不断闪蓝光的,如今是既不亮也不闪,让人看不到其是否正常工作状态
PC-20160104YPJX:~ # lsmod |grep 88
rtw88_8822bu 12288 0
rtw88_usb 28672 1 rtw88_8822bu
rtw88_8822b 229376 1 rtw88_8822bu
rtw88_core 249856 2 rtw88_usb,rtw88_8822b
mac80211 1531904 2 rtw88_core,rtw88_usb
libarc4 12288 1 mac80211
cfg80211 1277952 2 rtw88_core,mac80211
PC-20160104YPJX:~ # modinfo rtw88_8822bu | head
filename: /lib/modules/6.4.0-150600.21-default/kernel/drivers/net/wireless/realtek/rtw88/rtw88_8822bu.ko.zst
license: Dual BSD/GPL
description: Realtek 802.11ac wireless 8822bu driver
author: Realtek Corporation
suserelease: SLE15-SP6
srcversion: E5B4AC9AA51AB1AD8FB5FFF
alias: usb:v20F4p808AddcdscdpicFFiscFFipFFin*
alias: usb:v04CAp8602ddcdscdpicFFiscFFipFFin*
alias: usb:v0E66p0025ddcdscdpicFFiscFFipFFin*
alias: usb:v0846p9055ddcdscdpicFFiscFFipFFin*
filename: /lib/modules/6.4.0-150600.21-default/kernel/drivers/net/wireless/realtek/rtw88/rtw88_8822bu.ko.zst
filename: /lib/modules/6.4.0-150600.21-default/kernel/drivers/net/wireless/realtek/rtw88/rtw88_usb.ko.zst
filename: /lib/modules/6.4.0-150600.21-default/kernel/drivers/net/wireless/realtek/rtw88/rtw88_8822b.ko.zst
filename: /lib/modules/6.4.0-150600.21-default/kernel/drivers/net/wireless/realtek/rtw88/rtw88_core.ko.zst
二、在opensuse15.5可用的88x2bu-20210702-main.zip却在opensuse15.6编译报错
之前在opensuse15.5编译88x2bu-20210702-main.zip是出现与下面一模一样的报错也能通过并产出88x2bu.ko,但在opensuse15.6就停止了
https://github.com/morrownr/88x2bu
https://github.com/morrownr/88x2bu-20210702
从88x2bu-20210702-main.zip的README.md文件得知这个88x2bu.ko版本是5.13.1
…
CC [M] /root/88x2bu-20210702-main/os_dep/linux/usb_intf.o
CC [M] /root/88x2bu-20210702-main/os_dep/linux/usb_ops_linux.o
CC [M] /root/88x2bu-20210702-main/os_dep/linux/ioctl_linux.o
CC [M] /root/88x2bu-20210702-main/os_dep/linux/xmit_linux.o
CC [M] /root/88x2bu-20210702-main/os_dep/linux/mlme_linux.o
CC [M] /root/88x2bu-20210702-main/os_dep/linux/recv_linux.o
CC [M] /root/88x2bu-20210702-main/os_dep/linux/ioctl_cfg80211.o
/root/88x2bu-20210702-main/os_dep/linux/ioctl_cfg80211.c:10536:15: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.tdls_mgmt = cfg80211_rtw_tdls_mgmt,
^~~~~~~~~~~~~~~~~~~~~~
/root/88x2bu-20210702-main/os_dep/linux/ioctl_cfg80211.c:10536:15: note: (near initialization for ‘rtw_cfg80211_ops.tdls_mgmt’)
cc1: some warnings being treated as errors
make[2]: *** [/usr/src/linux-6.4.0-150600.21/scripts/Makefile.build:252: /root/88x2bu-20210702-main/os_dep/linux/ioctl_cfg80211.o] Error 1
make[1]: *** […/…/…/linux-6.4.0-150600.21/Makefile:2066: /root/88x2bu-20210702-main] Error 2
make[1]: Leaving directory ‘/usr/src/linux-6.4.0-150600.21-obj/x86_64/default’
make: *** [Makefile:2514: modules] Error 2
localhost:~/88x2bu-20210702-main #
三、使用cilynx的rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777.zip能在opensuse15.6编译成功
到网站https://github.com/cilynx/rtl88x2bu下载rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777.zip,大小为4.3MB
在网页中间单击绿色Code——Download ZIP——保存
PC-20160104YPJX:~ # ls -lh /home/ruhong/download/
total 4.3M
-rw-r–r-- 1 ruhong users 4.3M Jul 10 10:44 rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777.zip
PC-20160104YPJX:~ # unzip /home/ruhong/download/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777.zip -d /root/
PC-20160104YPJX:~ # cd rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777/
PC-20160104YPJX:~/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777 # zypper install bc make gcc kernel-source dkms
PC-20160104YPJX:~/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777 # make
…
CC [M] /root/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777/hal/phydm/rtl8822b/halhwimg8822b_mac.o
CC [M] /root/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777/hal/phydm/halrf/rtl8822b/halrf_8822b.o
CC [M] /root/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777/hal/phydm/rtl8822b/phydm_hal_api8822b.o
CC [M] /root/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777/hal/phydm/halrf/rtl8822b/halhwimg8822b_rf.o
CC [M] /root/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777/hal/phydm/halrf/rtl8822b/halrf_iqk_8822b.o
CC [M] /root/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777/hal/phydm/halrf/rtl8822b/halrf_rfk_init_8822b.o
CC [M] /root/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777/hal/phydm/rtl8822b/phydm_regconfig8822b.o
CC [M] /root/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777/hal/phydm/rtl8822b/phydm_rtl8822b.o
CC [M] /root/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777/hal/phydm/txbf/haltxbf8822b.o
CC [M] /root/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777/hal/btc/halbtc8822bwifionly.o
CC [M] /root/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777/hal/btc/halbtc8822b1ant.o
CC [M] /root/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777/hal/btc/halbtc8822b2ant.o
CC [M] /root/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777/platform/platform_ops.o
CC [M] /root/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777/core/rtw_mp.o
LD [M] /root/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777/88x2bu.o
MODPOST /root/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777/Module.symvers
CC [M] /root/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777/88x2bu.mod.o
LD [M] /root/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777/88x2bu.ko
BTF [M] /root/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777/88x2bu.ko
Skipping BTF generation for /root/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777/88x2bu.ko due to unavailability of vmlinux
make[1]: Leaving directory ‘/usr/src/linux-6.4.0-150600.21-obj/x86_64/default’
PC-20160104YPJX:~/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777 #
localhost:~/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777 # make install
install -p -m 644 88x2bu.ko /lib/modules/6.4.0-150600.21-default/kernel/drivers/net/wireless/
/sbin/depmod -a 6.4.0-150600.21-default
localhost:~/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777 #
四、停用rtw88_8822bu试用rtl88x2bu
将rtw88_8822bu加入黑名单就可停用了
localhost:~/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777 # echo “blacklist rtw88_8822bu” | sudo tee /etc/modprobe.d/rtw8822bu.conf^C
localhost:~/rtl88x2bu-5.8.7.1_35809.20191129_COEX20191120-7777 # cat /etc/modprobe.d/rtw8822bu.conf
blacklist rtw88_8822bu
重启电脑后,会自动启用88x2bu.ko,USB无线网卡内置小灯也会不断闪蓝光
PC-20160104YPJX:~ # lsmod |grep 88
…
88x2bu 3239936 0
cfg80211 1277952 1 88x2bu
…
PC-20160104YPJX:~ # modinfo 88x2bu | head
filename: /lib/modules/6.4.0-150600.21-default/kernel/drivers/net/wireless/88x2bu.ko
version: v5.8.7.1_35809.20191129_COEX20191120-7777
author: Realtek Semiconductor Corp.
description: Realtek Wireless Lan Driver
license: GPL
suserelease: SLE15-SP6
srcversion: 08B63D7DBAE31918D4215D5
alias: usb:v13B1p0045ddcdscdpicFFiscFFipFFin*
alias: usb:v20F4p808AddcdscdpicFFiscFFipFFin*
alias: usb:v7392pC822ddcdscdpicFFiscFFipFFin*
在网站https://github.com/cilynx/rtl88x2bu其作者有详细讲述如何将rtw88_8822bu加入黑名单,将翻译结果粘贴到本文,略读一下能有很好的理解
Linux 5.18+ and RTW88 DriverLinux 5.18+和RTW88驱动程序
Starting from Linux 5.18, some distributions have added experimental RTW88 USB support (include RTW88x2BU support). It is not yet stable but if it works well on your system, then you no longer need this driver. But if it doesn’t work or is unstable, you need to manually blacklist it because it has a higher loading priority than this external drivers.
从Linux 5.18开始,一些发行版添加了实验性的RTW88 USB支持(包括RTW88x2BU支持)。它还不稳定,但如果它在你的系统上运行良好,那么你就不再需要这个驱动程序了。但如果它不工作或不稳定,您需要手动将其列入黑名单,因为它的加载优先级高于此外部驱动程序。
Check the currently loaded module using lsmod. If you see rtw88_core, rtw88_usb, or any name beginning with rtw88_ then you are using the RTW88 driver. If you see 88x2bu then you are using this RTW88x2BU driver.
使用lsmod检查当前加载的模块。如果您看到rtw88_core、rtw88_usb或任何以rtw88_开头的名称,则您正在使用rtw88驱动程序。如果您看到88x2bu,那么您正在使用此RTW88x2BU驱动程序。
To blacklist RTW88 8822bu USB driver, run the following command. It will replace the existing .conf file with the echoed content.
要将RTW88 8822bu USB驱动程序列入黑名单,请运行以下命令。它将用回显的内容替换现有的.conf文件。
echo “blacklist rtw88_8822bu” | sudo tee /etc/modprobe.d/rtw8822bu.conf
Then reboot your system.
然后重新启动系统。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。