Geeko in the Wild

Post-Akademy, I’m spending a couple of days in the south of Spain, enjoying the scenery, snorkeling, climbing hills, finding CMake issues, playing with the Slimbook, and generally having a two-thirds-vacation.

Image of a Chamelion in a treeToday after lunch I was staring vacantly at the tree next to my cabin-by-the-beach, and then I saw it; a Geeko, staring back at me! The photo isn’t very good, but the little creature smiled the same munificent smile that the openSUSE Geeko has, and then climbed away through the leaves.

I’ll be back “on duty” soon, at which point I have a list of things-to-do a mile long inspired by Akademy. The conference is really great for bringing everyone together, and there’s some scope for getting-things-done right there, but when Volker whispers in my ear during the group photo “please fix KUserFeedback on KDE FreeBSD CI”, that kind of thing gets shuffled off to the list “later, when I get home”.

Akademy BoFs

Here at Akademy in Almería, we have moved from the conference portion — two days of talks at the University — to the hacking week portion. The conference days were very busy; most of the talks were recorded and those recordings will be up when they’re done post-processing. I haven’t heard a date for that yet.

Cake is a theme. I don’t know who bakes them or where they come from, but the shout on IRC that there is fresh-baked, still-warm cake and coffee in the hall near the team room is an event to drop everything for.

I missed BoFs yesterday that I wanted to go to — I guess I was wrapped up in hacking and talking to people outside of the scheduled activities. Today I spotted a Calamares BoF — not one I scheduled, mind, but apparently people think I should be doing more work.

At the end of each hack-week day, there is a BoF wrap-up for those attendees who could not be everywhere at once, and also for people outside of Akademy who want to know what has been worked on. Yesterday’s wrap-up was lots of “we discussed this-and-that”, I imagine today is going to start moving into “we built something”. So, for everyone at Akademy: be in the big hall downstairs at 18:00; for others, catch the video later (yay, shameless self-promotion!)

Bug parity achieved

Riddell: “Hey, Ade, don’t touch your quassel for a minute, ok? Right, switch to a different channel.” Me: “Sure” Riddell: “OK, see the Quassel notification icon?” Me: “Yeah, it’s throbbing.”

He walks over, checks that the notification icon is throbbing in the systray, and that I’ve got a konsole window at hand. “So, run top.” I switch windows, type “top” and hit enter.

Silence. “Um, what operating system is this?”

So Plasma 5 on FreeBSD looks sufficiently indistinguishable from KDE Neon, that it can fool even the conoisseur. But top(1) is different enough. This makes me really happy, since it shows that packaging vanilla upstream KDE software is the right thing to do for FreeBSD. Even better, the KDE Neon bug Riddell was trying to illustrate to me, is also present on FreeBSD with Plasma 5 on Intel graphics (although I use the scfb driver for now). Achieving bug parity is quite a milestone.

KDE Slimbook and FreeBSD

Yesterday I picked up my new KDE Slimbook. It comes with KDE Neon pre-installed. Of course it also works well with openSUSE, and Manjaro, and Netrunner Linux (some things I’ve at least booted the Live CD for). But for me, “will it run FreeBSD” is actually the most important bit.

Yes. Yes it does, and it does so beautifully.

Photo of two laptops

That is at least one advantage of choosing a Free Software friendly laptop, one designed for GNU/Linux: it is likely to be supported by many more operating systems that you might like. No, I have not tried OpenSolaris / Illumos on it .. there’s really no desktop distro in that corner anymore.

