Trying to install driver

New to Debian (Or Linux in general)? Ask your questions here!

Trying to install driver

Postby silas2 » 2019-09-30 15:21

I'm having nightmares trying to get my wireless USB installed. I'm following the Debian wiki here : https://wiki.debian.org/WiFi
I actually bought the one suggested as having tested drivers, TP-Link TL WN821N - ( that's how desperate i am!)
I've run the commands listed in the guide except apt-get install gcc-6 which is failing with 'Unable to locate package gcc-6' , BUT the 'make' command is working, as is 'make install' - I'm assuming gcc-6 package is there somehow already..?
Still no WiFi, forgive my utter newbieness but there is no modprobe in the guide, how does the module get loaded?
+ having run the 'make install', I'm assuming an executable file is created, which is the executable?
silas2
 
Posts: 13
Joined: 2019-09-30 13:22

Re: Trying to install driver

Postby Head_on_a_Stick » 2019-09-30 15:31

silas2 wrote:TP-Link TL WN821N

Oh dear, bad choice :(

That needs proprietary drivers (which is why you're building them yourself) and it won't work unless the MAC address is randomised, which is just weird.

And the wiki page suggests running make as root, which is just stupid. Don't do that.

Anyway, are you sure the make & make install commands proceeded without error? Did you reboot after installing the new driver?

And are we sure the device needs that driver?
Code: Select all
lsusb
Don't break DebianHow to report bugs

SharpBang GNU/Linux — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10599
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Trying to install driver

Postby sunrat » 2019-09-30 15:45

Assuming 'make install' worked, switch to root with sudo or su - and load the driver with
Code: Select all
modprobe rtl8192eu

It should load automatically if the device is detected on bootup. Don't forget to disable mac address randomisation.

That driver can be installed with dkms rather than make, which is better as it automatically rebuilds if a new kernel is installed.
That said, I have a similar TP-Link dongle (TL WN822N v5) which uses the same driver but I never got it to work properly. It would work fine for a while but drop out or disconnect regularly.
Last edited by sunrat on 2019-09-30 23:46, edited 1 time in total.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2868
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: Trying to install driver

Postby stevepusser » 2019-09-30 17:02

The problem is that there are several revisions of that device. The early ones that used Atheros chipsets worked just fine, but later ones have been real pains in the rear.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Chromium 78.0.3904.87, Hedgewars 1.0.0, PulseEffects 4.6.8, Telegram-desktop 1.8.15, Pale Moon 28.7.2, KeepassXC 2.5.0
User avatar
stevepusser
 
Posts: 11231
Joined: 2009-10-06 05:53

Re: Trying to install driver

Postby silas2 » 2019-09-30 17:55

Thanks for all your help. Much appreciated.
I am getting modprobe not found, so I guess its not installed, how do I find out how to install it? I've googled but can't seem to find out - don't want to derail the thread but when you're a beginner nothing works!
Re Head_on_a_Stick : "....how do you know it made ok?..."
Sorry , trying to upload a screenshot but i'm getting "Sorry, the board attachment quota has been reached."

The last line of the 'make' is 'MODPOST 1 module' , is that an error or success? I'm not seeing anything resembling rtl8192eu though.

Re sunrat:

It should load automatically if the device is detected on bootup. Don't forget to disable mac address randomisation
, I thought I was supposed to Enabled the mac radmonisation.?

+ do you know how i can install with dkms?
silas2
 
Posts: 13
Joined: 2019-09-30 13:22

Re: Trying to install driver

Postby sunrat » 2019-10-01 00:44

As this is Beginners Questions, you need to learn how to help us help you as so far this is hard to understand.
- post the exact commands you used and resulting terminal output, in a code box. Paraphrasing makes it guesswork for us.
- post the line from lsusb (as requested by HOAS) showing your device so we know your device ID. I assumed that it is a Realtek 8192EU chip as that is likely what a new one is, although they can change between versions.
- no screenshot necessary, copy/paste the text from terminal in a code box.

It's hard to say why you got "modprobe not found" without seeing the exact terminal text. I'm guessing you didn't switch to root correctly. Maybe driver didn't build correctly either.
There are a bunch of other things which may help. Disabling MAC address randomisation is one, blacklisting rtl8xxxu is another. You also need to install firmware-realtek package from non-free repo. See this page for more - https://github.com/Mange/rtl8192eu-linux-driver
The DKMS instructions on that page are for Ubuntu. Here's a quick edit for Debian:

Install DKMS and other required tools

Code: Select all
$ sudo apt install git linux-headers-$(uname -r|sed 's/[^-]*-[^-]*-//') build-essential dkms;


Clone this repository and change your directory to cloned path.

Code: Select all
$ git clone https://github.com/Mange/rtl8192eu-linux-driver;


Code: Select all
$ cd rtl8192eu-linux-driver;


Add the driver to DKMS. This will copy the source to a system directory so that it can used to rebuild the module on kernel upgrades.

Code: Select all
$ sudo dkms add .


Build and install the driver.

Code: Select all
$ sudo dkms install rtl8192eu/1.0


If you don't have sudo, use su -c instead.
Note those instructions are for Mange version of driver. I'm not sure of the difference from jeremyb31. Both haven't seen updates for a while.
As mentioned, this can be a bastard of a device to get working. It shouldn't be recommended in the wiki. I also have a TL WN822N V2 which has an Atheros chip and is really easy to get working although it still needs MAC address randomisation disabled.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2868
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: Trying to install driver

Postby silas2 » 2019-10-01 11:08

Ok, followed your instructions, Here's lsusb:
Code: Select all
silas@debian:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0cf3:7015 Qualcomm Atheros Communications TP-Link TL-WN821N v3 / TL-WN822N v2 802.11n [Atheros AR7010+AR9287]

Here's the install:
Code: Select all
root@debian:/home/silas/Downloads/rtl8192eu-linux-driver# /usr/sbin/dkms add .

Creating symlink /var/lib/dkms/rtl8192eu/1.0/source ->
                 /usr/src/rtl8192eu-1.0

DKMS: add completed.
root@debian:/home/silas/Downloads/rtl8192eu-linux-driver# /usr/sbin/dkms  install rtl8192eu/1.0

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
'make' all KVER=4.19.0-6-amd64...............
cleaning build area...

DKMS: build completed.

8192eu.ko:
Running module version sanity check.
Error! Module version v4.4.1_17696.20160509_BTCOEX20160412-0042 for 8192eu.ko
is not newer than what is already found in kernel 4.19.0-6-amd64 (v4.4.1_17696.20160509_BTCOEX20160412-0042).
You may override by specifying --force.

depmod...

Backing up initrd.img-4.19.0-6-amd64 to /boot/initrd.img-4.19.0-6-amd64.old-dkms
Making new initrd.img-4.19.0-6-amd64
(If next boot fails, revert to initrd.img-4.19.0-6-amd64.old-dkms image)
update-initramfs......

DKMS: install completed.


I just noticed the error but is it just saying the module is already installed? Should I run again with the -force?
I'm still getting no WiFi adapter found - I'm sure the device is alive as I can use it thru Windows (dual boot/multi hard disk machine)

I've still got the line about the MAC randomisation from the wiki
Code: Select all
sudo kate /etc/NetworkManager/NetworkManager.conf
Append the following:
[device]
wifi.scan-rand-mac-address=no

I'm not sure if that's what you think i should have there...?
silas2
 
Posts: 13
Joined: 2019-09-30 13:22

Re: Trying to install driver

Postby sunrat » 2019-10-01 12:34

No wonder it's not working, it's an Atheros chip (same as my one actually) not Realtek. The driver for it is already included in the kernel but it needs firmware.
Install firmware-atheros from the Debian non-free repo, add that mac address tweak to Network Manager conf file, reboot and it should work.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2868
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: Trying to install driver

Postby silas2 » 2019-10-01 13:56

Yeah!!! Thank you very much, its working. I can now move out from the cupboard under the stairs which was as far as my Ethernet cable could reach.
silas2
 
Posts: 13
Joined: 2019-09-30 13:22

Re: Trying to install driver

Postby sunrat » 2019-10-01 14:12

Yay! Glad I could help. :D
It makes it much easier when we know exactly which device it is. You're fortunate to have the older V2 version.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2868
Joined: 2006-08-29 09:12
Location: Melbourne, Australia


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 11 guests

fashionable