Integrate Wifi driver rtl8821cu into EOS image?

I was wondering, is it possible to integrate another Wifi driver into the EndeavourOS live image? I have installed the system properly, and Wifi is working now, but I would like to have it also at present when using the live image as a repair system.
I know I can download and install it from this repository but for this I would need internet, which presents as a chicken/egg problem … I might download its contents and put the files on the boot stick, but then I’d have to compile it on every boot when I want internet connection.

Is there a possibilty the driver might be integrated into the official image in the near future? What would point against it?
If not, what is the best way to upgrade my own live image copy with this driver? Can I store the compiled module somewhere on the image (how / where)?

Yes, but it would need to be packaged. There are several 8821cu driver packages in the AUR, but there is not one that is the “best” as different versions work better for different hardware.

Why do you need to do that? You only install once?

The module must match the kernel version, so a pre-compiled module is unlikely to work in any given installer image.

You can prepare a driver package (e.g. rtl8821cu-dkms-git) and install the driver package from a USB disk (Ventoy’s setup works well here). Create the package, copy to the USB partition, install.

The usual options to avoid this are 1) buy hardware that has an in-kernel driver and 2) use an Ethernet cable (or USB tethering) to provide Internet access.


Thanks for the quick reply.
You are right, there are two versions of this driver (from two Github repos). I seem to have installed the older one (but directly from source as I was new to Arch/EOS), which is working well for this specific chipset. Might test the newer one too (rtl8821cu-morrownr-dkms-git).

As described above, the main purpose for me is having a live system available to boot up with internet access, in case of broken system or such (e.g. I needed to re-partition my installation). So it doesn’t need to be installed and can be an older OS version. I just want to have it handy. The best way of course would be if the driver is in the official image, but for this case it is sufficient to compile it myself.
(Also to answer your question: yes, in best case I never need to install on this specific computer again, just update the system over years :slight_smile: )

Thanks for the guide to prepare and install the driver package. I will try it tomorrow.

Yes I know, but going this way would never improve driver support, would it? :wink: I have an older WLAN stick (only Wi-Fi 4) that works out of the box – didn’t do this two years ago, so the driver situation improved here. Might as well be done for newer hardware, too.

Investing in a USB Ethernet adapter will be very worthwhile.

The way driver support improves is for drivers to be included in the mainline kernel, not by including them in one distro’s installation environment. :wink:

1 Like

You could use ventoy and copy the package to the USB drive, then it would be accessible.

1 Like

Thank you for giving me useful hints in the right direction. I read some documentation about how the AUR works, created my package and put it somewhere on the boot flash drive. It really doesn’t matter where, as all contents are available in /run/arch/bootmnt/ after booting.
I had a look at Ventoy, but simply copying the package was easier (in my case).

Just to give a quick summary to all who read this thread later:

  • download the AUR package (git clone URL) which contains the PKGBUILD
  • change into repository folder
  • makepkg --allsource creates a .tar.gz archive which can be used without further internet connection
  • copy the archive somewhere on the boot drive (see mount point above)
  • when booting from live image, unpack the archive, change to folder and install with makepkg -i
  • activate the driver (in this case) with sudo modprobe 8821cu

This is quite sufficient for me, as it only costs 2 or 3 min extra, but provides me with a 100% working WLAN connection, whenever I need to boot this live image.

You are right about driver support in the mainline kernel. This should be the way. It just seems that only few Realtek drivers will be added there, despite the amount of chipsets (and functioning drivers). Also some distributions ship with extra drivers. If nothing is necessary, but a driver to download any missing drivers … (and they are not big).

It doesn’t. :slight_smile: We talk about a desktop computer with a working and supported Realtek LAN port. I just don’t have the time nor the skill of installing 25m LAN cable through three rooms and along a lot of walls in my apartment to get a connection to my router … a Wi-Fi 5 stick is simply more convenient.

1 Like

OK, in which case a power line network adapter.

Oh, I didn’t think of that. Seems to be as good an alternative as using WLAN (comparable data rates). Both don’t hold quite against Ethernet cable, but are sufficient.

I’m happy with my current solution, gives me net data rate of ~150 MBit/s.

1 Like