How to install WiFi driver for D-Link DWA 131 (USB Dongle)

(Note: I had created a thread earlier, but that was published accidentally before I could type out completely. I have deleted that post.)

I had been using a Netgear USB WiFi adapter. It required no driver installation or anything. It stopped working two days back, probably because it is too old now.
I unboxed my wifi dongle which I purchased as a backup - a D-Link DWA 131 USB adapter. And it is not working.

First up, just to ensure that the D-Link dongle itself doesn’t have any problems, I booted into windows and installed the driver from exe file (it is a dual boot system). The wifi dongle works fine, as expected. So the dongle is okay, I can guarantee.

Now the problem exactly, is that the wifi doesn’t connect to a network. After I plug in the dongle, I can click on network manager applet in the system tray and see the available wifi networks around me. I click on on a network, and it asks me the password. I enter the correct password. The network manager icon in system tray turns to a loading icon (the rotating circle). But it doesn’t connect to the network. A notification pops up, saying that the PC has disconnected from the network. (Note that it doesn’t connect to the network in the first place. Also, It doesn’t say that the password was wrong or some other error)

I tried reinstalling the kernel (linux-lts). In the post-installation steps, it installs modules for the chipset which my dongle uses. Rebooted my PC, but the problem persisted.

I headed over to arch wiki. The entry relating to my chipset is this: https://wiki.archlinux.org/index.php/Network_configuration/Wireless#rtl8xxxu

A question on fedora forum, relating to the same wifi dongle is here: https://ask.fedoraproject.org/t/wifi-adaptor-dl-dwa-131-seems-working-but-cannot-connect/3222/3
A user on the forum suggest installing the driver from https://github.com/Mange/rtl8192eu-linux-driver I wanted to proceed but I have never compiled an application from source before so I stopped.

I went to the official website: https://support.dlink.com/ProductInfo.aspx?m=DWA-131
My hardware version is E (it asks you to select). I downloaded the files for Linux 5.6.3.1. That too contained source files. But it had a readme which convinced me that the installation is easy (make and sudo make install) I did the build. It didn’t throw any errors, but I still couldn’t connect to my wifi network.

Finally, I have booted in windows, and am typing this post. Probably the GitHub link I posted may be the right driver, but I am too dumb with source files and stuff. Maybe a user here can help me get my wifi dongle working. Thanks!

Edit: Outputs that may be required

$ uname -a                                                                                                                                                                              
Linux wired 5.4.46-1-lts #1 SMP Wed, 10 Jun 2020 20:36:34 +0000 x86_64 GNU/Linux
$ iwconfig        
enp0s26u1u2  no wireless extensions.

lo        no wireless extensions.

enp3s0    no wireless extensions.

wlan0     IEEE 802.11  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm
          Retry short limit:7   RTS thr=2347 B   Fragment thr:off
          Power Management:off
