rtl8812au-dkms rtl8812au kernel module failed to build [error: implicit declaration of function ‘is_compat_task’]

Bug #1637059 reported by Lin David on 2016-10-27
This bug affects 23 people
Affects Status Importance Assigned to Milestone
rtl8812au (Ubuntu)

Bug Description

The wifi driver not worked.

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: rtl8812au-dkms
Uname: Linux 4.6.5-040605-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
DKMSKernelVersion: 4.4.0-45-generic
Date: Sat Oct 22 15:55:54 2016
DuplicateSignature: dkms:rtl8812au-dkms: error: implicit declaration of function ‘is_compat_task’ [-Werror=implicit-function-declaration]
PackageArchitecture: all
 dpkg 1.18.4ubuntu1.1
 apt 1.2.12~ubuntu16.04.1
SourcePackage: rtl8812au
Title: rtl8812au-dkms rtl8812au kernel module failed to build
UpgradeStatus: Upgraded to xenial on 2016-08-01 (86 days ago)

Lin David (cay-903508) wrote :
summary: rtl8812au-dkms rtl8812au kernel
- module failed to build
+ module failed to build [error: implicit declaration of function
+ ‘is_compat_task’]
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in rtl8812au (Ubuntu):
status: New → Confirmed
tags: removed: need-duplicate-check
Changed in rtl8812au (Ubuntu):
importance: Undecided → High
Hendrik Knackstedt (hennekn) wrote :

Also affects linux kernel version 4.8 which is used as hwe for xenial.

Julio Lajara (ju2wheels) wrote :

Can confirm, I have the same issue.

As a temporary fix (I couldnt find where CONFIG_COMPAT was defined in the 4.4 lts xenial kernel in 16.04.1), I added the following to the very top of /usr/src/rtl8812au- :

# Note: This not a correct general purpose solution but for building on amd64 16.04.2 it works fine.



This allowed me to build the driver on amd64 16.04.2, followed by the following:

sudo dkms remove -m rtl8812au/ --all
sudo dkms install -m rtl8812au -v
sudo modprobe -r 8812au
sudo modprobe 8812au
# unplug/replug the usb device
sudo systemctl restart NetworkManager

The driver will now work with the 4.8 HWE kernel on 16.04.2 and so far the networking in general seems far more stable than with the xenial kernel.

Brendan (brendan-rankin) wrote :

What is the purpose of CONFIG_COMPAT? Regardless, it's clearly broken here!

It looks like this change to the Linux kernel caused the break. Not knowing the purpose or scope of COMPAT, it's hard to say what it was meant to improve.


Hannu Teulahti (teu) wrote :

This version seems to work. Maybe there is some pointers how to fix this.


TJ (tj) wrote :

This minor patch fixed the build for me.

The attachment "Patch for kernel 4.4+ using in_compat_syscall() instead of is_compat_task()" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
TJ (tj) wrote :

I found that this driver does NOT support some USB devices based on the 8821au (since the Debian/Ubuntu source lacks some HAL files) and USB device IDs.

In my case:
$ lsusb

Bus 001 Device 109: ID 0bda:0811 Realtek Semiconductor Corp.

I found a working driver (based on later (4.3.14) upstream source) that can also be built and installed via DKMS at:


which builds the module rtl8812au.ko

CedS (tumeprendslechou) wrote :

Same problem for me on Ubuntu 16.04.3 with 4.10.0-37 generic kernel,
when following these steps, the wifi device is working, but it break at each kernel upgrade :


Waiting for a fix in the official repository :/

Ken Wagner (beaucoder) wrote :

Package will not successfully install: sudo apt install rtl8812au-dkms

Is there a workaround that does not require constantly re-installing after an upgrade?

Thank you.

Ken Wagner (beaucoder) wrote :

Followed https://blog.danielscrivano.com/installing-rtl8812au-on-linux-for-wireless-dual-band-usb-adapters/

sudo modprobe 8812au Does not work. Fatal error.

instead copy 8812au.ko to /lib/modules/4.10.0-38-generic
(On my computer).

Then it worked. Will keep an eye on it after updates and upgrades.



Same here on Ubuntu 16.04:

$ sudo apt-get install rtl8812au-dkms
Building for 4.10.0-40-generic and 4.10.0-42-generic
Building initial module for 4.10.0-40-generic
Error! Bad return status for module build on kernel: 4.10.0-40-generic (x86_64)
Consult /var/lib/dkms/rtl8812au/ for more information.

$ cat /var/lib/dkms/rtl8812au/ make.log for rtl8812au- for kernel 4.10.0-40-generic (x86_64)
Tue Dec 12 08:43:46 EST 2017
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.10.0-40-generic/build M=/var/lib/dkms/rtl8812au/ modules
# ...
/var/lib/dkms/rtl8812au/ In function ‘rtw_android_priv_cmd’:
/var/lib/dkms/rtl8812au/ error: implicit declaration of function ‘is_compat_task’ [-Werror=implicit-function-declaration]
  if (is_compat_task()) {
cc1: some warnings being treated as errors
scripts/Makefile.build:294: recipe for target '/var/lib/dkms/rtl8812au/' failed
make[2]: *** [/var/lib/dkms/rtl8812au/] Error 1
Makefile:1524: recipe for target '_module_/var/lib/dkms/rtl8812au/' failed
make[1]: *** [_module_/var/lib/dkms/rtl8812au/] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.10.0-40-generic'
Makefile:1459: recipe for target 'modules' failed
make: *** [modules] Error 2

$ uname -a
Linux dlogicvt 4.10.0-40-generic #44~16.04.1-Ubuntu SMP Thu Nov 9 15:37:44 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

$ sudo lsusb
Bus 003 Device 003: ID 0bda:a811 Realtek Semiconductor Corp.

Julio Lajara (ju2wheels) wrote :

Seems this broke again with the 4.13.0 HWE kernel on 16.04 . Now, in addition to the patch I described above for CONFIG_COMPAT, you also need the following patch to /usr/src/rtl8812au- :


        #include <linux/version.h>
        #include <linux/sched/signal.h>
        #include <linux/spinlock.h>

This patch includes a conditional for the kernel schedule signal headers for newer kernels. You can then follow the same steps at the end of my previous comment to recompile the driver.

Changed in rtl8812au (Ubuntu):
status: Confirmed → Triaged
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers