bluenote
Posts: 116
Joined: Thu Feb 05, 2015 8:25 am

RTL8812au driver used to compile, now doesn't?

Wed Feb 05, 2020 12:06 am

Hey folks

I have several RTL8811au dongles and they are 5ghz and work great for pi's that don't have their own wireless. This driver has always worked really well. However, it seems like every so often dkms breaks, and then I can't compile anymore. This is just my impression, because I haven't really caught it happening, I just know that sometimes I'll come back to the box and the wireless won't work anymore. This may or may not be after an update because sometimes I'm connected to ethernet. (Sorry, I know this is vague.)
This is the driver I use: https://github.com/aircrack-ng/rtl8812au

Here is my output:

Code: Select all

uname -r
4.19.93-v7+

pi@raspbiancn:~/rtl8812au $ sudo ./dkms-install.sh
About to run dkms install steps...

Creating symlink /var/lib/dkms/rtl8812au/5.6.4.2/source ->
                 /usr/src/rtl8812au-5.6.4.2

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
ARCH=arm 'make' -j4 KVER=4.19.93-v7+ KSRC=/lib/modules/4.19.93-v7+/build..........(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.19.93-v7+ (armv7l)
Consult /var/lib/dkms/rtl8812au/5.6.4.2/build/make.log for more information.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
ARCH=arm 'make' -j4 KVER=4.19.93-v7+ KSRC=/lib/modules/4.19.93-v7+/build.........................................................(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.19.93-v7+ (armv7l)
Consult /var/lib/dkms/rtl8812au/5.6.4.2/build/make.log for more information.
Finished running dkms install steps.

make.log:

DKMS make.log for rtl8812au-5.6.4.2 for kernel 4.19.93-v7+ (armv7l)
Tue 04 Feb 2020 03:59:36 PM PST
make ARCH=arm CROSS_COMPILE= -C /lib/modules/4.19.93-v7+/build M=/var/lib/dkms/rtl8812au/5.6.4.2/build  modules
make[1]: Entering directory '/usr/src/linux-headers-4.19.93-v7+'
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_cmd.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_security.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_debug.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_io.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_ioctl_query.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_ioctl_set.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_ieee80211.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_mlme.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_mlme_ext.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_mi.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_wlan_util.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_vht.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_pwrctrl.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_rf.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_chplan.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_recv.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_sta_mgt.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_ap.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/mesh/rtw_mesh.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/mesh/rtw_mesh_pathtbl.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/mesh/rtw_mesh_hwmp.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_xmit.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_p2p.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_rson.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_tdls.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_br_ext.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_iol.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_sreset.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_btcoex_wifionly.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_btcoex.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_beamforming.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_odm.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_rm.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_rm_fsm.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/core/efuse/rtw_efuse.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/os_dep/osdep_service.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/os_dep/linux/os_intfs.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/os_dep/linux/usb_intf.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/os_dep/linux/usb_ops_linux.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/os_dep/linux/ioctl_linux.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/os_dep/linux/xmit_linux.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/os_dep/linux/mlme_linux.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/os_dep/linux/recv_linux.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/os_dep/linux/ioctl_cfg80211.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/os_dep/linux/rtw_cfgvendor.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/os_dep/linux/wifi_regd.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/os_dep/linux/rtw_android.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/os_dep/linux/rtw_proc.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/os_dep/linux/rtw_rhashtable.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/os_dep/linux/ioctl_mp.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/hal/hal_intf.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/hal/hal_com.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/hal/hal_com_phycfg.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/hal/hal_phy.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/hal/hal_dm.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/hal/hal_dm_acs.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/hal/hal_btcoex_wifionly.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/hal/hal_btcoex.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/hal/hal_mp.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/hal/hal_mcc.o
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/hal/hal_hci/hal_usb.o
In file included from ./include/linux/srcutree.h:28,
                 from ./include/linux/srcu.h:62,
                 from ./include/linux/notifier.h:16,
                 from ./include/linux/memory_hotplug.h:7,
                 from ./include/linux/mmzone.h:748,
                 from ./include/linux/gfp.h:6,
                 from ./include/linux/umh.h:4,
                 from ./include/linux/kmod.h:22,
                 from ./include/linux/module.h:13,
                 from /var/lib/dkms/rtl8812au/5.6.4.2/build/include/basic_types.h:76,
                 from /var/lib/dkms/rtl8812au/5.6.4.2/build/include/drv_types.h:25,
                 from /var/lib/dkms/rtl8812au/5.6.4.2/build/hal/hal_hci/hal_usb.c:17:
./include/linux/completion.h: In function ‘__init_completion’:
./include/linux/completion.h:88:2: error: implicit declaration of function ‘inmt_waitqueue_head’; did you mean ‘init_waitqueue_head’? [-Werror=implicit-function-declaration]
  init_waitqueue_head(&x->wait);
  ^~~~~~~~~~~~~~~~~~~
  init_waitqueue_head
  CC [M]  /var/lib/dkms/rtl8812au/5.6.4.2/build/hal/led/hal_led.o
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:303: /var/lib/dkms/rtl8812au/5.6.4.2/build/hal/hal_hci/hal_usb.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:1522: _module_/var/lib/dkms/rtl8812au/5.6.4.2/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.19.93-v7+'
make: *** [Makefile:2246: modules] Error 2

I think what I've ended up doing in the past, is reimaging. But that gets very old. If somebody could tell me how to fix this that would be so appreciated.

Thanks!

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: RTL8812au driver used to compile, now doesn't?

Wed Feb 05, 2020 12:43 am

Interesting...

Code: Select all

make[1]: Entering directory '/usr/src/linux-headers-4.19.93-v7+'

Code: Select all

./include/linux/completion.h: In function ‘__init_completion’:
./include/linux/completion.h:88:2: error: implicit declaration of function ‘inmt_waitqueue_head’; did you mean ‘init_waitqueue_head’? [-Werror=implicit-function-declaration]
It certainly should be init_waitqueue_head and not inmt_waitqueue_head.

Would you mind pasting the contents of this file /usr/src/linux-headers-4.19.93-v7+/include/linux/completion.h?

bluenote
Posts: 116
Joined: Thu Feb 05, 2015 8:25 am

Re: RTL8812au driver used to compile, now doesn't?

Wed Feb 05, 2020 1:05 am

ktb wrote:
Wed Feb 05, 2020 12:43 am
Interesting...

Code: Select all

make[1]: Entering directory '/usr/src/linux-headers-4.19.93-v7+'

Code: Select all

./include/linux/completion.h: In function ‘__init_completion’:
./include/linux/completion.h:88:2: error: implicit declaration of function ‘inmt_waitqueue_head’; did you mean ‘init_waitqueue_head’? [-Werror=implicit-function-declaration]
It certainly should be init_waitqueue_head and not inmt_waitqueue_head.

Would you mind pasting the contents of this file /usr/src/linux-headers-4.19.93-v7+/include/linux/completion.h?
Sure. Here it is:
pi@raspbiancn:/var/lib/dkms/rtl8812au/5.6.4.2/build $ cat /usr/src/linux-headers-4.19.93-v7+/include/linux/completion.h
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LINUX_COMPLETION_H
#define __LINUX_COMPLETION_H

/*
* (C) Copyright 2001 Linus Torvalds
*
* Atomic wait-for-completion handler data structures.
* See kernel/sched/completion.c for details.
*/

#include <linux/wait.h>

/*
* struct completion - structure used to maintain state for a "completion"
*
* This is the opaque structure used to maintain the state for a "completion".
* Completions currently use a FIFO to queue threads that have to wait for
* the "completion" event.
*
* See also: complete(), wait_for_completion() (and friends _timeout,
* _interruptible, _interruptible_timeout, and _killable), init_completion(),
* reinit_completion(), and macros DECLARE_COMPLETION(),
* DECLARE_COMPLETION_ONSTACK().
*/
struct completion {
unsigned int done;
wait_queue_head_t wait;
};

#define init_completion_map(x, m) __init_completion(x)
#define init_completion(x) __init_completion(x)
static inline void complete_acquire(struct completion *x) {}
static inline void complete_release(struct completion *x) {}

#define COMPLETION_INITIALIZER(work) \
{ 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait) }

#define COMPLETION_INITIALIZER_ONSTACK_MAP(work, map) \
(*({ init_completion_map(&(work), &(map)); &(work); }))

#define COMPLETION_INITIALIZER_ONSTACK(work) \
(*({ init_completion(&work); &work; }))

/**
* DECLARE_COMPLETION - declare and initialize a completion structure
* @work: identifier for the completion structure
*
* This macro declares and initializes a completion structure. Generally used
* for static declarations. You should use the _ONSTACK variant for automatic
* variables.
*/
#define DECLARE_COMPLETION(work) \
struct completion work = COMPLETION_INITIALIZER(work)

/*
* Lockdep needs to run a non-constant initializer for on-stack
* completions - so we use the _ONSTACK() variant for those that
* are on the kernel stack:
*/
/**
* DECLARE_COMPLETION_ONSTACK - declare and initialize a completion structure
* @work: identifier for the completion structure
*
* This macro declares and initializes a completion structure on the kernel
* stack.
*/
#ifdef CONFIG_LOCKDEP
# define DECLARE_COMPLETION_ONSTACK(work) \
struct completion work = COMPLETION_INITIALIZER_ONSTACK(work)
# define DECLARE_COMPLETION_ONSTACK_MAP(work, map) \
struct completion work = COMPLETION_INITIALIZER_ONSTACK_MAP(work, map)
#else
# define DECLARE_COMPLETION_ONSTACK(work) DECLARE_COMPLETION(work)
# define DECLARE_COMPLETION_ONSTACK_MAP(work, map) DECLARE_COMPLETION(work)
#endif

/**
* init_completion - Initialize a dynamically allocated completion
* @x: pointer to completion structure that is to be initialized
*
* This inline function will initialize a dynamically created completion
* structure.
*/
static inline void __init_completion(struct completion *x)
{
x->done = 0;
init_waitqueue_head(&x->wait);
}

/**
* reinit_completion - reinitialize a completion structure
* @x: pointer to completion structure that is to be reinitialized
*
* This inline function should be used to reinitialize a completion structure so it can
* be reused. This is especially important after complete_all() is used.
*/
static inline void reinit_completion(struct completion *x)
{
x->done = 0;
}

extern void wait_for_completion(struct completion *);
extern void wait_for_completion_io(struct completion *);
extern int wait_for_completion_interruptible(struct completion *x);
extern int wait_for_completion_killable(struct completion *x);
extern unsigned long wait_for_completion_timeout(struct completion *x,
unsigned long timeout);
extern unsigned long wait_for_completion_io_timeout(struct completion *x,
unsigned long timeout);
extern long wait_for_completion_interruptible_timeout(
struct completion *x, unsigned long timeout);
extern long wait_for_completion_killable_timeout(
struct completion *x, unsigned long timeout);
extern bool try_wait_for_completion(struct completion *x);
extern bool completion_done(struct completion *x);

extern void complete(struct completion *);
extern void complete_all(struct completion *);

#endif

bluenote
Posts: 116
Joined: Thu Feb 05, 2015 8:25 am

Re: RTL8812au driver used to compile, now doesn't?

Wed Feb 05, 2020 1:16 am

Whoa. Thank you so much. So, this was caused ?!?!?!?!? by too high of an overclock. Reliably! That's _really_ weird!
I am slightly slower but actually functional now :)
Thanks so much!

Return to “Troubleshooting”