Some notes on the – thusfar unsuccessful – work towards getting a full KDE-on-FreeBSD environment working on the Slimbook Base14. tl;dr version: “driver issues”.

My First Slimbook

Two-and-a-half years ago, I got a KDE Slimbook, and it was an excellent machine – price-competitive with similar hardware, but supporting the Free Software world. I think it came with KDE neon pre-installed, but it has run many other things in the meantime.

This Christmas, my son’s second-hand Dell laptop power brick exploded (the battery was already dead) and so there was one obvious solution: get myself a new Slimbook, and hand down the KDE Slimbook to him. So he now has my Gitlab diversity sticker, and a nopetopus, and a KDE neon installation on a fine – but somewhat battered looking – laptop.

I have a new shiny thing, the Slimbook Base 14. Again, price-competitive, Free Software positive, and a nice shiny machine. It has a Purr sticker and also a Run BSD sticker, openSUSE and adopteunchaton. Cats seem to be the thing for this laptop.

openSUSE on Slimbook Base14

At FOSDEM I presented KDE on FreeBSD from this laptop, except it was running openSUSE at the time. It still does, most of the time, since I have not yet gotten FreeBSD to run really usefully on it. Here’s a screenshot from openSUSE, and my notes on how far I’ve gotten.

I’d like to say thanks to the Slimbook folks for being supportive while I’m figuring things out. FreeBSD laptops are a bit of a niche thing, and having more of them is good for Free Software, but probably not a huge untapped market.

Hardware notes

  • I got the Base 14 because it’s the same size as the original KDE Slimbook, which fits well on the tray table in a Dutch train (not that that is relevant during lockdown). It’s a 4C/8T 10th generation i5, although at a slow-ish 1.6GHz (thermals, I guess). Main memory of 16GB make it a capable developer machine.
  • Battery life looks like 3 hours (with a re-installed Tumbleweed) which isn’t great, so it’s less of a road-warrior device than the older Slimbook. I may have to tweak power controls more.
  • Unlike the KDE Slimbook, this has a full-size HDMI and a full-size RJ45 connector, so it’s a bit easier to get connected to the world.
  • There’s room for internal expansion – probably depending on the configuration you order, but mine can physically fit another memory module and a SATA SSD. There’s that pesky screw under the “void your warranty here” sticker.
  • Slimbook upgraded the wireless to an Intel 9560 on my order for free. It gets reported as an AC9462 in lots of tools, but the card has PCI device ID 0x02f0, which means it’s .. well, a 9462 and not clear whether the 9000 or the 22000 series Linux code supports it, and FreeBSD doesn’t recognize it at all.

How to Break Stuff

  • On power-up, when the Slimbook logo appears on-screen, hit F2 to get to the UEFI interface. You’ll need that to boot from USB, which by default happens after the installed NVMe disk. I changed the power-on timeout to 10 seconds because I don’t cold-boot often, but when I do it’s because I need to do something complicated.
  • I reinstalled openSUSE Tumbleweed on the machine, replacing the one it came with. I left 130GB free on the disk, so my partitioning looked like this (from parted(8) in openSUSE:
    Number  Start   End    Size    File system     Name  Flags
     1      1049kB  525MB  524MB   fat16                 boot, esp
     2      525MB   108GB  108GB   ext4
     3      248GB   250GB  2148MB  linux-swap(v1)        swap
    

    You may note that I don’t use modern Linux filesystems (btrfs). In this setup, simplicity and interoperability is more important than modern features. I do wonder if multiboot ZFS could be a thing.

  • Several attempts to install FreeBSD with 13-CURRENT and 12.0 memory sticks failed. I didn’t write down what went wrong, though I remember the bootloader not installing, or EFI partitions not being found. It was a mess, which is why I ended up with a freshly-reinstalled openSUSE and vague hope that the FreeBSD Devsummit before FOSDEM would help.
  • At the devsummit, I borrowed a 12.1 installer (regular memstick image) and that did install. I picked UFS because I’m not really comfortable putting ZFS on a partition, and wrestling with the partitioning section of bsdinstall is anyway not my idea of fun.
  • The partitioner tells me I need an EFI partition, and adds a 200MB partition to the table – even though there is already one there, from the Linux installation. I deleted the “new” one before continuing.
  • FreeBSD 12.1 installs just fine, and I ended up with this partitioning (again, with parted(8) from openSUSE):
    Number  Start   End    Size    File system     Name  Flags
     1      1049kB  525MB  524MB   fat16                 boot, esp
     2      525MB   108GB  108GB   ext4
     5      109GB   141GB  32.0GB                  root
     3      248GB   250GB  2148MB  linux-swap(v1)        swap
    

13-CURRENT

I just built r359804, FreeBSD-CURRENT, on the laptop itself. NFS mounted /usr/src over 1GbE to my NAS, and kicked off make -j4 buildworld && make -j4 buildkernel. It started at 13:21 today, and ran until 16:49. Keep in mind that this rebuilds the entire operating system from the ground up, including Clang/LLVM, and over NFS.

The fans run fast, and I kept the machine balanced on some pens for extra airflow; basically it churns away at things until it’s time to mergemaster -p -FU.

This is dmesg from starting this particular build. It finds most things, but .. (ignore the iwm messages, that’s from my attempt at bunging the wrong firmware onto the wifi card).

Usable as a Server

Without WiFi, the laptop is not very portable and sits attached to an ethernet cable on my desk.

The graphics is 10th-gen Intel iGPU, which is not yet supported by FreeBSD. There’s shared infrastructure between Linux and FreeBSD – basically, the Linux API has been implemented in the FreeBSD kernel and the graphics team periodically imports the “upstream” Linux modules. This is a case of not spending engineering effort duplicating things – manufacturers are willing to support Linux, so let’s ride those coattails.

Without graphics, the laptop doesn’t run a graphical desktop environment very well, so it sits on my desk attached to an ethernet cable, in text mode.

Suspend .. yes, this laptop can be suspended. For instance, running zzz as root does the job. Suspend is never an issue for FreeBSD. Resume on the other hand, is. Related to the graphics problem: after resume the screen never comes back on, even if I can ssh in.

Future Laptop Use?

The hardware issues I have with this laptop are just a matter of time. There’s work on the WiFi drivers going on in the FreeBSD wireless team, and desktop / graphics updates happen regularly. Where I can, I’m helping test or develop for the hardware I have. Kernel stuff isn’t really my cup of tea.

In the meantime, I’m using the laptop to experiment with Qt’s framebuffer support. You can run Qt applications outside of X11 and Wayland by using the framebuffer provided by the OS, if there is a QPA (Qt Platform Abstraction) for your system.

The Linux framebuffer QPA offers a lot of features; the FreeBSD one does graphics, and that’s it. Looking at the code, I see that it can use tslib, but that’s about touchscreens-as-event-sources. I fixed the library to build on FreeBSD, wrote a port for it, built Qt against it, and then realised that tslib in itself doesn’t provide keyboard or mouse input.

Calamares on Slimbook Base14

I’m working on that keyboard and mouse support. Now that FreeBSD has libinput and a BSD-shim to the Linux evdev API, (which it didn’t when the FreeBSD QPA was written), I can probably just duplicate most of the LinuxFB QPA in terms of event handling. That, in turn, would mean that full Qt applications with “normal” Qt interaction could be supported on the framebuffer. Here’s a screenshot – er .. an actual photo since Spectacle doesn’t yet work – of Calamares running on the laptop in the FreeBSD framebuffer.

Consider it a teaser for things to come.