Ubuntu 20.04.3 LTS 无法使用之前回答的问题为“tp-link AC1300”USB WiFi 适配器编译驱动程序

Ubuntu 20.04.3 LTS 无法使用之前回答的问题为“tp-link AC1300”USB WiFi 适配器编译驱动程序

之前有类似的问题:Ubuntu 未检测到 Wifi 适配器

使用终端指令来回答编译驱动程序。

我按照这些说明 [粘贴在该问题底部] 进行操作,一切似乎都很顺利,直到我执行“make”指令,然后从终端获得以下输出。


   
 make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.11.0-27-generic/build M=/home/arch/Downloads/linux-wifi-88x2bu-driver  modules
make[1]: Entering directory '/usr/src/linux-headers-5.11.0-27-generic'
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_cmd.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_security.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_debug.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_io.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_ioctl_query.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_ioctl_set.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_ieee80211.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_mlme.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_mlme_ext.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_mi.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_wlan_util.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_vht.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_pwrctrl.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_rf.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_recv.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_sta_mgt.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_ap.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/mesh/rtw_mesh.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/mesh/rtw_mesh_pathtbl.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/mesh/rtw_mesh_hwmp.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_xmit.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_p2p.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_rson.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_tdls.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_br_ext.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_iol.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_sreset.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_btcoex_wifionly.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_btcoex.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_beamforming.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_odm.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_rm.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/rtw_rm_fsm.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/core/efuse/rtw_efuse.o
  CC [M]  /home/arch/Downloads/linux-wifi-88x2bu-driver/os_dep/osdep_service.o
/home/arch/Downloads/linux-wifi-88x2bu-driver/os_dep/osdep_service.c: In function ‘isFileReadable’:
/home/arch/Downloads/linux-wifi-88x2bu-driver/os_dep/osdep_service.c:2189:11: error: implicit declaration of function ‘get_fs’; did you mean ‘get_sa’? [-Werror=implicit-function-declaration]
 2189 |   oldfs = get_fs();
      |           ^~~~~~
      |           get_sa
/home/arch/Downloads/linux-wifi-88x2bu-driver/os_dep/osdep_service.c:2189:11: error: incompatible types when assigning to type ‘mm_segment_t’ {aka ‘struct <anonymous>’} from type ‘int’
/home/arch/Downloads/linux-wifi-88x2bu-driver/os_dep/osdep_service.c:2190:3: error: implicit declaration of function ‘set_fs’; did you mean ‘sget_fc’? [-Werror=implicit-function-declaration]
 2190 |   set_fs(KERNEL_DS);
      |   ^~~~~~
      |   sget_fc
/home/arch/Downloads/linux-wifi-88x2bu-driver/os_dep/osdep_service.c:2190:10: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNFS_NS’?
 2190 |   set_fs(KERNEL_DS);
      |          ^~~~~~~~~
      |          KERNFS_NS
/home/arch/Downloads/linux-wifi-88x2bu-driver/os_dep/osdep_service.c:2190:10: note: each undeclared identifier is reported only once for each function it appears in
/home/arch/Downloads/linux-wifi-88x2bu-driver/os_dep/osdep_service.c: In function ‘retriveFromFile’:
/home/arch/Downloads/linux-wifi-88x2bu-driver/os_dep/osdep_service.c:2227:12: error: incompatible types when assigning to type ‘mm_segment_t’ {aka ‘struct <anonymous>’} from type ‘int’
 2227 |    oldfs = get_fs();
      |            ^~~~~~
/home/arch/Downloads/linux-wifi-88x2bu-driver/os_dep/osdep_service.c:2228:11: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNFS_NS’?
 2228 |    set_fs(KERNEL_DS);
      |           ^~~~~~~~~
      |           KERNFS_NS
/home/arch/Downloads/linux-wifi-88x2bu-driver/os_dep/osdep_service.c: In function ‘storeToFile’:
/home/arch/Downloads/linux-wifi-88x2bu-driver/os_dep/osdep_service.c:2262:12: error: incompatible types when assigning to type ‘mm_segment_t’ {aka ‘struct <anonymous>’} from type ‘int’
 2262 |    oldfs = get_fs();
      |            ^~~~~~
/home/arch/Downloads/linux-wifi-88x2bu-driver/os_dep/osdep_service.c:2263:11: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNFS_NS’?
 2263 |    set_fs(KERNEL_DS);
      |           ^~~~~~~~~
      |           KERNFS_NS
cc1: all warnings being treated as errors
make[2]: *** [scripts/Makefile.build:287: /home/arch/Downloads/linux-wifi-88x2bu-driver/os_dep/osdep_service.o] Error 1
make[1]: *** [Makefile:1848: /home/arch/Downloads/linux-wifi-88x2bu-driver] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.11.0-27-generic'
make: *** [Makefile:1999: modules] Error 2
arch@bird:~/Downloads/linux-wifi-88x2bu-driver$ 

更多信息...我的电脑是“华硕 TUF Gaming A15 TUF506QE-MS74 15.6 英寸笔记本电脑白金系列”

Ubuntu 20.04.3 LTS 无法识别蓝牙或 WiFi。(大约 2 周前安装)

现在,蓝牙可以使用我身边的一个旧 USB 加密狗来工作。

安装 Ubuntu 很困难。我接受了蓝牙和 WiFi 消失的事实,认为这些问题可以在未来的更新中得到解决。你知道吗?

使用替代驱动程序来替代导致我的电脑死机的 Nvidea 驱动程序。正在使用以下驱动程序:“使用 X.org X 服务器 - 来自 Xserver-xorg-video-nouveau 的 Nouveau 显示驱动程序(开源)”

我得出的答案是:

这个特殊的 WiFi 设备使用 Archer T4U 芯片组,需要特殊的驱动程序才能运行。这需要从您机器上的源代码进行编译。幸运的是,这并不太难。方法如下:

  1. 打开终端(如果尚未打开)

  2. 安装一些先决条件:

    $ sudo apt install git linux-headers-generic build-essential
    
  3. 将 Git 存储库克隆到您的下载目录(或任何其他目录,但对于本例来说,下载就可以):

    $ cd ~/Downloads
    $ git clone https://github.com/nyetwurk/linux-wifi-88x2bu-driver
    
  4. 编译并安装驱动程序:

    $ cd linux-wifi-88x2bu-driver
    $ make
    $ sudo make install
    $ sudo modprobe 88x2bu
    

此时 Ubuntu 应该会识别 WiFi 设备并让您连接到网络。如果没有,可能需要重新启动。

希望这可以帮助。

答案1

看起来这个存储库有点旧了。我能够重现你在编译时遇到的问题,并尝试对其进行修补/更新,但我发现了一个似乎仍在维护的较新的存储库:

git clone 'https://github.com/morrownr/88x2bu'
cd 88x2bu
make -j $(nproc)

-j $(nproc)部分只是通过使用多个进程来加速编译。如果它给您带来任何麻烦(例如nproc不知何故不存在),只需编译make它就可以了。

您还可以参考该 GitHub 页面上的说明: https://github.com/morrownr/88x2bu

您可能只想install-driver.sh以 root 身份运行其脚本。

相关内容