Universal Blue to the rescue
The fact that you can rebase a whole operating system like source code is mind-blowing.
Yesterday, I had to perform some serious brain surgery to my Fedora Silverblue setups. Both on the laptop and on the desktop, the NVidia driver 535 had been rolled out and activated. Unfortunately, this upgrade dropped game performance to zero FPS.
While Silverblue doesn’t allow package downgrades, its concept of an immutable OS with versioned deployments provides a simple way of switching back to a prior state. In theory, you can just boot into an older deployment, and you’re good to go. My case was a bit more complicated, though.
You see, for reasons I still have to research, ostree
retains only two or three recent deployments (at least it only exposes that many to the sysadmin). Since the driver upgrade, I had performed a few manual package installations, which had made the deployment that still had the older driver drop out of the list. Because changes only take effect after a reboot, I didn’t notice the performance degradation until I had rebooted into the latest deployment.
For this reason, an rpm-ostree rollback
was not possible anymore. I could have prevented losing the last working deployment by pinning it, but I hadn’t thought of that.
It took me hours of research until I found a working solution in the form of Universal Blue, a set of customized OCI container images that you can use as the basis of a Fedora Silverblue deployment. They come in different flavours; there are versions for the Sway desktop, ones for KDE Plasma, and many more. Since I run the standard GNOME Silverblue distribution with i3 packages overlaid, I did an rpm-ostree rebase
on ublue-os/silverblue-nvidia:38-530
, which comes with the older 530 driver. All I had to do in preparation was removing my conflicting and now obsolete NVidia-related overlays. After another reboot, World of Warcraft was back to 60 FPS.
What rpm-ostree rebase
does is that it takes the current deployment and replaces it with the one you specify. Similar to a git rebase
, the new deployment will retain the customizations you made on top of the base layer. And since it only affects the OS part of your system, your home directory and all your applications will remain untouched.
If I wanted, I could also use rpm-ostree rebase
to switch to a different flavour of Silverblue within minutes, for example one with KDE Plasma installed instead of GNOME.
From now on, I’ll make it a habit to pin working deployments so I can always roll back. And I might very well switch to using UBlue images as my base distributions.