我是 Ubuntu 新手,当我尝试为我的 Wi-Fi 适配器(TP-WN823N)安装新的驱动程序时,因为我的 Ubuntu 上的互联网速度比使用 Windows 慢得多(我的下载速度只有以前的三分之一到二分之一)。
我按照随附的说明的步骤进行操作,这些说明来自 2018 年,因此使用另一个操作系统版本 (16.04,我有 18.04) 内核 (4.13.0-36-generic 与 5.3.0-46-generic) 和 gcc (5.4.0 与 7.5.0),而不是我目前安装的。我认为这就是它无法执行的原因make
。
使用make
创建此文本:
je@924NDA:~/Dokumente$ make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.3.0-46-generic/build M=/home/je/Dokumente modules
make[1]: Verzeichnis „/usr/src/linux-headers-5.3.0-46-generic“ wird betreten
CC [M] /home/je/Dokumente/core/rtw_cmd.o
In file included from /home/je/Dokumente/include/osdep_service.h:47:0,
from /home/je/Dokumente/include/drv_types.h:27,
from /home/je/Dokumente/core/rtw_cmd.c:17:
/home/je/Dokumente/include/osdep_service_linux.h: In function ‘_init_timer’:
/home/je/Dokumente/include/osdep_service_linux.h:299:8: error: ‘_timer {aka struct timer_list}’ has no member named ‘data’
ptimer->data = (unsigned long)cntx;
^~
/home/je/Dokumente/include/osdep_service_linux.h:300:2: error: implicit declaration of function ‘init_timer’; did you mean ‘_init_timer’? [-Werror=implicit-function-declaration]
init_timer(ptimer);
^~~~~~~~~~
_init_timer
In file included from /home/je/Dokumente/include/drv_types.h:30:0,
from /home/je/Dokumente/core/rtw_cmd.c:17:
/home/je/Dokumente/include/wifi.h: At top level:
/home/je/Dokumente/include/wifi.h:1031:0: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40
In file included from /home/je/Dokumente/include/osdep_service_linux.h:83:0,
from /home/je/Dokumente/include/osdep_service.h:47,
from /home/je/Dokumente/include/drv_types.h:27,
from /home/je/Dokumente/core/rtw_cmd.c:17:
./include/linux/ieee80211.h:1441:0: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100
cc1: some warnings being treated as errors
scripts/Makefile.build:288: recipe for target '/home/je/Dokumente/core/rtw_cmd.o' failed
make[2]: *** [/home/je/Dokumente/core/rtw_cmd.o] Error 1
Makefile:1655: recipe for target '_module_/home/je/Dokumente' failed
make[1]: *** [_module_/home/je/Dokumente] Error 2
make[1]: Verzeichnis „/usr/src/linux-headers-5.3.0-46-generic“ wird verlassen
Makefile:1828: recipe for target 'modules' failed
make: *** [modules] Error 2
je@924NDA:~/Dokumente$ make clean
#make -C /lib/modules/5.3.0-46-generic/build M=/home/je/Dokumente clean
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 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
lsusb
输出:
je@924NDA:~$ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 2357:0109
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 046d:c07d Logitech, Inc.
Bus 001 Device 005: ID 1532:0227 Razer USA, Ltd
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
有什么方法可以解决这个问题,比如尝试使用说明中使用的内核和 gcc 版本或相应地更改代码?
答案1
您的无线设备的 usb.id 为 2357:0109,但奇怪的是,没有任何描述,它被驱动程序 8192eu 覆盖。通过以太网、网络共享或任何可能的方式建立有效的互联网连接,打开终端并执行以下操作:
sudo apt update
sudo apt install git dkms build-essential
git clone https://github.com/Mange/rtl8192eu-linux-driver.git
sudo dkms add ./rtl8192eu-linux-driver
sudo dkms install rtl8192eu/1.0
sudo modprobe 8192eu
你的无线网络现在应该可以正常工作了。