Problems installing tp-link WN822N
I am trying to install a USB wi-fi adapter and have run into problems installing the drivers.
Searched the net and tried various solutions but the links were old and I ran into errors.
Can anyone suggest a solution that works?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Manfred Hampl
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
What wifi chip does it use please?
If it's USB, then please give the output of:
lsb_release -a; uname -a; lsusb
Thanks
Revision history for this message
|
#2 |
Yes it is a USB
Here is the output:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic
Linux john-H81M-S2H-GSM 5.0.0-37-generic #40~18.04.1-Ubuntu SMP Thu Nov 14 12:06:39 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 002: ID 03f0:bd07 Hewlett-Packard
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 004: ID 046d:0821 Logitech, Inc. HD Webcam C910
Bus 005 Device 003: ID 2357:0108
Bus 005 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 03f0:cd11 Hewlett-Packard
Bus 003 Device 004: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 003 Device 005: ID 046d:abd0 Logitech, Inc.
Bus 003 Device 003: ID 0451:2036 Texas Instruments, Inc. TUSB2036 Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Revision history for this message
|
#3 |
Revision history for this message
|
#4 |
Seemed to run smoothly to the make command.
Have my previous attempts muddied the waters?
Here is the output
john@john-
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/
make[1]: Entering directory '/usr/src/
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
/home/john/
/home/john/
for (j = 0; j < 8; j++)
^~~
/home/john/
payload_index = hdrlen + 8;
^~~~~~~~~~~~~
/home/john/
/home/john/
for (j = 0; j < 8; j++)
^~~
/home/john/
payload_index = hdrlen + 8;
^~~~~~~~~~~~~
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
/home/john/
/home/john/
else
^~~~
/home/john/
^~~~
/home/john/
if (ret != _FAIL)
^~
/home/john/
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
CC [M] /home/john/
In file included from /home/john/
/home/john/
#define IEEE80211_
In file included from /home/john/
./include/
#define IEEE80211_
/home/john/
/home/john/
if(spt_band->band == IEEE80211_
/home/john/
else if(spt_band->band == IEEE80211_
/home/john/
/home/john/
get_monotonic
^~~~~
getboottime
cc1: some warnings being treated as errors
scripts/
make[2]: *** [/home/
Makefile:1614: recipe for target '_module_
make[1]: *** [_module_
make[1]: Leaving directory '/usr/src/
Makefile:1700: recipe for target 'modules' failed
make: *** [modules] Error 2
john@john-
install -p -m 644 8192eu.ko /lib/modules/
install: cannot stat '8192eu.ko': No such file or directory
Makefile:1706: recipe for target 'install' failed
make: *** [install] Error 1
john@john-
modprobe: FATAL: Module 8192eu not found in directory /lib/modules/
john@john-
Revision history for this message
|
#5 |
There are different repositories with the driver, and it seems that the one you use has not been adapted to work also on the 5.0 version of the kernel.
I suggest that you try https:/
(Disclaimer: It has been adapted for kernel versions up to 5.4, but I cannot guarantee that it works with your device.)
Revision history for this message
|
#6 |
Things seemed to work well until the final step 'Make' when I was told the binary code for rtl8192eu was not found.
That occurred in the directory rtl8192eu-
Here is the make.log file from my attempt to make in the rtl8192eu directory:
DKMS make.log for rtl8192eu-1.0 for kernel 5.0.0-37-generic (x86_64)
Tue Jan 14 13:46:46 PST 2020
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/
make[1]: Entering directory '/usr/src/
CC [M] /var/lib/
In file included from /var/lib/
/var/lib/
#define IEEE80211_
In file included from /var/lib/
./include/
#define IEEE80211_
CC [M] /var/lib/
In file included from /var/lib/
/var/lib/
#define IEEE80211_
In file included from /var/lib/
./include/
#define IEEE80211_
/var/lib/
/var/lib/
for (j = 0; j < 8; j++)
^~~
/var/lib/
payload_index = hdrlen + 8;
^~~~~~~~~~~~~
/var/lib/
/var/lib/
for (j = 0; j < 8; j++)
^~~
/var/lib/
payload_index = hdrlen + 8;
^~~~~~~~~~~~~
CC [M] /var/lib/
In file included from /var/lib/
/var/lib/
#define IEEE80211_
In file included from /var/lib/
:
Revision history for this message
|
#7 |
I am beginning to think there is a problem with my computer's OS.
In Recovery mode I cannot run fsck.
I get the following messages:
/lib/recovery-
fsck from util-linux 2.31.1
dev/sda1 is mounted
e2fsck: cannot continue, aborting
Could this be why I cannot install rtl8192eu and if so how do I fix it?
Revision history for this message
|
#8 |
fsck (file system check) requires that the file system is completely idle, i.e. it must not be mounted. So you cennot run fsck on your root file system when you boot from it, not even in recovery mode.
To run fsck on your root file system you have to boot an Ubuntu installer in the "Try Ubuntu without installing" mode and then issue the appropriate command.
And the output from building the driver:
It shows only warnings. I do not see a problem.
If you want us to check, then please provide the full output.
Revision history for this message
|
#9 |
Booted up with a USB installer but could not get fsck to run.
Didn't get very far trying to install github's driver as there were missing dependencies etc.
Jeremy and Manfred have pointed me to different ways that should work and my machine fails at the make stage
How can I check my machine or what do I need to reinstall?
Revision history for this message
|
#10 |
Basic checks:
File system status:
When booting your system, you should see for a short moment a line on top of the screen that looks like
/dev/sda1 clean, 12345/23456 files, 123456/234567 blocks
If you see the word "clean", then this confirms that the root file system is in a consistent status and running fsck is not required.
Package management system:
Execute the commands
sudo apt update
sudo apt full-upgrade
sudo dpkg --audit
If there are warnings or error messages on the first two, or any output on the third command, then you have an inconsistency in the package management system (e.g. Issing dependencies).
What are the results of these checks on your system?
Revision history for this message
|
#11 |
Typo
** e.g. missing dependencies **
Revision history for this message
|
#12 |
Thank you for your help.
No file system status message on booting up.
It would be nice to have one.
Here is the output of sudo-apt-update:
john@john-
[sudo] password for john:
Ign:1 http://
Get:2 http://
Hit:3 https:/
Hit:5 http://
Ign:6 http://
Get:7 http://
Err:8 http://
404 Not Found [IP: 91.189.95.83 80]
Get:9 http://
Get:10 http://
Get:11 http://
Get:12 http://
Get:13 http://
Get:14 http://
Get:15 http://
Get:16 http://
Get:17 http://
Get:18 http://
Get:19 http://
Get:20 http://
Get:21 http://
Get:22 http://
Get:23 http://
Get:24 http://
Get:25 http://
Get:26 http://
Get:27 http://
Get:28 http://
Get:29 http://
Get:30 http://
Get:31 http://
Get:32 http://
Get:33 http://
Reading package lists... Done
E: The repository 'http://
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
john@john-
john@john-
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
gir1.2-snapd-1 libsnapd-glib1
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 98.4 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://
Get:2 http://
Fetched 98.4 kB in 1s (92.7 kB/s)
(Reading database ... 221536 files and directories currently installed.)
Preparing to unpack .../gir1.
Unpacking gir1.2-
Preparing to unpack .../libsnapd-
Unpacking libsnapd-
Setting up libsnapd-
Setting up gir1.2-
Processing triggers for libc-bin (2.27-3ubuntu1) ...
sudo dpkg --audit did not appear to run
john@john-
john@john-
Revision history for this message
|
#13 |
john@john-
[sudo] password for john:
dpkg: package 'missing' is not installed
dpkg: package 'dependencies' is not installed
john@john-
Revision history for this message
|
#14 |
1. That file system check information line is shown only for a rather short time. If your system boots very fast, then it might be hard to notice.
2. If "sudo dpkg --audit" does not produce any output (as seen on your system), then this is a good sign, because there are no problems with broken dependencies or other inconsistencies in the package management system.
3. There is one (minor) problem in the package management system:
Err:8 http://
E: The repository 'http://
There is no version for bionic in the openlp-core PPA. Since the current version of openlp is available in the standard Ubuntu repositories, you do not need that PPA.
What is the output of the command
grep openlp-core /etc/apt/
Revision history for this message
|
#15 |
Have removed openlp-core PPA from my software sources
Here is the output:
john@john-
john@john-
john@john-
[sudo] password for john:
john@john-
Revision history for this message
|
#16 |
ok. The command "sudo apt update" should now no more show lines with "Err:", "E:", "W:" or "N:" at the beginning.
Now let's go back to the driver for the tp-link WN822N device.
I suggest that you clean up your system and remove all source directories that you have created in your installation attempts for the driver from the https:/
Then execute the commands
sudo apt install dkms git build-essential linux-headers-
cd
mkdir wlan-drv
cd wlan-drv
git clone https:/
cd rtl8192eu-linux
./install_wifi.sh
and report what the results are. (Remark: you can of course name the working directory different from "wlan-drv")
Revision history for this message
|
#17 |
The rtl8xxxu driver in the kernel should support that device but there have been reports of poor performance
Revision history for this message
|
#18 |
sudo apt-update:
john@john-
Hit:1 https:/
Ign:2 http://
Get:3 http://
Hit:5 http://
Get:6 http://
Get:7 http://
Get:8 http://
Get:9 http://
Get:10 http://
Get:11 http://
Get:12 http://
Get:13 http://
Get:14 http://
Get:15 http://
Get:16 http://
Fetched 3,782 kB in 4s (1,022 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
sudo apt install dkms git build-essential linux-headers-
john@john-
[sudo] password for john:
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.4ubuntu1).
dkms is already the newest version (2.3-3ubuntu9.7).
git is already the newest version (1:2.17.
linux-headers-
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
and the rest of it:
john@john-
john@john-
Cloning into 'rtl8192eu-
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 653 (delta 6), reused 4 (delta 0), pack-reused 635
Receiving objects: 100% (653/653), 2.45 MiB | 1.62 MiB/s, done.
Resolving deltas: 100% (230/230), done.
john@john-
john@john-
rmmod: ERROR: Module 8192eu is not currently loaded
rmmod: ERROR: Module rtl8xxxu is not currently loaded
-------
Deleting module version: 1.0
completely from the DKMS tree.
-------
Done.
Creating symlink /var/lib/
DKMS: add completed.
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
'make' all KVER=5.
cleaning build area...
DKMS: build completed.
8192eu.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/
depmod...
Backing up initrd.
Making new initrd.
(If next boot fails, revert to initrd.
update-
DKMS: install completed.
Now let's see if it worked
It does!
Thank you for all your help
Revision history for this message
|
#19 |
Thanks Manfred Hampl, that solved my question.
Revision history for this message
|
#20 |
Thank you Jeremy for your comment.
When I got the USB adapter it seemed to work out of the box, just.
After a day or two it just stopped working and then I had to find a solution.
Once again, thank you for your help.