I just wrote about a simple and straightforward way to bring KDE Plasma Desktop to a VirtualBox guest with FreeBSD. After a bunch of package installations and a bit of system-configuration tweaking – it can be condensed into two commands if you like – there’s a running KDE Plasma Desktop. This post examines some subsequent tweaks.

I mentioned “totally black screen after SDDM login”, that already had a FreeBSD PR, which I’ll tackle today.

I was asked if my installation had included the VirtualBox guest additions for FreeBSD. I didn’t mention them in my blog post, so no, I did not install them. Installing them is a real hazard to sanity and stability, though.

Installing VirtualBox Guest Additions

It’s simple enough, to install the additions and enable them:

pkg install virtualbox-ose-additions
sysrc vboxguest_enable="YES" vboxservice_enable="YES"

Then, for instance, reboot (you don’t have to, but those are short works-always instructions).

Not that video driver

VirtualBox error notification from Plasma
VirtualBox error notification from Plasma

With the system configured as described previously, it has VMSVGA as graphics controller and 3D Acceleration enabled. That works nicely before guest extensions, but the screen isn’t resizable, and is permanently stuck in 1024x768 mode. There might be an internal setting you can fiddle with. But after guest additions are installed, SDDM comes up as 800x600. Smaller than before! Um, ok.

Problems start when logging in:

  • a non-wheel user (e.g. a normal user not able to su root) can log in, but will be spammed to death with notifications that the guest additions do not work. Eventually, kwin will be overwhelmed by thousands of notifications and die.
  • a wheel user can log in from SDDM, and is greeted by the KDE Plasma splash screen, which then hangs after a couple of seconds. An ACPI shutdown can be used; the machine isn’t totally wedged, just the display is toast.

If we switch up the display configuration, using VBoxSVGA and no acceleration (but with the guest additions):

  • SDDM still comes up as 800x600
  • a non-wheel user still gets spammed to death, but the display is resizeable
  • a wheel user can log in and the display is resizable. If you pick View > Virtual Screen 1 and choose a size, this will be obeyed. Changing the window size (e.g. dragging a corner of the VirtualBox screen) can lead to performance issues at assets need to be re-rendered for 1121x999 screens or whatever weird-ass size you end up with. But once it’s settled down with a screen size, things are fine.

Takeaway

If you want a larger display (than 1024x768, and possibly resizeable) for KDE Plasma on FreeBSD in a VirtualBox:

  • you must add the users in the virtualbox to the wheel group
  • you must use VBoxSVGA as display adaptor.