2

I've been trying to install a driver for my TL-WN881ND network card on Ubuntu 18.04.2 to connect to the internet with it, and I keep crashing into errors. Here's what I get when I type make:

"NO KSRC,we will use default KSRC"
"******************************************"
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.18.0-15-generic/build M=/home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK  modules
make[1]: Entering directory '/usr/src/linux-headers-4.18.0-15-generic'
Makefile:970: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
"******************************************"
"NO KSRC,we will use default KSRC"
"******************************************"
  CC [M]  /home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/core/rtw_cmd.o
In file included from /home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/include/osdep_service.h:41:0,
                 from /home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/include/drv_types.h:32,
                 from /home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/core/rtw_cmd.c:22:
/home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/include/osdep_service_linux.h: In function ‘_init_timer’:
/home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/include/osdep_service_linux.h:267:8: error: ‘_timer {aka struct timer_list}’ has no member named ‘data’
  ptimer->data = (unsigned long)cntx;
        ^~
/home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/include/osdep_service_linux.h:268: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/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/include/drv_types.h:32:0,
                 from /home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/core/rtw_cmd.c:22:
/home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/include/osdep_service.h: In function ‘thread_enter’:
/home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/include/osdep_service.h:343:2: error: implicit declaration of function ‘allow_signal’; did you mean ‘do_signal’? [-Werror=implicit-function-declaration]
  allow_signal(SIGTERM);
  ^~~~~~~~~~~~
  do_signal
/home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/include/osdep_service.h: In function ‘flush_signals_thread’:
/home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/include/osdep_service.h:353:6: error: implicit declaration of function ‘signal_pending’; did you mean ‘timer_pending’? [-Werror=implicit-function-declaration]
  if (signal_pending (current))
      ^~~~~~~~~~~~~~
      timer_pending
/home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/include/osdep_service.h:355:3: error: implicit declaration of function ‘flush_signals’; did you mean ‘do_signal’? [-Werror=implicit-function-declaration]
   flush_signals(current);
   ^~~~~~~~~~~~~
   do_signal
In file included from /home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/include/drv_types.h:95:0,
                 from /home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/core/rtw_cmd.c:22:
/home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/include/hal_com.h: At top level:
/home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/include/hal_com.h:413:13: error: ‘file_path’ redeclared as different kind of symbol
 extern char file_path[PATH_LENGTH_MAX];
             ^~~~~~~~~
In file included from ./include/linux/compat.h:17:0,
                 from ./include/linux/ethtool.h:17,
                 from ./include/linux/netdevice.h:41,
                 from /home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/include/osdep_service_linux.h:35,
                 from /home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/include/osdep_service.h:41,
                 from /home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/include/drv_types.h:32,
                 from /home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/core/rtw_cmd.c:22:
./include/linux/fs.h:2884:14: note: previous declaration of ‘file_path’ was here
 extern char *file_path(struct file *, char *, int);
              ^~~~~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:325: recipe for target '/home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/core/rtw_cmd.o' failed
make[2]: *** [/home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK/core/rtw_cmd.o] Error 1
Makefile:1534: recipe for target '_module_/home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK' failed
make[1]: *** [_module_/home/cobradabest/rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.18.0-15-generic'
Makefile:1696: recipe for target 'modules' failed
make: *** [modules] Error 2

and here's what I get when I typr make install

"NO KSRC,we will use default KSRC"
"******************************************"
install -p -m 644 8192ee.ko  /lib/modules/4.18.0-15-generic/kernel/drivers/net/wireless/
install: cannot stat '8192ee.ko': No such file or directory
Makefile:1702: recipe for target 'install' failed
make: *** [install] Error 1

What do I do?

2 Answers2

1

Please do:

sudo apt update && sudo apt install git
git clone https://github.com/lwfinger/rtlwifi_new.git
cd rtlwifi_new
make
sudo make install
sudo modprobe rtl8188ee

After each kernel update, you must recompile:

cd rtlwifi_new
make clean
git pull
make
sudo make install
sudo modprobe rtl8188ee
chili555
  • 60,188
  • Okay, I've done that, but it still isn't connecting. I'm still getting the same errors when I use make or make install in the parent directory. What do I do now? – Cobradabest Jun 10 '19 at 21:28
  • Please install libelf-dev and try again. Is that the error you refer to? Please show us here: http://paste.ubuntu.com and give us the link. – chili555 Jun 10 '19 at 21:38
  • That didn't fix the issue. The errors I'm getting are the same as the one in the original question. – Cobradabest Jun 11 '19 at 15:00
  • Please show us: http://paste.ubuntu.com and give us the link. – chili555 Jun 11 '19 at 15:12
  • Here:

    https://paste.ubuntu.com/p/MRcyzJ3zNH/

    https://paste.ubuntu.com/p/cfmc8mccpB/

    – Cobradabest Jun 11 '19 at 15:58
  • We see very clearly that you are still trying to compile rtl8192EE_linux_v4.3.15.1_19180_BTCOEX20150615-0041.20160824_OK and not rtlwifi_new as I recommended. Please try the procedure exactly as I outlined in my answer. – chili555 Jun 11 '19 at 16:34
  • I did that beforehand and got no errors, but I'm still not connected. Is there something I'm missing? – Cobradabest Jun 11 '19 at 17:40
  • Please let us have a paste of: lspci -nnk | grep 0280 -A3 and also: rfkill list all and finally: dmesg | grep rtl The file rtl8192EE_linux_v4.3.15.1 is never, ever going to compile, please abandon it. – chili555 Jun 11 '19 at 19:14
  • Is your TL-WN881ND a V1 or V2 or some other? – chili555 Jun 11 '19 at 20:28
  • "Is your TL-WN881ND a V1 or V2 or some other?"

    I'm not sure, how can I find out?

    – Cobradabest Jun 11 '19 at 21:08
  • Paste the requested terminal output and we'll know for sure. – chili555 Jun 11 '19 at 21:16
  • If you successfully compiled the rtl8192ee driver, as you said, and it doesn't drive your device and offer to connect, then it is quite likely that you don't actually have an rtl8192ee (Version 2) device. The only way to know for sure is to gather and paste the requested details. – chili555 Jun 12 '19 at 12:35
  • I believe you made a typo in the command. Please try again and proofread carefully. It should be exactly: lspci -nnk | grep 0280 -A3 The result will be something like this: https://paste.ubuntu.com/p/qwgXjTqnHx/ except, of course, for your TL-WN881ND. – chili555 Jun 12 '19 at 20:40
  • Looks like I have a V1: https://paste.ubuntu.com/p/Psy6dSRjV6/ – Cobradabest Jun 13 '19 at 19:16
  • It already has a driver, ath9k. Does the interface appear here? iwconfig Are there any clues in the log? dmesg | grep ath – chili555 Jun 13 '19 at 19:22
  • Results for iwconfig: https://paste.ubuntu.com/p/Zd6HVk4jMG/ - Results for dmesg: https://paste.ubuntu.com/p/p7rx46zqsM/ – Cobradabest Jun 13 '19 at 21:31
  • A Google search for the menacing message: ath: phy0: DMA failed to stop in 10 ms shows many bug reports but no definitive solution although you might try the technique at post #9 here: https://bbs.archlinux.org/viewtopic.php?id=181908 or comment #4 here: https://bugzilla.redhat.com/show_bug.cgi?id=892811 – chili555 Jun 14 '19 at 00:09
  • Worked as a charm – pceccon Jan 28 '20 at 21:59
0

So I got a USB dongle, and that seemed to solve the problem, and a few updates later, they managed to patch the issue with my network card, so now it works without the dongle!