3

Problem

I had a Linksys WUSB 6300 dual-band USB WiFi adapter happily running on on my desktop PC with driver module 8812AU.

When I first got it to work I used the driver signing method to get it to work with Secure Boot. It worked fine with Kernel version 4.4.0-23-generic and later also with 4.4.0-24-generic where I resigned it after the update.

After the update to 4.4.0-28-generic resigning for some reason does not have the desired effect anymore and it does not seem to load the driver module 8812AU.

After updating to 4.4.0-38-generic the behavior remains the same.

The Additional Drivers tool now shows me this, so I am not sure if somehow the module files got messed up. I am pretty new to Ubuntu, so I wouldn't know how to tell. When it was still working it showed me this.

So in consequence the network adapter is not working and I am out of ideas what to check or do in order to get it back to work.

Details

lsusb shows me that the adapter is recognized as USB device:

Bus 002 Device 002: ID 13b1:003f Linksys WUSB6300 802.11a/b/g/n/ac Wireless Adapter [Realtek RTL8812AU]

sudo lshw -C network only shows me the Ethernet and the internal WiFi (it has a very similar name). It is an integrated WiFi adapter which is working poorly under Ubuntu and is thus not useful for me.

Note: 8821AE is the internal WiFi. I am trying to get 8812AU to run which is not listed here because it does not seem to be loaded.

*-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: 11
   serial: 54:a0:50:d5:4b:0b
   size: 10Mbit/s
   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 driverversion=2.3LK-NAPI duplex=half firmware=rtl8168g-2_0.0.1 02/06/13 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
   resources: irq:42 ioport:e000(size=256) memory:f7d00000-f7d00fff memory:f0000000-f0003fff
*-network
   description: Wireless interface
   product: RTL8821AE 802.11ac PCIe Wireless Network Adapter
   vendor: Realtek Semiconductor Co., Ltd.
   physical id: 0
   bus info: pci@0000:04:00.0
   logical name: wlp4s0
   version: 00
   serial: 54:27:1e:d6:91:8d
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
   configuration: broadcast=yes driver=rtl8821ae driverversion=4.4.0-22-generic firmware=N/A ip=192.168.0.20 latency=0 link=yes multicast=yes wireless=IEEE 802.11abgn
   resources: irq:46 ioport:d000(size=256) memory:f7c00000-f7c03fff

Running rfkill list all shows that nothing seems to be blocked:

0: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no
1: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no

Any help would be greatly appreciated!

Many thanks.

5
  • I believe the correct driver for the USB is 8812au. What is the exact result of: sudo modprobe -r rtl8821ae and next: sudo modprobe 8812au ? Welcome to askubuntu.
    – chili555
    Oct 2, 2016 at 21:44
  • Oh. The 8812au dkms driver has a problem. DKMS builds a module for the prior kernel during the MAKE step, and it won't load in the current kernel (where it's supposed to). You can tell if you've got a kernel module load error at boot time. A modinfo 8812au will show vermagic as incorrect. A manual dkms remove/build/install works though. There's a problem in makefile, if memory serves me, and I haven't been able to fix it yet. Cheers, Al
    – heynnema
    Oct 2, 2016 at 22:23
  • See my manual dkms fix it script below in an answer. Adjust the version number if you need to. Cheers, Al
    – heynnema
    Oct 2, 2016 at 22:36
  • Don't feel bad the Additional Drivers screen kept changing around inexplicably on me too during same boot visits. After picking a Nvidia driver to install the entire section disappeared altogether. Someone here told me this was because I picked a PPA to install from shrugs. Oct 2, 2016 at 23:02
  • @mz1000 the short answer is that you need to install rtl8812au-dkms using Synaptic. Also read and download my fixit script so that after any kernel software update, you can fix that the driver broke again (until somebody fixes it). Cheers, Al
    – heynnema
    Oct 3, 2016 at 15:23

3 Answers 3

5

This package can be fixed by editing the dkms.conf files...

sudo -H gedit /usr/src/rtl8812au-4.3.8.12175.20140902+dfsg/dkms.conf

Then change line 4 from MAKE="'make' all" to MAKE="'make' all KVER=${kernelver}"

Save and exit the editor then do the same with:

sudo -H gedit /var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/dkms.conf

As a similar problem was reported on Ubuntu Forums and my edits have worked for the last kernel update I got.

For your current kernel you should be able to:

dkms build rtl8812au/4.3.8.12175.20140902+dfsg -k $(uname -r)
dkms install rtl8812au/4.3.8.12175.20140902+dfsg -k $(uname -r)
Reboot

