Error during driver installation. latent_entropy undeclared. rtl8812au

Hi all!

Help me please. I will be very grateful.
English not my native, so excuse me…

I’m running the last version of Qubes. 4.0.3.
It has Fedora templateVM version 30.

The problem is that when I try to install the driver on the Wi-Fi adapter with chipset rtl8812au in my fedora templateVM, i face the error.
I read all the topics in ask.fedora with 8812au install-how-to.
I try to use make, i try to use dkms. And most often
the same error: latent_entropy undeclared

By the way i try all versions of drivers from this

/gnab/rtl8812au
/kimocoder/rtl8812au

when i try “make” it says me:

bash-5.0# make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.19.94-1.pvops.qubes.x86_64/build M=/home/user/Documents/all/rtl8812au-5.6.4.2/rtl8812au-5.6.4.2 modules
make[1]: Entering directory ‘/usr/lib/modules/4.19.94-1.pvops.qubes.x86_64/build’
CC [M] /home/user/Documents/all/rtl8812au-5.6.4.2/rtl8812au-5.6.4.2/core/rtw_cmd.o
In file included from ./include/linux/net.h:22,
from ./include/linux/skbuff.h:29,
from ./include/linux/if_ether.h:23,
from ./include/uapi/linux/ethtool.h:19,
from ./include/linux/ethtool.h:18,
from ./include/linux/netdevice.h:41,
from /home/user/Documents/all/rtl8812au-5.6.4.2/rtl8812au-5.6.4.2/include/osdep_service_linux.h:30,
from /home/user/Documents/all/rtl8812au-5.6.4.2/rtl8812au-5.6.4.2/include/osdep_service.h:54,
from /home/user/Documents/all/rtl8812au-5.6.4.2/rtl8812au-5.6.4.2/include/drv_types.h:26,
from /home/user/Documents/all/rtl8812au-5.6.4.2/rtl8812au-5.6.4.2/core/rtw_cmd.c:17:
./include/linux/random.h: In function add_latent_entropy:
./include/linux/random.h:26:39: error: latent_entropy undeclared (first use in this function); did you mean add_latent_entropy?
26 | add_device_randomness((const void *)&latent_entropy,
| ^~~~~~~~~~~~~~
| add_latent_entropy
./include/linux/random.h:26:39: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [scripts/Makefile.build:304: /home/user/Documents/all/rtl8812au-5.6.4.2/rtl8812au-5.6.4.2/core/rtw_cmd.o] Error 1
make[1]: *** [Makefile:1522: module/home/user/Documents/all/rtl8812au-5.6.4.2/rtl8812au-5.6.4.2] Error 2
make[1]: Leaving directory ‘/usr/lib/modules/4.19.94-1.pvops.qubes.x86_64/build’
make: *** [Makefile:2219: modules] Error 2

And when i’m running dkms it says:

DKMS make.log for rtl8812au-5.6.4.2 for kernel 4.19.94-1.pvops.qubes.x86_64 (x86_64)
Fri May 22 16:38:10 GMT 2020
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.19.94-1.pvops.qubes.x86_64/build M=/var/lib/dkms/rtl8812au/5.6.4.2/build modules
make[1]: Entering directory ‘/usr/lib/modules/4.19.94-1.pvops.qubes.x86_64/build’
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
In file included from ./include/linux/net.h:22,
from ./include/linux/skbuff.h:29,
from ./include/linux/if_ether.h:23,
from ./include/uapi/linux/ethtool.h:19,
from ./include/linux/ethtool.h:18,
from ./include/linux/netdevice.h:41,
from /var/lib/dkms/rtl8812au/5.6.4.2/build/include/osdep_service_linux.h:34,
from /var/lib/dkms/rtl8812au/5.6.4.2/build/include/osdep_service.h:58,
from /var/lib/dkms/rtl8812au/5.6.4.2/build/include/drv_types.h:26,
from /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_security.c:17:
./include/linux/random.h: In function add_latent_entropy:
./include/linux/random.h:26:39: error: latent_entropy undeclared (first use in this function); did you mean add_latent_entropy?
26 | add_device_randomness((const void *)&latent_entropy,
| ^~~~~~~~~~~~~~
| add_latent_entropy
./include/linux/random.h:26:39: note: each undeclared identifier is reported only once for each function it appears in
In file included from ./include/linux/net.h:22,
from ./include/linux/skbuff.h:29,
from ./include/linux/if_ether.h:23,
from ./include/uapi/linux/ethtool.h:19,
from ./include/linux/ethtool.h:18,
from ./include/linux/netdevice.h:41,
from /var/lib/dkms/rtl8812au/5.6.4.2/build/include/osdep_service_linux.h:34,
from /var/lib/dkms/rtl8812au/5.6.4.2/build/include/osdep_service.h:58,
from /var/lib/dkms/rtl8812au/5.6.4.2/build/include/drv_types.h:26,
from /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_cmd.c:17:
./include/linux/random.h: In function add_latent_entropy:
./include/linux/random.h:26:39: error: latent_entropy undeclared (first use in this function); did you mean add_latent_entropy?
26 | add_device_randomness((const void *)&latent_entropy,
| ^~~~~~~~~~~~~~
| add_latent_entropy
./include/linux/random.h:26:39: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [scripts/Makefile.build:303: /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_security.o] Error 1
make[2]: *** Waiting for unfinished jobs…
make[2]: *** [scripts/Makefile.build:303: /var/lib/dkms/rtl8812au/5.6.4.2/build/core/rtw_cmd.o] Error 1
make[1]: *** [Makefile:1522: module/var/lib/dkms/rtl8812au/5.6.4.2/build] Error 2
make[1]: Leaving directory ‘/usr/lib/modules/4.19.94-1.pvops.qubes.x86_64/build’
make: *** [Makefile:2245: modules] Error 2

So, its is just an example with version 5.6… but i try it all. 5.1.5, 4.3.21 and so on. Also i try all the instructions, like install from /usr/src/ and so on again.

I dont need frame injection and monitor mode, just need wi-fi connetion.

And thank you for your help a lot!

Maybe someone knows where it is possible to write about it?

You should probably contact Qubes (or aircrack-ng) upstream, a similar error has already been reported:

My guess is that this patch is not included in whatever you are using.

Thanks a lot for your help! I already despaired to wait for the answer :frowning:

On the proposed solutions:

  1. GitHub - QubesOS/qubes-issues: The Qubes OS Project issue tracker

Concerning the version of a kernel, I do rpm - qa | grep - i kernel. I checked the version of a kernel of my TemplateVM Fedora 30 - the version of a kernel is 5.3.16. So here mistakes cannot be as it seems to me. Drivers are perfectly installed on this version of a kernel in the Debian. Perhaps I not correctly understood “switch to distribution native kernel”. I understood it so: switch the version of a kernel to that for which this driver is written. If i understand it right, again its not a problem.

  1. Patch.

I really tried to find possibility to establish this patch, but my knowledge is obviously not enough for installation of a patch in a kernel and I am afraid to be mistaken and bring down a whole system. Could you help to understand what lines of this code and where I have to establish to make this patch worked?

Thank you again!

P.S. I once again would like to designate the purpose for which I want to install the driver, maybe it will help to find another solution for that purpose. My qubes netVM is based on Fedora 30 TemplateVM. I want my wifi card (rtl8812au) work on that netVM. Without any frame injection and monitor mode, so it can be another version of driver, except what I tried to establish above.

I seem understood where is a problem. If to look at the first lines of installation, there it is visible that the module (as it seems to me) is driver installed on is old version of a kernel.

make[1]: Entering directory ‘/usr/lib/modules/4.19.94-1.pvops.qubes.x86_64/build’

Then perhaps the option with change of a kernel with which is established the driver, will be the decision.

I will try though frankly speaking I am afraid to break everything. If someone has a decision how to change a kernel and dont break nothing, please help.

I don’t have any experience with Qubes, so I’m afraid I can’t be of assistance in this particular problem. If the issue is related to the kernel, kernel-devel and kernel-headers packages in your VM, I think you should be using something more recent than F30, given the age of the patch.

Ok, I will try to clone my TemplateVM Fedora and find the way to establish patch on it that you have given me.

Also I will try other decisions, I learn more detail about 4.19.94-1.pvops.qubes - perhaps problem in it.

Also I never connected my Qubes to the Internet, I will try to find opportunity to make connect without rtl8812au wifi card, and try to update system and perhaps change Kernel like you told me.

About everything I will write in more detail in couple of days. If it works, I will make manual. The problem is rather widespread.