dkms drivers for rtl8812au & rtl8814au network dongles fail to build on 17.10 (kernel 4.13)

6,551

Solution 1

You might try:

git clone https://github.com/zebulon2/rtl8814au.git
cd rtl8814au
make
sudo make install
sudo modprobe 8814au

It makes perfectly on my 17.10 system. I am not confident that I can recommend a dkms process, so kernel updates require a recompile.

Solution 2

Thanks to @chili555 for pointing me in the right direction. The rtl8814au driver referred to in the git clone link works with 17.10, and that same author also has a working rtl8812au driver that also works with 17.10.

From memory...

rtl8812au (Edimax EW-7822UAC)

sudo git clone https://github.com/zebulon2/rtl8812au-driver-5.2.9.git
note: dkms.conf file already included
sudo cp -r rtl8812au-driver-5.2.9 /usr/src/rtl8812au-5.2.9
sudo dkms add rtl8812au/5.2.9
sudo dkms build rtl8812au/5.2.9
sudo dkms install rtl8812au/5.2.9
dkms status

rtl8814au (Edimax EW-7833UAC & D-Link DWA-192)

sudo git clone https://github.com/zebulon2/rtl8814au.git

create dkms.conf and add these lines...
----
# rtl8814AU-4.3.21_17997.20160531
#
#
PACKAGE_NAME="rtl8814au"
PACKAGE_VERSION="4.3.21_17997.20160531"
MAKE[0]="'make' all KVER=${kernelver}"
BUILT_MODULE_NAME[0]="8814au"
DEST_MODULE_LOCATION[0]="/updates/dkms"
AUTOINSTALL="YES"
REMAKE_INITRD="NO"
----

sudo cp -r rtl8814au /usr/src/rtl8814au-4.3.21
sudo dkms add rtl8814au/4.3.21
sudo dkms build rtl8814au/4.3.21
sudo dkms install rtl8814au/4.3.21
dkms status
Share:
6,551

Related videos on Youtube

Boris Hamanov
Author by

Boris Hamanov

Former DEC Hardware Engineer, DEC Field Service Manager, and DEC VAX/VMS System Manager, but mostly a Computer Hardware Service Manager. Have worked for Digital Equipment Corporation, Computerland, Sony, Computerware, Executron Computers, CompUSA, and Apple Computer. Hardware, software, and management savvy.

Updated on September 18, 2022

Comments

  • Boris Hamanov
    Boris Hamanov over 1 year

    I have github dkms kernel drivers for rtl8812au (v4.3.14) and rtl8814au (v4.3.21) USB wireless network dongles that were working fine in 17.04, but failed to build during the upgrade to 17.10. Both drivers are based on similar code, and fail to build in similar fashion.

    I don't know if it's a new gcc compiler, or the new 4.13 kernel, that may be causing the problem. It may just require a minor tweak to the Makefile to work around the errors.

    If I use the standard make command, instead of the normal dkms add/build/install sequence, I can see the error quite readily.

    Here are the errors for the rtl8812au code version 4.3.14 (which is newer that what's found in the current Ubuntu repos)...

    user@Satellite-E55:~/src/rtl8812AU$ make
    make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.13.0-16-generic/build M=/home/user/src/rtl8812AU  modules
    make[1]: Entering directory '/usr/src/linux-headers-4.13.0-16-generic'
      CC [M]  /home/user/src/rtl8812AU/core/rtw_cmd.o
    In file included from /home/user/src/rtl8812AU/include/drv_types.h:32:0,
                     from /home/user/src/rtl8812AU/core/rtw_cmd.c:22:
    /home/user/src/rtl8812AU/include/osdep_service.h: In function ‘thread_enter’:
    /home/user/src/rtl8812AU/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/user/src/rtl8812AU/include/osdep_service.h: In function ‘flush_signals_thread’:
    /home/user/src/rtl8812AU/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/user/src/rtl8812AU/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
    cc1: some warnings being treated as errors
    scripts/Makefile.build:302: recipe for target '/home/user/src/rtl8812AU/core/rtw_cmd.o' failed
    make[2]: *** [/home/user/src/rtl8812AU/core/rtw_cmd.o] Error 1
    Makefile:1546: recipe for target '_module_/home/user/src/rtl8812AU' failed
    make[1]: *** [_module_/home/user/src/rtl8812AU] Error 2
    make[1]: Leaving directory '/usr/src/linux-headers-4.13.0-16-generic'
    Makefile:1576: recipe for target 'modules' failed
    make: *** [modules] Error 2
    user@Satellite-E55:~/src/rtl8812AU$
    

    The code referred to in osdep_service.h looks like this...

    #ifdef PLATFORM_LINUX
        #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0))
        daemonize("%s", name);
        #endif
        allow_signal(SIGTERM);
    #endif
    #ifdef PLATFORM_FREEBSD
        printf("%s", "RTKTHREAD_enter");
    #endif
    }
    
    __inline static void flush_signals_thread(void) 
    {
    #ifdef PLATFORM_LINUX
        if (signal_pending (current)) 
        {
            flush_signals(current);
        }
    #endif
    

    The errors and the code for the rtl8814au look similar, so I won't post them unless requested/required.

    Please help. I'd like to get my wireless networks back online.

    • chili555
      chili555 over 6 years
      Did you try: sudo apt install rtl8812au-dkms?
    • Boris Hamanov
      Boris Hamanov over 6 years
      @chili555 Thanks for your response. I'm using a newer version of that repo driver. The repo version is 4.3.8 and I've been successfully using 4.3.14 on 17.04... it just fails to compile now on 17.10. The errors look like a simple options tweak to the Makefile, or a simple source code change due to the newer 4.13 kernel... I hope :-)
    • chili555
      chili555 over 6 years
      Please try: github.com/gnab/rtl8812au It 'makes' on my 17.10 system with a few possibly harmless warnings.
    • Boris Hamanov
      Boris Hamanov over 6 years
      @chili555 I took a look at the link you provided. It does compile with minor warnings, but it's version 4.2.2 from 2013... way older than the 4.3.8 in the repos, and older yet than the 4.3.14 that I had been using. Since the two github dkms drivers that I had been using for the rtl8812au and rtl8814au are based on such similar code, and have such similar compile failure modes on 17.10, I was hoping for a simple fix that would fix both problems with a similar fix :-) rather than going to a much older driver (if possible).
    • chili555
      chili555 over 6 years
      If I knew it, I'd propose it. The gnab version is the only one I know of that even compiles in 17.10.
  • Boris Hamanov
    Boris Hamanov over 6 years
    Thanks for the help! This driver works. The same author also has a working rtl8812au driver that works with 17.10. I'll put together a quickie answer with more details about my experience. Thanks again!