如何解决 Ubuntu 20.04 上的 Wifi 驱动程序问题

如何解决 Ubuntu 20.04 上的 Wifi 驱动程序问题

我在 ubuntu 20.04 版本中安装无线驱动程序时遇到问题,并且也遇到了与(Ubuntu 18.04)相同的问题。

我经历过rtl8822be wifi 驱动程序 ubuntu 20.04 hp 15-da1009ne

以下是我正在遵循的步骤:

git clone https://github.com/lwfinger/rtlwifi_new.git
cd rtlwifi_new
git checkout extended
sudo make install
sudo modprobe -r rtl8723de
sudo modprobe rtl8723de

但是在执行时sudo make install,出现了这个错误:

make -C /lib/modules/5.4.0-28-generic/build M=/home/username/rtlwifi_new modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-28-generic'
  CC [M]  /home/username/rtlwifi_new/rc.o
/home/username/rtlwifi_new/rc.c:336:11: error: initialization of ‘void * (*)(struct ieee80211_hw *, struct dentry *)’ from incompatible pointer type ‘void * (*)(struct ieee80211_hw *)’ [-Werror=incompatible-pointer-types]
  336 |  .alloc = rtl_rate_alloc,
      |           ^~~~~~~~~~~~~~
/home/username/rtlwifi_new/rc.c:336:11: note: (near initialization for ‘rtl_rate_ops.alloc’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:275: /home/username/rtlwifi_new/rc.o] Error 1
make[1]: *** [Makefile:1719: /home/username/rtlwifi_new] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-28-generic'
make: *** [Makefile:85: all] Error 2

输出lspci -knn | grep Net -A3; rfkill list

08:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM43142 802.11b/g/n [14e4:4365] (rev 01)
    DeviceName: Broadcom BCM43142 802.11bgn 1x1 WiFi Adapter + BT 4.0 combo adapter
    Subsystem: Hewlett-Packard Company BCM43142 802.11b/g/n [103c:2230]
    Kernel driver in use: wl
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: brcmwl-0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no

答案1

在较新的内核中,该源存在问题,因此请使用此源

sudo apt install dkms
cd
git clone https://github.com/smlinux/rtl8723de.git
sudo dkms add ./rtl8723de
sudo dkms install rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414
检查mokutil --sb-state安全启动是否需要禁用 重新启动

答案2

以下命令可完美运行 Broadcom BCM43142 在 ubuntu 20.04 上运行。您需要执行每个命令。

sudo apt-get purge bcmwl-kernel-source
sudo apt-get install broadcom-sta-source
sudo apt-get install broadcom-sta-dkms
sudo apt-get install broadcom-sta-common

相关内容