2
  • Your dkms build and dkms install commands have an incorrect -k parameter. You have an older kernel listed. Should be 4.4.0-38-generic/x86_64. See my script for another way to get the correct kernel. Thanks for the potential fix! Cheers, Al
    – heynnema
    Oct 3, 2016 at 22:31
  • I am sorry about that as I was also trying to put a fixed version on github. The poster must have posted lshw -c net results from the older kernel Thanks heynnema
    – Jeremy31
    Oct 3, 2016 at 23:03
3

Here is a quick script that I wrote to manually fix a broken rtl8812au-dkms driver issue that occurs after every kernel software update. Run the script with sudo after a kernel software update has occurred. The problem with this driver is that dkms builds it for the wrong kernel. It's a problem with dkms.conf, in the source code. I may have a permanent fix pending.

You can tell if you've got a kernel module load error in /var/log/syslog at boot time. In terminal, a modinfo 8812au will show vermagic as incorrect.

#!/bin/bash  
# save as ~/Desktop/fix_8812au.sh  
# in terminal: chmod +x ~/Desktop/fix_8812au.sh
# in terminal, run with: sudo ~/Desktop/fix_8812au.sh

cd /var/lib/dkms

# rtl8812au  

dkms remove rtl8812au/4.3.8.12175.20140902+dfsg -k "$(uname -r)/$(uname -p)"  
dkms build rtl8812au/4.3.8.12175.20140902+dfsg -k "$(uname -r)/$(uname -p)"  
dkms install rtl8812au/4.3.8.12175.20140902+dfsg -k "$(uname -r)/$(uname -p)"

Update: the user was also using an older version of the 8812au driver, so we installed the current version of rtl8812au-dkms from the repositories, and it all worked. The script will be required immediately after the next kernel software update.

Update #2: the proper fix (thanks @Jeremy31) for this bug is to edit these two files:

gksudo gedit /usr/src/rtl8812au-4.3.8.12175.20140902+dfsg/dkms.conf

gksudo gedit /var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/dkms.conf

and replace MAKE="'make' all" with this line:

MAKE[0]="'make' all KVER=${kernelver}"
26
  • How is this related to the question?
    – Pilot6
    Oct 2, 2016 at 22:55
  • @Pilot6, see my comments, above. I couldn't post this script in a comment. It's a temporary workaround for a broken rtl8812au-dkms driver. I put it here for chili555's info. I'll edit it.
    – heynnema
    Oct 2, 2016 at 22:57
  • The question is about SIGNING of kernel modules.
    – Pilot6
    Oct 2, 2016 at 22:58
  • @Pilot6, yes, signing, but actually, getting the 8812au driver to work again.
    – heynnema
    Oct 2, 2016 at 23:00
  • @heynnema Seems like you are on the right track. In the syslog I see the message: 8812au: disagrees about version of symbol module_layout. modinfo gives me this. Should I change the version in your script to 4.2.2_7502.20130517? Above you mentioned I should use Synaptic to install the driver. How to do that?
    – mz1000
    Oct 3, 2016 at 20:01
0

I preach you should use kernel modules that are fully signed and compiled to the right version... then I sin and force a module in that I can't figure out how to sign (I'm security-challenged). Indeed before learning dkms I think I must have digressed and forced the wrong kernel version in before (but hey it still worked!).

You might find yourself in the same situation. Anyway using modprobe you can install an unsigned kernel module by adding these parameters:

-f, --force                 Force module insertion or removal.
                            implies --force-modversions and
                            --force-vermagic
    --force-modversion      Ignore module's version
    --force-vermagic        Ignore module's version magic

Of course I preach you should never do this, but then again....

4
  • for shame, giggle. Force loading a bad module. See my comments above about the defective 8812au driver... and learn some dkms... it's not hard, really. Cheers, Al
    – heynnema
    Oct 2, 2016 at 23:06
  • Haha I clearly stated never force a kernel module before I said how to do it. FTR I learned dkms for EnhanceIO (HDD to SSD disk caching software) 2 years ago in that scenario forcing an incompatible kernel version in would be disastrous, unlike forcing an internet connection in. As it were using Intel RST and EnhanceIO to accelerate the same HDD (two partitions) to the same mSata SSD (two cache volumes) turned out to be a bad idea after 18 months... Hello bricked windows HDD :( Oct 2, 2016 at 23:14
  • Thanks for your answer, but I'll avoid the force for now ;-)
    – mz1000
    Oct 3, 2016 at 20:10
  • May the force be with you :) Oct 3, 2016 at 21:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .