升级到 Ubuntu 22.04.3LTS 时安装 WiFi 驱动程序时出错

升级到 Ubuntu 22.04.3LTS 时安装 WiFi 驱动程序时出错

我的 HP-ab516tx 笔记本电脑上的 WiFi 与 Ubuntu 18.04 配合得很好。然后我更新到 20.04,我的 WiFi 却无法使用。我的可见网络列表是空的。我在 Github 上找到了现在已删除的 rtlwifi_new 驱动程序,适用于我的 rtl8723be这里。它安装得很好,我的 WiFi 又能用了。当我升级到 22.04 并尝试再次安装它以恢复我的 WiFi 时,我收到一个错误。以下是 的输出make。我该如何修复此错误以及是什么原因造成的?

/home/sns/Downloads/rtlwifi_new/rtl8192cu/hw.c: In function ‘_rtl92cu_init_chipN_one_out_ep_priority’:
/home/sns/Downloads/rtlwifi_new/rtl8192cu/hw.c:617:9: warning: parameter names (without types) in function declaration
  617 |         u16 uninitialized_var(value);
      |         ^~~
/home/sns/Downloads/rtlwifi_new/rtl8192cu/hw.c:621:17: error: ‘value’ undeclared (first use in this function)
  621 |                 value = QUEUE_HIGH;
      |                 ^~~~~
/home/sns/Downloads/rtlwifi_new/rtl8192cu/hw.c:621:17: note: each undeclared identifier is reported only once for each function it appears in
/home/sns/Downloads/rtlwifi_new/rtl8192cu/hw.c: In function ‘_rtl92cu_init_chipN_two_out_ep_priority’:
/home/sns/Downloads/rtlwifi_new/rtl8192cu/hw.c:643:9: warning: parameter names (without types) in function declaration
  643 |         u16 uninitialized_var(valueHi);
      |         ^~~
/home/sns/Downloads/rtlwifi_new/rtl8192cu/hw.c:644:9: warning: parameter names (without types) in function declaration
  644 |         u16 uninitialized_var(valueLow);
      |         ^~~
/home/sns/Downloads/rtlwifi_new/rtl8192cu/hw.c:648:17: error: ‘valueHi’ undeclared (first use in this function)
  648 |                 valueHi = QUEUE_HIGH;
      |                 ^~~~~~~
/home/sns/Downloads/rtlwifi_new/rtl8192cu/hw.c:649:17: error: ‘valueLow’ undeclared (first use in this function)
  649 |                 valueLow = QUEUE_LOW;
      |                 ^~~~~~~~
make[3]: *** [scripts/Makefile.build:297: /home/sns/Downloads/rtlwifi_new/rtl8192cu/hw.o] Error 1
make[2]: *** [scripts/Makefile.build:560: /home/sns/Downloads/rtlwifi_new/rtl8192cu] Error 2
make[1]: *** [Makefile:1909: /home/sns/Downloads/rtlwifi_new] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-79-generic'
make: *** [Makefile:85: all] Error 2

这是lspci输出。

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers (rev 08)
00:02.0 VGA compatible controller: Intel Corporation Skylake GT2 [HD Graphics 520] (rev 07)
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 08)
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)
00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 (rev f1)
00:1c.4 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 (rev f1)
00:1c.5 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #6 (rev f1)
00:1d.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-LP LPC Controller (rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
01:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 940M] (rev a2)
02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader (rev 01)
03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet controller (rev 0a)

结果lspci -nnk -d ::0280

03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]
    DeviceName: Realtek RTL8723BE 802.11b/g/n 1x1Wi-Fi + BT4.0 Combo Adapter
    Subsystem: Hewlett-Packard Company RTL8723BE PCIe Wireless Network Adapter [103c:804c]
    Kernel driver in use: rtl8723be
    Kernel modules: rtl8723be

答案1

您的无线信息报告中有几项令人担忧。首先,模块参数有两个相互竞争且可能不必要的声明。我建议将它们全部删除。

sudo rm /etc/modprobe.d/50-rtl8723be.conf
sudo rm /etc/modprobe.d/rtl8723be.conf

接下来,netplan 设置不正确。

sudo nano /etc/netplan/01-network-manager-all.yaml

添加以下行:

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

Netplan 对间距和缩进非常严格,因此请仔细校对两遍。保存(Ctrl+o 后按 Enter)并退出(Ctrl+x)文本编辑器。然后执行以下操作:

sudo netplan generate
sudo netplan apply

resolv.conf 设置不正确。

sudo rm /etc/resolv.conf
sudo ln -s /run/systemd/resolve/stub-resolv.conf  /etc/resolv.conf

您没有 8192eu 设备,因此让我们删除它的声明:

sudo nano /etc/modules

删除 8192eu 行。按上述方法保存并退出 nano。

重新启动,断开 USB 以太网,看看网络管理器是否接管无线。无论如何,让我们看看:

sudo dmesg | grep rtl

编辑:您可能需要驱动程序参数。请执行以下操作:

sudo modprobe -r rtl8723be
sudo modprobe rtl8723be ant_sel=1

有改善吗?如果没有,请用 重试该序列ant_sel=2。告诉我们哪些方法可以改善信号强度,我们将写入一个文件以使其持久。

相关内容