So, here’s how to breakupgrade your  Slimbook to FreeBSD (no warranty implied):

  • Resize the installed partition to make space for FreeBSD. I chopped 40GB off the end of the main Linux partition. This may break various crypt-setup things, be careful. For resizing, I actually used the Manjaro installer, and told it to resize an existing partition, then cancelled the install during unsquash, and then deleted the partition it had made. You can probably use resize2fs and gparted with good effect, too.
  • Install FreeBSD 12-CURRENT. I went for UFS on a single partition, no swap: that’s the easiest to get right, and avoids weirdness like zpools on a partition. It ended up in ada0p4, or sda4, or (hd0, gpt4) depending on what nomenclature you use for naming disks.
  • Oh, yeah .. don’t install a boot manager for FreeBSD. We’ll let the existing GRUB deal with it.
  • Reboot and let GRUB start Linux again. We’ll configure GRUB to (also) start FreeBSD. Add an OS entry for FreeBSD, by adding /etc/grub.d/40_custom:

    menuentry "FreeBSD" --class freebsd --class bsd --class os {
    insmod ufs2
    insmod bsd
    set root=(hd0,gpt4)
    chainloader /boot/boot1.efi

    Also recommended: set timeouts so you can actually pick an OS, in /etc/grub.d/custom.cfg:

    set timeout=5
    set timeout_style=menu

  • Reboot, hit escape at the right moment to get the GRUB menu, and choose FreeBSD. Boot into FreeBSD.
  • Configure wireless networking on FreeBSD for the Slimbook. I have one with an Intel 7265 wireless card, so I needed to set that up. Since the firmware comes from the filesystem, I ended up following the quick-start guide and futzing with rc.local to load the driver. Here’s my rc.local:

    #! /bin/sh
    /sbin/kldload if_iwm
    /sbin/ifconfig wlan0 create wlandev iwm0

    and this is a bit of my rc.conf:

    # Wireless
    ifconfig_wlan0="WPA SYNCDHCP"

    Bear in mind that NetworkManager and other fancy bits are not available: configure wpa_supplicant.conf by hand and add SSIDs and PSKs there.

  • Right now, Intel IGP after Broadwell (and the Slimbook is a Skylake) isn’t fully supported by the xf86-video-intel driver, so instead use scfb. This loses acceleration and some other features, but it gives you X11 right now, as opposed to sometime later when the newer drivers are merged.

    pkg install xf86-video-scfb

    Add some explicit, manual, configuration:

    Section "Device"
    Identifier "Card0"
    Driver "scfb"

  • After that, follow my earlier Plasma 5 on FreeBSD HOWTO, including adding the Area51 repo. However, since this is 12-CURRENT, you need to use a different pkg repository URL.

This concludes my laptop-futzing-about at Akademy this year: I have a laptop that dual-boots Linux and FreeBSD, and gives me an up-to-date Plasma 5 Desktop and KDE Applications on both — but that leaves me free to hack on whatever my work requires in the OS best suited to it each day of the week.

KDE Slimbook!

Yesterday I picked up my new KDE Slimbook from the stand at Akademy.

Photo of slimbook being handed over

First thing I did, of course, was boot it with my FreeBSD 11.0 SD card, to see if it works with my favorite operating system (with Plasma 5 desktop, of course). Nope: 11.0 hangs after finding acpi_ec0, so I will write about that later this week.

Second thing I did was boot KDE Neon (pre-installed) on it, to see how it works out-of-the-box. I collected a bunch of tiny-little-irritations, papercuts if you will, from the basic installation — which have disappeared after an update and reboot.

It’s a really nice and slick machine. I wanted a machine that would still fit in the train or plane, for work, but a little larger than my Thinkpad x121e. I bought that machine in 2012(?) from Hettes, a Dutch shop specializing in hardware with Linux preinstalled (now gone, since they could no longer source hardware without a Windows license). So I’m really happy to buy a new machine from a Free Software supporting shop in 2017.

There’s a bit of a weird-ass dongle in the box for wired ethernet, SD card slot, HDMI and two USB ports on the sides, and a DC in — I don’t think I will miss USB-C at all, although that would be neat for a refresh. I have not tried the webcam, which is in the bezel at the top of the screen (no nostril shots like some Dell machines). Speaking of bezels, they’re pretty wide compared to current “design” laptops, Not any wider than the x121e, so relatively more narrow.

The touchpad is a big change for me personally, since I am — or shortly will have been — an IBM TrackPoint™ fan. On the other hand, the touchpad is solid and clicky. The keyboard is nice, with perhaps a little too much flex in the right-hand alt and delete keys. The arrow keys are arrowy, not the fat-left-and-right that (I think) HP uses.


Having discovered that the machine is shiny and nice and fast and works well .. my next step is to try to break it. With the blessing of Alejandro and César — it’s good to have the best possible tech support right at hand.

(Oh, I forgot to mention: I’m pleased as punch with the ordering process, too, for instance the special “deliver to Akademy” shipping option, and the fact that I got email informing me of progress as the laptop was assembled and installed.)

Best be precise

Screenshot with memory use KSysGuard — the system monitor — on FreeBSD seems oddly precise. This machine with FreeBSD 10.3 and KDE Applications 17.04.2 installed, tells me that I have 3,274,960.000000 KiB memory in use. That is, three million, two hundred seventy four thousand, nine hundred and sixty kibibytes. I’m willing to believe that, since notionally the machine has 4GB installed and FreeBSD uses up memory until it’s full and so memory use rarely reports much unused. What I’m less inclined to believe is the .000000 part of the measure: and zero millionths of a kibibyte. So that’s a .. um .. more than a millibyte, and a smidgen less than one one-hundred-twenty-secondth of a bit.

So, dragging in some information theory and plugging in some values,  using the binary entropy function, Wolfram Alpha tells me that

p ≈ 0.999314653604933

so we can be ninety-nine point nine percent sure that that is my actual memory use.

Sometimes it’s good to be precise.

Akademy Schedule

Akademy 2017 is coming close. The schedule of talks (Saturday, Sunday) is now posted, and the community wiki for organizing things is slowly filling up.

The workshops and lightning talks and BoFs are being planned, too. I’m glad Anu Mittal has mentioned her QML + JS workshop, it’s a great topic for getting started with application development. QML is something I’ve never gotten in to, but should, so I’ve penciled this workshop into my schedule as well.

FreeBSD 11.0 and Plasma 5 HowTo

Here’s a step-by-step guide to getting a machine with FreeBSD 11 in it, running X, and KDE Plasma 5 Desktop and KDE Applications. It’s the latest thing! (Except that 11-STABLE is in the middle of the pack of what’s supported .. but the KDE bits are fresh. I run 10.3 with KDE4 or Plasma 5 on my physical machines, myself, so the FreeBSD version isn’t that important except that packages are readily available for 11-STABLE, not for 10-STABLE.)

TL;DR: get FreeBSD + X running; switch to packages; pkg install kde.

Image of FreeBSD boot schreen

  • Download a 11.0 installation image (e.g. the bootonly ISO).
  • Build a machine with at least 32GB of disk, 4GB of RAM, and one or more processors. I had an AMD A10-5745M board lying around, which is an €85 board that just needs memory and a disk.
  • Put the installation CD in the drive, or plug in the memstick — whatever.
  • Boot it.

It boots to the extremely old-school FreeBSD installer (the irony is not lost on me, relative to what I do the rest of the week).

Installation selection

  • Go through the installer. Install lib32, ports and src, because you’ll need those later.
  • If you have the bootonly ISO, you’ll need to configure networking.
  • Which filesystem layout you pick doesn’t really matter either. I go for ZFS with 1-disk striping (i.e. no redundancy) because then I get ZFS snapshots later, which is convenient for messing around with the system state and possibly starting over.

Wait for the install to finish.

  • Set the system timezone.
  • Set a root password.
  • Disable services you don’t need (I generally disable remote syslog and sendmail; enable clear /tmp. The security-options are up to you.)
  • Create a user.
  • Reboot. While the machine reboots, eject the CD or unplug the memstick. (Have I mentioned I really like KDE Neon’s feature of auto-ejecting the disk?)

  • Log in as root, and do post-installation updates, to wit:
    portsnap fetch extract update
    freebsd-update fetch install
  • install an initial-but-minimal working system, starting with pkg(8), the packaging system itself:
    pkg bootstrap
  • Developer’s basic toolkit (and I prefer bash for an interactive shell):
    pkg install git bash gmake cmake pkgconf gettext-tools binutils
    echo fdesc /dev/fd fdescfs rw 0 0 >> /etc/fstab
    echo proc /proc procfs rw 0 0 >> /etc/fstab
  • An X Server and a backup X11 environment (ancient):
    pkg install xorg xterm twm
  • Desktop technologies (modern):
    pkg install hal dbus
    echo hald_enable=YES >> /etc/rc.conf
    echo dbus_enable=YES >> /etc/rc.conf
  • Clean up
    pkg autoremove
    pkg clean
    rm /usr/ports/distfiles/*
  • Reboot again.

Log in as your regular user and run startx.

Image of TWM

Aren’t you glad you installed twm? Remember, exiting the top-left xterm will exit your X session.

  • If running with ZFS, it’s a good idea to snapshot now, just so you can easily roll back to the it-works-with-basic-X11 setup you have now.
    zfs snapshot -r zroot@x11
  • Now swap out the default FreeBSD package repository, for the KDE-FreeBSD community one. This is documented also on the Area51 page.
    mkdir -p /usr/local/etc/pkg/repos
    cd /usr/local/etc/pkg/repos
    cat > FreeBSD.conf <<EOF
    FreeBSD: { enabled: no }
    cat > Area51.conf <<EOF
    Area51: {
    url: "",
    priority: 2,
    enabled: yes
  • Tell pkg(8) to refresh itself (it may install a newer pkg, too), then install something nicer than xterm + twm, and then do some post-install configuration:
    pkg update
    pkg install konsole plasma5-plasma-desktop
    echo cuse_load=YES >> /boot/loader.conf
    echo webcamd_enable=YES >> /etc/rc.conf
  • Log in as your test user, and set up .xinitrc to start Plasma 5:
    cat > .xinitrc <<EOF
    #! /bin/sh
    /usr/local/bin/xterm -geometry +0+0 &
    test -x $KDE && exec /usr/local/bin/ck-launch-session $KDE
    exec /usr/local/bin/twm
    chmod 755 .xinitc

If you really want, you can run startx, but this isn’t the complete Plasma 5 desktop experience .. and KDE Applications are not installed, either. So you get a bare xterm (useful to kill X or start konsole) and kwin and not much else. Good thing that getting the rest of KDE Plasma 5 Desktop and KDE Applications is pretty easy (and we could have skipped the intermediate step with konsole and gone straight to the finish:

  • pkg install kde

This metaport will pull in another 2GiB of stuff, for all the KDE Applications and a complete Plasma desktop. There are intermediate metaports for slightly-less-heavy installations, but this one is easy to remember and will almost certainly get you what you want. So it really comes down to installing X, dbus, hal, and then the kde package. Voila!

Screenshot of Plasma 5 desktop

PS. The screenshot shows a machine with 10.3, not 11-STABLE. It comes down to the same process; I have the 10.3 packages built locally so i’ts faster for me this way. The 11-STABLE screenshots were taken in VirtualBox, but I have not had any recent success with VirtualBox and OpenGL and FreeBSD. I can’t run any Qt applications: they all fall over when trying to load shared OpenGL libraries that simply aren’t there in VirtualBox.

Rand … ahhh

I’ve decided to go to Randa again this year.

There’s at least four reasons for me to go:

  • change of pace, trading coding-in-the-attic-office for coding-in-the-dining-room
  • change of pace, trading discuss-coding-on-IRC for discuss-coding-while-hiking-to-the-glacier
  • with a little planning, we can probably get further up the mountain than last year
  • someone needs to make brigadeiro.

More seriously, the theme this year (from the page for this year’s meeting) is

Accessibility is the big topic. But what does accessibility mean regarding KDE and what else do we want to make more accessible?

From that perspective, there are two kinds of accessibility I’m interested in: making KDE available on FreeBSD (which includes hammering PIM into shape) is one. That’s a bit of a cop-out, really. I mean, I could bring my BeagleBone (probably will, too) and claim I was making KDE accessible to armv6. So portability and platform accessibility is a small thing.

More important to me is actual accessibility in the sense of using-software-with-a-screenreader. When I worked for the Dutch Federation of Audiological Centres, I learned a lot about accessibility for the deaf and hard-of-hearing. A software application that is primarily visual in nature doesn’t need much accessibility work for that. But I was one floor above the Dutch Stichting Accessibility, which works for the vision-impaired. That’s been sort-of hanging around the back of my conscience. So, accessibility in the more generally-accepted sense: making Free Software usable by people of all sort and abilities.

So I’ve got two things to sort out (geez, why do I keep getting bogged down in case-distinctions):

  • Orca screen reader in KDE on FreeBSD,
  • Orca screen reader support in Calamares. This is actually the biggie — and only tangentially related to KDE. Calamares is not a KDE project, but is used as the system installer for a variety of smaller Linux distro’s. There’s an issue filed against Calamares that it is largely inaccessible. This is due in part to the way it needs root (e.g. is run through sudo). That makes it difficult to install Linux — even if the eventual installed system is accessible, the installer isn’t. So I’m going to tackle that at Randa. Doing so will make some other issues go away as well — or maybe, I need to make some other issues go away before tackling Orca, and this will make the whole codebase better.

Serendipidity! One Randa meeting to inspire me to work on things I might otherwise put off, and where it turns out that working on accessibility improves things across the board.

Wayland, and Weston, and FreeBSD – oh my!

KDE’s CI system for FreeBSD (that is, what upstream runs to continuously test KDE git code on the FreeBSD platform) is missing some bits and failing some tests because of Wayland. Or rather, because FreeBSD now has Wayland, but not Qt5-Wayland, and no Weston either (the reference implementation of a Wayland compositor).

Today I went hunting for the bits and pieces needed to make that happen. Fortunately, all the heavy lifting has already been done: there is a Weston port prepared and there was a Qt5-Wayland port well-hidden in the Area51 plasma5/ branch.

I have taken the liberty of pulling them into the Area51 repository as branch qtwayland. That way we can nudge Weston forward, and/or push Qt5-Wayland in separately. Nicest from a testing perspective is probably doing both at the same time.

I picked a random “Hello World” Wayland tutorial and also built a minimal Qt program (using QMessageBox::question, my favorite function to hate right now, because of its i18n characteristics). Then, setting XDG_RUNTIME_DIR to /tmp/xdg, I could start Weston (as an X11 client), wayland-hello (as a Wayland client, displaying in Weston) and qt-hello (as either an X11 client, or as a Wayland client). The result is this:

Screenshot with Plasma 5 and Weston

Plasma 5 Desktop from Area51, with Weston running in X as a Wayland compositor, and two sample Wayland clients displaying in Weston.

So this gives users of Area51 (while shufflinig branches, granted) a modern desktop and modern display capabilities. Oh my!

It will take a few days for this to trickle up and/or down so that the CI can benefit and we can make sure that KWin’s tests all work on FreeBSD, but it’s another good step towards tight CI and another small step towards KDE Plasma 5 on the desktop on FreeBSD.