Every computer user has an excellent opportunity to become a professional in the field. Computers have so many problems, you can find yourself becoming an expert technician simply by finding solutions to the multitude of issues plaguing you on any given day.
Once you regularly figure out these issues, friends and family start asking you for help. Eventually, with some luck, you solve computer problems day in, day out as a support technician, system administrator, or software developer.
There’s a long story explaining how I got from office receptionist to technical writer, but I’ll spare you that for now. Here at Notes from the Metaverse, I’ve spent a lot of time lately trying to solve the much bigger problem of how to make the internet a safer and more democratic space. Today, I want to share how I solved a much smaller problem: What went wrong with KDE Plasma on my openSUSE Tumbleweed virtual machine. This isn’t exactly a common problem, but it certainly perplexed me for weeks. If it happens to you, I can save you much time and anguish.
Fixing Tumbleweed in a VirtualBox
I run openSUSE Tumbleweed in a VirtualBox virtual machine as a testing system. Tumbleweed is a “rolling release” version of openSUSE Linux. The system updates several times a week with the latest software updates that pass smoke tests in the distribution. A smoke test installs the software package; if it doesn’t blow up the system, it’s included.
Users get the advantage of running the newest version of a package with a small sacrifice of some stability. Many people love this tradeoff, in part because they get a brand new system every few days! Putting the rolling release in a virtual machine gives me the added security that if something goes wrong, I can isolate it without risking something else on the physical machine.
At the new year, I thought I’d start fresh with a new base system. I deleted the existing Tumbleweed VM and installed a fresh version from the latest update. Two weeks later, I updated the system and rebooted the VM as requested.
I logged in, but my KDE Plasma desktop environment wouldn’t come up. I got a black screen that never went away. I shut down the VM with a VirtualBox command (File > Close > Issue the Shutdown command).
Hmm, maybe there’s a memory issue somewhere. The reboot completed normally. I tried loading one of the more lightweight desktops, LXQt, and it displayed just fine. I didn’t have time to work on this problem, so I left it to the next session.
Here’s the dumbest troubleshooting idea I had. Good thing I tried it first. Somehow I thought because KDE Plasma and LXQt came from the same code framework (the Qt environment), perhaps uninstalling LXQt would free up whatever was holding Plasma back. That didn’t work. I should not have been surprised.
Fortunately, Tumbleweed offers a multitude of desktop environments, and I could regularly get work done on these other desktops without addressing the underlying issue. Variety is my favorite thing about Linux.
That availability of desktop environments led to my next theory: Is Plasma the only DE having a problem? How did any other problem manifest itself? I logged in with nine different DEs: three Plasma flavors, three GNOME flavors, Openbox, SLE Classic and XFCE.
Whether one loaded Plasma in its default configuration for the X.org windowing system or under the Wayland protocol intended to replace X (plain or “full”), I never got out of the black screen.
Interestingly, GNOME loaded normally in all its forms (plain ordinary GNOME, on Xorg and Classic) and restarted normally too. So it definitely wasn’t a memory issue, as GNOME is the other “heavyweight” in this field. Both lightweight entries (Openbox and XFCE) had no trouble either. The exception was SLE Classic, the default desktop of SUSE Linux Enterprise. Yeah, that’s KDE too.
I also tested the Plasma flavors using different VirtualBox Graphics Controllers, hoping that changing this vBox setting would resolve the issue. Nope.
Progress! Errors to track down!
I continued updating Tumbleweed regularly. I hoped that installing the brand new Plasma 5.21 desktop would solve the problem, but those hopes were dashed.
At the end of February, I noticed a bunch of error messages were appearing in the update log, claiming that many Plasma-related systemd services (plasma-*.service) were “missing from /usr/lib/systemd/system.” Aha! Something I could check on! Plasma broke because these services weren’t loading!
Perhaps those services were missing because that directory had either disappeared or the services were going to some other directory. Off to the File Manager, where nothing seemed out of the ordinary in /usr/lib/systemd/system. A search for plasma-*.service didn’t turn up those files anywhere else.
While I was waiting for that search to complete, I had one more hope of quickly resolving the issue: reverting my system back to a working state. Because openSUSE uses the btrfs filesystem, you can go back in time to where Plasma was working normally. Off I went to YaST > Filesystem Snapshots (aka Snapper). I should have thought of that sooner, because there wasn’t a snapshot available except the initial install. I wasn’t ready to start over just yet.
Oh, but wait! Maybe I can uninstall/reinstall Plasma from YaST! When trying to uninstall the Plasma pattern in YaST, I noticed that it installed many more patterns that I wasn’t expecting to see.
Among them was the MicroOS pattern, another new spin on openSUSE. I tried uninstalling that and whatever other pattern that I didn’t think I wanted. Surely that was the problem, right? After upgrading 5372 packages while removing those patterns, no fixes for displaying Plasma.
Finally, a solution!
This week, I was going to try a complete reinstall again. I downloaded the latest snapshot, blew away the old setup, and created a new system one more time.
Went through the process, took screenshots of every page to include in the Tumbleweed documentation (did I mention that was one reason I keep this VM around? That’s another story.). Tried to save myself some time by importing my user account from the previous installation. Waited for the install to complete.
Same old problem. No error messages about systemd services. No interference from another desktop’s files. Back to the beginning.
Hmm. It’s a longshot, I’m thinking, but could there be a problem with the user account? Back to YaST. Yes, I know I can easily create a user from the command line, but I’m lazy. Off to YaST > User and Group Management. Click Add, add a name, username and password. Click OK. Reboot. Change the desktop environment to Plasma on the Login page and choose the new User. Type the password and click Login.
A minute later, the Plasma desktop loads as it should and always did. Hmm, wonder what was wrong with the old user? Clearly something. I write myself a note for the next login: “Will delete OldUser, possibly after checking for any useful files.”
The next day, I log in as the new user and check the Home directory of the old/bad user — and there’s the answer!
VirtualBox allows you to share directories between the Host OS and the Guest OS. I like to make sure I can access documents from any environment I’m in, so I share the Documents directory from the Windows 10 host to the Home directory of all my VMs.
When the Tumbleweed installer imported the user account from the previous installation, it tried to include all the files in Windows! But something went wrong in the sharing mechanism, and everything just hung. Not sure yet what Plasma did differently from the other desktops, but I’m going to look into that.
So after all this effort, I think I found a bug somewhere. Candidates include:
- The Tumbleweed installer/user importer
- Plasma’s file manager in VirtualBox
- VirtualBox’s Shared Folders mechanism
Will report further if I find out more. But I’m sleeping better now that I’ve solved this nagging problem. Now maybe I can decide once and for all if Tumbleweed is indeed my favorite openSUSE flavor!