Need to install RealTek RTL8812AU driver for Ubuntu Core 16

Need to install RealTek RTL8812AU driver for Ubuntu Core 16. Basically my current wifi adaptor is not giving the required speed, so I procurred a USB dongle which support Ubuntu 16.04, however the procedure given in the manual is not working in Ubuntu Core. How do I proceed.

Also I believe I need to disable my current wlan0 adaptor

i fear anything using a dkms module will not really work on Ubuntu Core (the rootfs is readonly as well as the kernel and module locations on disk) … you could indeed roll your own kernel snap and pre-include the dkms built module, but if you want to avoid any hassle return the wlan stick and get one that has actually a driver in the kernel already

@ogra : I cannot revert this as the already integrated WLAN card is not giving me the required speed. Hence I need to get this installed.

@jalim : I see that you have also installed these drivers in ubuntu core 2 years ago. An instruction for the same would be much appreciated. Please note that I already have an integrated wifi card installed in the system. Do I need to disable that first to make this USB dongle work.

I did not say you should revert to your internal card but that you should use a usb card with a supported chipset (the modules should be the same across all arches so ignore the fact that this is armhf):

$ find /snap/pi-kernel/current/lib/modules/5.3.0-1028-raspi2/kernel/drivers/net/wireless/ -name '*usb*'
/snap/pi-kernel/current/lib/modules/5.3.0-1028-raspi2/kernel/drivers/net/wireless/ath/ath10k/ath10k_usb.ko
/snap/pi-kernel/current/lib/modules/5.3.0-1028-raspi2/kernel/drivers/net/wireless/ath/ath6kl/ath6kl_usb.ko
/snap/pi-kernel/current/lib/modules/5.3.0-1028-raspi2/kernel/drivers/net/wireless/atmel/at76c50x-usb.ko
/snap/pi-kernel/current/lib/modules/5.3.0-1028-raspi2/kernel/drivers/net/wireless/intersil/p54/p54usb.ko
/snap/pi-kernel/current/lib/modules/5.3.0-1028-raspi2/kernel/drivers/net/wireless/marvell/libertas/usb8xxx.ko
/snap/pi-kernel/current/lib/modules/5.3.0-1028-raspi2/kernel/drivers/net/wireless/marvell/libertas_tf/libertas_tf_usb.ko
/snap/pi-kernel/current/lib/modules/5.3.0-1028-raspi2/kernel/drivers/net/wireless/marvell/mwifiex/mwifiex_usb.ko
/snap/pi-kernel/current/lib/modules/5.3.0-1028-raspi2/kernel/drivers/net/wireless/mediatek/mt76/mt76-usb.ko
/snap/pi-kernel/current/lib/modules/5.3.0-1028-raspi2/kernel/drivers/net/wireless/mediatek/mt76/mt76x02-usb.ko
/snap/pi-kernel/current/lib/modules/5.3.0-1028-raspi2/kernel/drivers/net/wireless/ralink/rt2x00/rt2500usb.ko
/snap/pi-kernel/current/lib/modules/5.3.0-1028-raspi2/kernel/drivers/net/wireless/ralink/rt2x00/rt2800usb.ko
/snap/pi-kernel/current/lib/modules/5.3.0-1028-raspi2/kernel/drivers/net/wireless/ralink/rt2x00/rt2x00usb.ko
/snap/pi-kernel/current/lib/modules/5.3.0-1028-raspi2/kernel/drivers/net/wireless/ralink/rt2x00/rt73usb.ko
/snap/pi-kernel/current/lib/modules/5.3.0-1028-raspi2/kernel/drivers/net/wireless/realtek/rtlwifi/rtl_usb.ko
/snap/pi-kernel/current/lib/modules/5.3.0-1028-raspi2/kernel/drivers/net/wireless/rsi/rsi_usb.ko

if you do not want to maintain your own kernel snap (in which you run the dkms build during snap creation time), the alternative would be to have a driver snap that you need to keep fully in sync with the existing kernel snap (i.e. if your kernel updates before the snap you will have no more network access) …

for both solutions you need a brand store (non-canonical kernel snaps are only allowed in brand stores, and for the second solution you need the kernel-module-control interface which is also taboo in the global store)

@ogra : How do I create my own kernel snap (in which you run the dkms build during snap creation time)

here is an example where i re-build an ubuntu kernel source tree:

you’d have to add a part doing the dkms build (or any other way to build the module (i’d actually go with upstream build instructions instead of dkms here)) and use the after: [kernel] keyword to make sure the kernel headers get staged so your module build can make use of them … you might need to adjust the build environment and re-call depmod from an override-prime: snippet …

EDIT: i just remembered that i have a better example where i include an out of tree module:

(note that this build does currently not work but this is unrelated to the xradio driver that gets added there)

@ogra: I have installed a fresh Ubuntu VM with 16.04.6 LTS. I have installed dkms package on it. Installed snapcraft and multipass as well. I have also downloaded the rtl8812au-dkms.deb file locally to the VM. Below are the contents of my snapcraft file:

name: Ubuntu-rtl8812au
base: core16
version: 0.1
adopt-info: kernel
summary: The Ubuntu generic Linux kernel for EdgeGateway
description: |
This Ubuntu generic Linux kernel for EdgeGateway

grade: stable
confinement: strict
type: kernel

architectures:

  • build-on: amd64
    run-on: amd64

parts:
firmware:
plugin: nil
source: rtl8812au-dkms.deb
source-depth: 1
override-build: |

Will the above work for me

no, you first of all need a kernel part indeed … then that kernel part needs to have built so the headers exist and are configured correctly. your out of tree driver should then be implemented in a part similar to the xradio-driver above …

i’m not sure how exactly you would have to tweak the setup of dkms to actually work in this context, i’d use the upstream source of the driver instead of the dkms deb. and just call make modules with similar options the xradio-driver example above uses.

also, one hint … wrap your pastes in three backticks like:

```  
foo:
  bar:
    baz:
      - opt1
      - opt2
```

then the yaml indendation stays readable for the rest of us …

@ogra: I am struggling in this. I will rather return the current USB and order another USB dongle which is just plug and play on my system. The system in which I am trying to install the USB dongle is Dell Edgegateway 3003 and it is having Ubuntu Core 16 installed. Do you have any recommendation USB dongle which supports 2.4 ghz and 5 ghz.

@ogra: just to add on. Below are the files which I see, not sure if I am looking at the right place:

image

try getting something like a d-link dwa160, a TP-link TL-WDN3200 or an asus usb-53 …

the 4.4 kernel from core16 is sadly rather old so dualband WLAN USB adapters (assuming you want/need 5GHz since you complained about speed) that it supports OOTB will be a bit older and possibly harder to get.

Was going thru these in the internet. Could not find ubuntu drivers for it. Also is Ubuntu Core already having drivers of these installed. If yes, where can I look for the same.

Linux drivers are typically “by chipset” not actually by the product names the marketing gives the devices … to find the usb wlan drivers i gave you a line in one of the above posts … here it is again:

find /snap/pi-kernel/current/lib/modules/$(uname -r)/kernel/drivers/net/wireless/ -name '*usb*'

for finding the mapping to actual hardware you will probably have to do some googling and research … the three devices i listed above in my last post are (to my knowledge) known to work with 4.4. though …

@ogra: I executed the command which you gave me. The output is no such file or directory

well, replace pi-kernel with pc-kernel (or however your kernel snap is called)

EDIT: here is an updated version of the command:

find /snap/$(snap list |grep kernel|sed 's/ .*$//')/current/lib/modules/$(uname -r)/kernel/drivers/net/wireless/ -name '*usb*'

@ogra: Now the command works. Below is the output

image

right, now find a card using one of these drivers and you are good … as i said, you will surely need to do some research

Ogra,

I have Core 18 installed on a RPI4 Compute Module. I need an updated pi-kernel snap in order to use the RTC on the RPI4 Compute Module IOBoard. The Raspberry Pi OS kernel has been updated to use the new part. Here is link with that information.

Should I follow your directions and build my own pi-kernel snap or will the pi-kernel snap from Canonical be updated to match the kernel from Raspberry Pi OS? Basically I’m asking if pi-kernel will be updated similar to the Raspberrry Pi OS kernel in the near future?

it will most likely … @waveform knows probably more …

EDIT: note that UC18 might not get all the necessary patches backported, you might need to use UC20 (with the 5.4 kernel) for hardware that came out that far after UC18 was released…

Hi,

I installed the device driver in a seperate system having the normal ubuntu operating system however having the same kernel.

Then manually copied the driver file to the ubuntu core system and then executed it by running the insmod command to make it work.

Regards

Gurpreet Singh