$ ifconfig     
enp0s26u1u2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.42.218  netmask 255.255.255.0  broadcast 192.168.42.255
        inet6 fe80::929d:8a76:dfd1:888b  prefixlen 64  scopeid 0x20<link>
        ether 22:a2:6e:9c:59:1e  txqueuelen 1000  (Ethernet)
        RX packets 28  bytes 2744 (2.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 57  bytes 9659 (9.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp3s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 94:de:80:e5:03:2b  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 6148  bytes 341879 (333.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6148  bytes 341879 (333.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether ce:d4:3a:28:3e:30  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
$ sudo lshw -c network      
[sudo] password for snehit:
  *-network
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: enp3s0
       version: 06
       serial: 94:de:80:e5:03:2b
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 firmware=rtl8168e-3_0.0.4 03/27/12 latency=0 link=no multicast=yes port=MII
       resources: irq:16 ioport:d000(size=256) memory:f2104000-f2104fff memory:f2100000-f2103fff
  *-network:0
       description: Ethernet interface
       physical id: 2
       bus info: usb@1:1.2
       logical name: enp0s26u1u2
       serial: 22:a2:6e:9c:59:1e
       capabilities: ethernet physical
       configuration: broadcast=yes driver=rndis_host driverversion=22-Aug-2005 firmware=RNDIS device ip=192.168.42.218 link=yes multicast=yes
  *-network:1
       description: Wireless interface
       physical id: 3
       bus info: usb@2:1.2
       logical name: wlan0
       serial: ce:d4:3a:28:3e:30
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=rtl8xxxu driverversion=5.4.46-1-lts firmware=N/A link=no multicast=yes wireless=IEEE 802.11

I ran all these commands while the USB dongle is plugged in the cpu.
Also note that the system is a desktop computer, which doesn’t have any built-in wireless interface. The wifi dongle is the only wireless interface connected to my PC.

It’s on AUR - https://aur.archlinux.org/packages/8192eu-dkms/. Have you tried to install it?

Thanks for pointing me there! I did search on the aur, but i ran yay -Ss rtl8192 so I couldn’t find that. I’ll try installing this.
Also, please tell, it is necessary to reboot after installing the driver?

Yes. You also need to install dkms package and headers for your current kernel (preferably for all of them you are using). I don’t remember though whether you need to do any additional steps or it’s going to be added automatically.

edit: please ignore this for the moment

Got this output at end:

:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Install DKMS modules
==> dkms install 8192eu/108.2bd6637 -k 5.4.46-1-lts
Error! Module version v5.6.4_35685.20191108_COEX20171113-0047 for 8192eu.ko.xz
is not newer than what is already found in kernel 5.4.46-1-lts (v5.6.4_35685.20191108_COEX20171113-0047).
You may override by specifying --force.
==> dkms install 8192eu/108.2bd6637 -k 5.7.2-arch1-1

Still can’t connect to wifi though

by ‘headers’ you mean linux-lts-header. right?
(i use lts kernel)

Yep, linux-lts-headers

okay. installed the packages. Still getting this output

:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Install DKMS modules
==> dkms install 8192eu/108.2bd6637 -k 5.4.46-1-lts
Error! Module version v5.6.4_35685.20191108_COEX20171113-0047 for 8192eu.ko.xz
is not newer than what is already found in kernel 5.4.46-1-lts (v5.6.4_35685.20191108_COEX20171113-0047).
You may override by specifying --force.
==> dkms install 8192eu/108.2bd6637 -k 5.7.2-arch1-1

The execution doesn’t halt. Will this cause any problems?

dkms was already installed

Rebooted. Wifi still cannot connect.
A side question, how do i verify my chipset model? I found out mine from the net, but is there a way to know it y running some command on my pc, so that i can be sure about it.

just try lspci -k. Sir I dont know this is right command. Anyway try it

this is the related part of output i get (the output was a bit long)

03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
	Subsystem: Gigabyte Technology Co., Ltd Onboard Ethernet
	Kernel driver in use: r8169
	Kernel modules: r8169

https://bbs.archlinux.org/viewtopic.php?id=146681.

See the below given link:-

Okay. Will check it out.

1 Like

Doesn’t work.
I installed the 8192eu-dkms package, rebooted. Tried connecting to wifi using network manager applet and some terminal commands, but unsuccessful

There may be solution. Hope, other technical people solve your problem. Please check any loose contact in usb etc or in wifi switch etc.

Thanks for your time! :smile: I will wait for other people to help. The USB port itself is fine.

could you check journal output while from when you plugin the dongle? This will ma yput out some errors:

journalctl -f in a terminal and then plug it in and copy paste the output here or to a pastebin

I recently got a “TP-Link TL-WN822N” working by

  1. installing the 8192eu-dkms package
  2. blacklisting the old module that was also still in use

Without blacklisting the ‘rtl8xxxu’ module, the usb-dongle still didn’t work, so I generated the following file
sudo nano /etc/modprobe.d/rtl8xxxu.conf
with the line
blacklist rtl8xxxu

Rebootet and all was good.

[Edit] Find out which modules are in use by running
dmesg | grep usbcore

3 Likes

Many many thanks! I got it working.

This is the step I was missing.

Also, I replaced 8192eu-dkms with this package: https://github.com/Mange/rtl8192eu-linux-driver/ beacuse the github version is recently updated. Building from source turned out to be way easier than what I thought.

4 Likes

Please summarise the work around here so that it useful to other members.

2 Likes