Fedora Silverblue - adding drivers

I need to add a usb wifi dongle driver to Silverblue.
I installed dkms with rpm-ostree install command so that package is layered in.
Deployments:
● ostree://fedora:fedora/34/x86_64/silverblue
Version: 34.20210504.0 (2021-05-04T00:43:26Z)
BaseCommit: d56fda77a95eed03e7776238a1b580e7c68386a93598b52d51040f39f1d42e8b
GPGSignature: Valid signature by 8C5BA6990BDB26E19F2A1A801161AE6945719A39
LayeredPackages: dkms gnome-tweak-tool
LocalPackages: rpmfusion-nonfree-release-34-1.noarch
google-chrome-stable-90.0.4430.93-1.x86_64
rpmfusion-free-release-34-1.noarch

ostree://fedora:fedora/34/x86_64/silverblue
Version: 34.20210504.0 (2021-05-04T00:43:26Z)
BaseCommit: d56fda77a95eed03e7776238a1b580e7c68386a93598b52d51040f39f1d42e8b
GPGSignature: Valid signature by 8C5BA6990BDB26E19F2A1A801161AE6945719A39
LayeredPackages: gnome-tweak-tool
LocalPackages: rpmfusion-nonfree-release-34-1.noarch
google-chrome-stable-90.0.4430.93-1.x86_64
rpmfusion-free-release-34-1.noarch

Now the readme instructions for the driver install:

DKMS installation

cd rtl88x2bu
VER=$(sed -n 's/\PACKAGE_VERSION="\(.*\)"/\1/p' dkms.conf)
sudo rsync -rvhP ./ /usr/src/rtl88x2bu-${VER}
sudo dkms add -m rtl88x2bu -v ${VER}
sudo dkms build -m rtl88x2bu -v ${VER}
sudo dkms install -m rtl88x2bu -v ${VER}
sudo modprobe 88x2bu

shell output

[nebula@fedora rtl88x2bu-5.6.1_30362.20181109_COEX20180928-6a6a]$ VER=$(sed -n ‘s/\PACKAGE_VERSION=“(.*)”/\1/p’ dkms.conf)
[nebula@fedora rtl88x2bu-5.6.1_30362.20181109_COEX20180928-6a6a]$ sudo rsync -rvhP ./ /usr/src/rtl88x2bu-${VER}
sending incremental file list
rsync: [Receiver] mkdir “/usr/src/rtl88x2bu-5.6.1” failed: Read-only file system (30)
rsync error: error in file IO (code 11) at main.c(784) [Receiver=3.2.3]

Fair enough… If I rebase silverblue to fedora34 do the driver install then rebase back to silverblue will that work? If it doesn’t how would we add the drivers via a toolbox because from the toolbox container I can’t access dkms.conf or build the /usr/src directories?

1 Like

To my knowledge dkms is not currently supported on silverblue. You could maybe do something like this, but that would take a lot of effort.

the question isn’t about dkms. the question is how to install drivers with silverblue.

I got dkms working in a toolbox but how do I get the drivers in to the bluesilver image.

I have not found good documentation for Fedora either. Anyone know of a good doc source?

If the drivers are not in the upstream kernel or are not available as an RPM package, it is currently almost if not impossible to install any 3rd party drivers due to the read-only file system of SIlverblue.

Since silverblue is still “emerging” its documentation admittedly needs a lot of work, but people are slowly getting that done.

Well that’s a problem then, realtek 802.11AC devices are not rare and not supported by silverblue out of box (fedora and silverblue are not alone in this.)

I did run in to several issues with DKMS in the toolbox, it seems all the dependencies are not installed with the rpm as I had to install several kernel rpms to get it working. then reinstall kernel-dev. I still had to manually build dkms.conf file to get the driver installed in the toolbox. None of this is documented. I am thinking I could make the toolbox an rpm and list as an additional repository for silverblue then install but not sure how to accomplish this.

I have bounced around so much looking for info and trying things I would have to remove the toolbox and recreate from scratch documenting each step to get something comprehensible to submit as a doc addition.

here is the dkms.conf file for the current driver I am working on if anybody is interested.

PACKAGE_NAME=“rtl88x2bu”
PACKAGE_VERSION=“5.6.1”
MAKE[0]=“make KVER=$kernelver src=$source_tree/rtl88x2bu-$PACKAGE_VERSION”
CLEAN=“make clean”
BUILT_MODULE_NAME[0]=“88x2bu”
DEST_MODULE_LOCATION[0]=“/kernel/drivers/net”
AUTOINSTALL=“yes”

I see why you are saying building a driver with a toolbox is not possible at this time. For some reason the toolbox containers don’t support a container with systemd. Someone on the toolbox dev team needs to take a look at podman source and see how to implement running systemd with SB toolbox containers. Podman supports containers running systemd.

Could systemd be run in a toolbox with toolbox run --container NAME systemd?

I removed dkms pkg from os-tree, dkms on SB os-tree is pointless.

Is there any hope of this situation changing?

I’m having the same problem with my realtek 802.11ax (8852AE) driver which isn’t in any repo yet as far as I know. The instructions require applying the changes to your installed kernel

I really hope the situation changes soon, as I doubt the drivers will make it into mainline in time to be shipped with the f35 beta. Filed a couple of tickets but doubt they will see any movement