Realtek RTL8811AU WiFi 适配器在 XUbuntu 上工作

Realtek RTL8811AU WiFi 适配器在 XUbuntu 上工作

我正在设置一台运行 XUbuntu 的电脑,到目前为止一切进展顺利。不过,我在使用 wifi 时遇到问题。

最初,我尝试使用现有的 Netgear A6200,但被告知基本上不存在驱动程序,我必须使用 Windows 驱动程序 - 我不喜欢这种驱动程序,所以我购买了其中之一:

https://www.amazon.co.uk/gp/product/B06XZ1DBPZ/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1

其中将 Linux 列为受支持的操作系统。

我没有太多运气让它发挥作用。我希望我能将其插入并神奇地获得驱动程序,但没有这样的运气。

芯片组显然是realtek RTL8811AU(我通过将其插入我的 Windows PC 得到的)。

我找到了这个帖子: https://ubuntuforums.org/showthread.php?t=2306417

但 make 失败* - 我也不喜欢每次 linux 更新时都必须重新执行此操作的想法......

我查看了加密狗附带的驱动程序,其中有一个install.sh用于编译和安装驱动程序(我认为这与上面帖子中引用的 github 存储库做了类似的事情)。此安装脚本也失败**...

光盘上还包含源代码的 tar...

我真的希望有一些 apt-get 命令来执行此操作,以便在新更新出现时跟踪和更新驱动程序。

如果我让 make 工作,我真的每次得到更新时都必须重新做吗?

对此感到有点生气,到目前为止一切都进展顺利!谢谢

