I’m not even sure where to begin. The problem I encountered this week has been brewing for years. My desktop is running Ubuntu 18.04. That’s a pretty old release now, and it has finally started getting more difficult to install modern software. I became particularly aware of this when I wanted to try using Gamescope to force a native game to use AMD’s FSR, but there’s no reasonable way to build Gamescope on Ubuntu 18.04.
NOTE: Gamescope doesn’t work with the current NVidia driver, but it sounds like that will be changing in the near future.
How did I get here?!
I usually keep my machines updated to the new Ubuntu release every six months. Every now and then I fall a few months behind, and it is annoying to wind up upgrading twice in three months, but it usually isn’t a big deal.
Then I got busy and missed one entire upgrade. At that point, it just felt like it would make sense to wait for the next LTS at 20.04. When the time came around for that upgrade, things got busy. We had medical emergencies. There was a pandemic. I seemed to constantly have podcasts I needed to work on, and I didn’t want an update to goof me up in the middle of an edit.
Now here we are. Nearly four years after missing the 18.10 upgrade, and two years after missing the 20.04 upgrade. All my podcast interviews and Butter, What?! Show episodes are edited and uploaded, and my second SSD is failing.
Seems like a great time to move ahead!
Why I am installing from scratch?
I have been upgrading the installation on this machine since 2012. There’s a lot of cruft on here. I’ve gone through the switch from Upstart to systemd
. That seems to have left me in a weird spot where there’s a weird wait during boot while bringing up my 40-gigabit Infiniband network.
1 2 3 4 5 6 7 8 9 10 11 |
|
Those are good enough reason to start from scratch. I’m also on a quest to eliminate my reliance on my NAS. My plan is to stick a big, honking, slow hard drive behind a large lvmcache
in my desktop. I am leaving plenty room on my new 1 TB Samsung 980 NVME for that, but I’m not in a rush to get started on that project. I do have a spare 4 TB hard drive here, so I might experiment with this soon.
I know 4 TB isn’t exactly big or honking, but it’ll let give me an idea of what I can expect, and it is plenty big enough to store a year’s worth of video footage.
Why the Samsung 980 and not the Samsung 980 Pro or Samsung 980 EVO
This could be a blog post of its own! My inexpensive secondary SSD has been throwing errors and disappearing from the SATA bus. It happened once a few months ago, and it seemed to be a fluke. When it happened twice in one night, I went went shopping.
My desktop only has a PCIe 3.0 m.2 slot, and my Ryzen 1600 can’t properly manage to run LUKS encryption nearly fast enough to keep up with the pricier PCIe 4.0 NVME drives that can push more than 7 gigabytes per second. The drives my speed can be had for as little as $80 per terabyte.
The 1 TB NVME drives on sale that night were a Western Digital SN750, a Samsung 970 EVO, and my Samsung 980. The EVO was priced a bit higher, while the other two were nearly the same price.
I’ve had good luck with all my Samsung SSDs. It is rated for 600 TB of writes over its lifetime, and it has a 5-year warranty. These are all important, because this will be an lvmcache
and the boot drive of my primary workstation. I’d prefer that it not be likely to fail!
What really piqued my interest was that instead of having a DRAM cache, the Samsung 980 has a 48 GB cache of fast flash sitting in front of the really slow QLC flash.
48 GB worth of writes is A LOT. I expect that dropping down to the slow QLC write speeds will rarely happen to me.
Ubuntu 22.04 let me down twice
My failed SSD timing isn’t great. We are less than two weeks away from 22.04 entering beta, and not many more weeks from the release. I had to decide between installing 22.10 and upgrading in a few weeks, or just limping along with a potentially flaky distro for a bit. I chose the latter. This hasn’t been a problem.
I am fully aware that I am asking for some weird disk configuration. I would normally just set up a small /boot
partition and a single large LUKS encrypted partition for LVM to live on top of, but I don’t want my lvmcache
to be encrypted. The slow hard drive is going to be encrypted, so encrypting the cache would be wasting CPU cycles, and I can’t encrypt nearly as fast as the NVME as it is.
That means what I really want is an unencrypted LVM Physical Volume (PV) with one or more encrypted Logical Volumes (LV).
Ubuntu’s manual partition tool in the installer doesn’t seem to let you configure LVM at all. I scratched my head a bit, then decided to just install Ubuntu 22.04 to its own 200 GB partition.
When I got booted up, I tried to open Firefox and I got an input/output error. Weird. apt
said Firefox was installed, but it was telling me that it was a Snap. Even though apt
thought the Snap was installed, it really wasn’t. This was easy to fix, but I have to admit that I was a bit freaked out about one of my core pieces of software being a Snap.
Let’s try Debian!
When I started my Linux journey 25 or more years ago, I was using Slackware. I remember it literally taking all night to compile a kernel on my 386-40 with 4 MB of RAM, though that dropped to less than an hour when I upgraded to 8 MB! Then I used SuSE for a year or so before switching to Debian.
When Ubuntu came out, it was awesome. Sure, it is great that Ubuntu made things easier for the average user, but to me Ubuntu was Debian with a 6-month release cycle. At the time this was huge, because it felt like we were stuck with Debian Potato for 3 years.
Every few years, Ubuntu has been drifting farther and farther away from Debian. Some of this is good, some of it is bad, some of it just doesn’t matter. I’m not excited about software moving out of apt
and into Snaps. I completely understand why I would want to sandbox my web browser, but Snaps have been goofy for me in the past. They update on their own, and you have very little control over it.
Every few years, I think about switching back to Debian. Seeing Firefox in a Snap made me think it was really time.
I am having a hard time remembering exactly how the Debian installer was going to allow me to layer LUKS encryption and LVM, and I don’t have any evidence of the situation left to check on! I only remember that it wasn’t perfect, but I was doing better than the Ubuntu installer was allowing.
Memories of Debian Potato came flooding back to me!
It was easy to install the proprietary NVidia driver. Then I looked at copying over my Firefox profile. Debian Bullseye was a major version behind what I was running, so it wouldn’t import my Firefox profile. The common recommendation here seemed to be that I should try out the Flatpack Firefox. That worked, but I had to massage things a bit.
Then I noticed that obs-studio
in apt
was a major release behind. Flatpak seemed to be the right answer, but it took a bit of research to learn that you also have to install the NVidia OpenGL Flatpak that matches your driver. This seemed to work, except NVENC
video encoding doesn’t work.
Oh boy! That lead to a whole array of building blocks that are outdated on Debian Bullseye. Getting obs-studio
with NVENC
working on Debian sure looked like it would be a Herculean effort.
There were a handful of other minor problems, and I am pretty sure I would have exacerbated them all had I tried to build myself everything needed to get NVENC
working in obs-studio
.
Back to Ubuntu 22.04
I am writing this on Ubuntu 22.04. I’m not quite settled in. I don’t have everything moved over. I may still reboot my old Ubuntu install on my old SSD to play Velocidrone tonight. I am probably 75% of the way ready to go.
The latest Emacs packages are happy with my convoluted config with my handful of outdated and pinned packages. The Firefox Snap seems fine, and it happily imported my profile. Pidgin and my purple-hangouts
plugin seem happy. obs-studio
just works. Davinci Resolve Studio 17.4 is working beautifully so far.
I had to install an old libopenssl
package from a previous Ubuntu release to get my ancient rbenv
working for Octopress. This is almost definitely the wrong fix, but it let me create a template for this post, and I’m assuming it will let me publish this to the Internet.
My NVME isn’t divided up how I really want. I left a 300 GB partition free to use as lvmcache
, and Ubuntu is installed on a 600 GB LUKS partition with no LVM. This bums me out for a few reasons, but I am up and running, and it will do the job.
Why not something like Arch?
I am embarrassed to say that I thought about downloading Arch.
I dislike rolling releases. Sure, I caused myself some real headaches by locking myself down to Ubuntu 18.04 for so long, but I also saved myself a lot of frustration.
I don’t want to deal with a weird update on a random day keeping me from editing an interview. I want to be able to plan for some potential downtime for things like this. I’m in the middle of a few weeks of this sort of downtime right now!
Conclusion
I miss Debian, but running Debian on a workstation in 2022 sure looks like it would be challenging. Flatpaks and Snaps seems like a great solution, but when they need to interact with low-level things like NVENC
, they just fall short.
If you can make something work on one distro, you can probably make it work on any distro, but I need to foundation of my machine to be solid. I can’t go ripping out so much stuff just to get NVENC
to work, just like I wouldn’t want to rip out so much stuff on Ubuntu 18.04 just to get Gamescope going.
I will definitely be remembering this experience the next time I think about jumping ship back to Debian like it is still 2002!