I’m trying to use a RealTek WiFi chip that doesn’t seem to be supported in the UC20 amd64 at least. it is working just fine on Classic, but not showing up on UC.
Here are the details:
$ lspci -v
[...]
01:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter
Subsystem: AzureWave RTL8821CE 802.11ac PCIe Wireless Network Adapter
Flags: bus master, fast devsel, latency 0, IRQ 130
I/O ports at 4000 [size=256]
Memory at 90100000 (64-bit, non-prefetchable) [size=64K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [148] Device Serial Number [redacted]
Capabilities: [158] Latency Tolerance Reporting
Capabilities: [160] L1 PM Substates
Capabilities: [170] Precision Time Measurement
Capabilities: [17c] Vendor Specific Information: ID=0003 Rev=1 Len=054 <?>
Kernel driver in use: rtw_8821ce
Kernel modules: rtw88_8821ce
[...]
Is there any way to easily enable this in your own disk image while still using Secure Boot?
Do you know if the module is in the 20/stable track of the pc-kernel snap? If not, that would be the first step is getting it included there. If it’s already there you can load it from an unconfined shell via modprobe. If you need to load the kernel module from a strictly confined snap, you can do so very soon with the very new and very shiny kernel-module-load interface (as opposed to the existing and deprecated kernel-module-observe interface). Docs for that interface should appear soon, but in the meantime you can take a look at the PR here: https://github.com/snapcore/snapd/pull/10977
The source for the kernel snap is actually just a Makefile which pulls in kernel debs. If you can figure out which debian package the module comes from on classic that may help in identifying what additional kernel debs might need to be added to the snapcraft.yaml Makefile to enable this.
Can you file a bug against the kernel at https://bugs.launchpad.net/ubuntu/+source/linux/+filebug with this information? (that the kernel module is not included in the 20/ track kernel snap but is available in linux-modules-extra). If the bot says you need to attach logs, just ignore it and set the bug back to New
Hi, are there any instructions on how to actually build it - the same version UC 20 uses?
I cloned the kernel for focal from launchpad.
Snapcraft.yaml seems incomplete - it’s missing build-base, version comes from CI I guess, I am not sure what branch is used for stable releases.
After I added build-base I can’t build it with the following error anyhow:
@ogra I had a chat with @ondra about this earlier this week. His concern with side-loading a module like this is that it could a situation where the kernel updates, but the module hasn’t been updated (since it’s part of the snap) thus causing the device to lose connectivity.
Ok, I cloned it and put it to focal/snap/plugins. Am I doing something completely wrong?
❯ snapcraft snap --destructive-mode
Loaded local plugin for kernel
The plugin used by part ‘kernel’ does not support snaps using base ‘core20’.
Just for test, I set the base to core18:
❯ snapcraft snap --destructive-mode
Loaded local plugin for kernel
Err linux-firmware_1.190.6_all.deb
404 Not Found [IP: 213.180.204.183 80]
Fetched 0 B in 0s (0 B/s)
Package fetch error: The item ‘/home/sergey/.cache/snapcraft/download/linux-firmware_1.190.6_all.deb’ could not be fetched: 404 Not Found [IP: 213.180.204.183 80]
Just a followup, kernel-module-load will be available starting in snapd 2.54, you can see docs published here: The kernel-module-load interface (eventually that will be published on snapcraft.io/docs soon too)
This one has the snap that’s just installing packages.
I was able to make a snap just few days ago out of that.
Now it also fails after a new commit was pushed updating kernel version.
apt-get download linux-firmware wireless-regdb linux-image-uc20-efi-generic linux-image-5.4.0-97-generic linux-modules-5.4.0-97-generic
E: Unable to locate package linux-image-5.4.0-97-generic
E: Couldn't find any package by glob 'linux-image-5.4.0-97-generic'
E: Couldn't find any package by regex 'linux-image-5.4.0-97-generic'
E: Can't select candidate version from package linux-modules-5.4.0-97-generic as it has no candidate
make: *** [Makefile.efi:33: prepare-kernel] Error 100
Running with --debug I do see that indeed this package does not exist. I guess it comes from here:
http://ftpmaster.internal/ubuntu.
So I tried downgrading. Also does not work.
KIMGVER=$(apt-cache show linux-image-uc20-efi-generic | sed -n -e 's/^Version: \([^+]*\)\(+.*\)\?/\1/p'|sort -V|tail -1); \
echo "KIMGVER: $KIMGVER"; \
test -n "$KIMGVER" || ( echo "Unable to extract KIMGVER, exit"; false; ); \
if [ "$KIMGVER" != "5.4.0-96.109.1" ]; then \
echo "Version mismatch:\nInstalled: $KIMGVER Requested: 5.4.0-96.109.1"; \
false; \
fi
KIMGVER: 5.4.0-97.110.1
Version mismatch:
Installed: 5.4.0-97.110.1 Requested: 5.4.0-96.109.1
make: *** [Makefile.efi:53: version-check] Error 1
Failed to build 'kernel'.
Anyone I can ping for help here? Very not obvious how to fix this.