* make failure output

    andy@Andy-Miner:~/git/rtl8811AU_rtl8821A-linux$ make
    make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.10.0-33-generic/build M=/home/andy/git/rtl8811AU_rtl8821A-linux  modules
    make[1]: Entering directory '/usr/src/linux-headers-4.10.0-33-generic'
      CC [M]  /home/andy/git/rtl8811AU_rtl8821A-linux/core/rtw_cmd.o
      CC [M]  /home/andy/git/rtl8811AU_rtl8821A-linux/core/rtw_security.o
      CC [M]  /home/andy/git/rtl8811AU_rtl8821A-linux/core/rtw_debug.o
    In file included from /home/andy/git/rtl8811AU_rtl8821A-linux/include/drv_types.h:64:0,
                     from /home/andy/git/rtl8811AU_rtl8821A-linux/core/rtw_debug.c:22:
    /home/andy/git/rtl8811AU_rtl8821A-linux/core/rtw_debug.c: In function ‘dump_drv_version’:
    /home/andy/git/rtl8811AU_rtl8821A-linux/include/rtw_debug.h:187:19: error: void value not ignored as it ought to be
      #define _seqdump seq_printf
                       ^
    /home/andy/git/rtl8811AU_rtl8821A-linux/include/rtw_debug.h:240:7: note: in expansion of macro ‘_seqdump’
        if(_seqdump(sel, fmt, ##arg)) /*rtw_warn_on(1)*/; \
           ^
    /home/andy/git/rtl8811AU_rtl8821A-linux/core/rtw_debug.c:65:2: note: in expansion of macro ‘DBG_871X_SEL_NL’
      DBG_871X_SEL_NL(sel, "%s %s\n", DRV_NAME, DRIVERVERSION);
      ^
    /home/andy/git/rtl8811AU_rtl8821A-linux/core/rtw_debug.c:66:64: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
      DBG_871X_SEL_NL(sel, "build time: %s %s\n", __DATE__, __TIME__);
                                                                    ^
    //snip LOADS of errors

    /home/andy/git/rtl8811AU_rtl8821A-linux/include/rtw_debug.h:240:7: note: in expansion of macro ‘_seqdump’
        if(_seqdump(sel, fmt, ##arg)) /*rtw_warn_on(1)*/; \
           ^
    /home/andy/git/rtl8811AU_rtl8821A-linux/core/rtw_debug.c:1221:2: note: in expansion of macro ‘DBG_871X_SEL_NL’
      DBG_871X_SEL_NL(m, "best_channel_24G = %d\n", best_channel_24G);
      ^
    cc1: some warnings being treated as errors
    scripts/Makefile.build:294: recipe for target '/home/andy/git/rtl8811AU_rtl8821A-linux/core/rtw_debug.o' failed
    make[2]: *** [/home/andy/git/rtl8811AU_rtl8821A-linux/core/rtw_debug.o] Error 1
    Makefile:1524: recipe for target '_module_/home/andy/git/rtl8811AU_rtl8821A-linux' failed
    make[1]: *** [_module_/home/andy/git/rtl8811AU_rtl8821A-linux] Error 2
    make[1]: Leaving directory '/usr/src/linux-headers-4.10.0-33-generic'
    Makefile:1323: recipe for target 'modules' failed
    make: *** [modules] Error 2
    andy@Andy-Miner:~/git/rtl8811AU_rtl8821A-linux$

** 从包含的驱动程序安装脚本输出:

andy@Andy-Miner:~/Downloads/wifi dongle$ sudo ./install.sh
##################################################
Realtek Wi-Fi driver Auto installation script
Novembor, 21 2011 v1.1.0
##################################################
Decompress the driver source tar ball:
        rtl8821AU_linux_v4.3.14_13455.20150212_BTCOEX20150128-51.tar.gz
rtl8821AU_linux_v4.3.14_13455.20150212_BTCOEX20150128-51/
rtl8821AU_linux_v4.3.14_13455.20150212_BTCOEX20150128-51/core/

//snip - loads of files listed

rtl8821AU_linux_v4.3.14_13455.20150212_BTCOEX20150128-51
Authentication requested [root] for make clean:
cd hal/OUTSRC/ ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko
cd hal/OUTSRC/ ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd hal/led ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd hal ; rm -fr */*/*.mod.c */*/*.mod */*/*.o */*/.*.cmd */*/*.ko
cd hal ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko
cd hal ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd core/efuse ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd core ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd os_dep/linux ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd os_dep ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd platform ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
rm -fr Module.symvers ; rm -fr Module.markers ; rm -fr modules.order
rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
rm -fr .tmp_versions
Authentication requested [root] for make driver:
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.10.0-33-generic/build M=/home/andy/Downloads/wifi dongle/driver/rtl8821AU_linux_v4.3.14_13455.20150212_BTCOEX20150128-51  modules
make[1]: Entering directory '/usr/src/linux-headers-4.10.0-33-generic'
arch/x86/Makefile:140: CONFIG_X86_X32 enabled but no binutils support
make[1]: *** No rule to make target 'dongle/driver/rtl8821AU_linux_v4.3.14_13455.20150212_BTCOEX20150128-51'. Stop.
make[1]: Leaving directory '/usr/src/linux-headers-4.10.0-33-generic'
Makefile:1551: recipe for target 'modules' failed
make: *** [modules] Error 2
##################################################
Compile make driver error: 2
Please check error Mesg
##################################################

答案1

要使 wifi 正常工作,您应该安装rtl8812au-dkms来自官方 Ubuntu 存储库。

sudo apt-get install rtl8812au-dkms
sudo modprobe 8812au

dkms或者通过使用from构建驱动程序迪德里克德哈斯/rtl8812AUgit repo (添加了对内核版本 >= 4.7 的支持) ,以 root 身份运行:

apt install dkms
git clone https://github.com/diederikdehaas/rtl8812AU.git
cd rtl8812AU
DRV_NAME=rtl8812AU
DRV_VERSION=4.3.14
mkdir /usr/src/${DRV_NAME}-${DRV_VERSION}
git archive driver-${DRV_VERSION} | tar -x -C /usr/src/${DRV_NAME}-${DRV_VERSION}
dkms add -m ${DRV_NAME} -v ${DRV_VERSION}
dkms build -m ${DRV_NAME} -v ${DRV_VERSION}
dkms install -m ${DRV_NAME} -v ${DRV_VERSION}
modprobe -v 8812au

相关内容