QtWebEngine on FreeBSD

It’s been a long time coming ..

Tobias and Raphael pushed the button today to push QtWebEngine into FreeBSD ports. This has been a monumental effort, because the codebase is just .. ugh. Not meant for third-party consumption, let’s say. There are 76 patches needed to get it to compile at all. Lots of annoying changes to make, like explaining that pkg-config is not a Linux-only technology. Nor is NSS, or Mesa, while #include <linux/rtnetlink.h> is, in fact, Linux-only. Lots of patches can be shared with the Chromium browser, but it’s a terrible time-sink nonetheless.

This opens the way for some other ports to be updated — ports with QtWebEngine dependencies, like Luminance (an HDR-image-processing application).

The QtWebEngine parts have been in use for quite some time in the plasma5/ branch of Area51, so for users of the unofficial ports, this announcement is hardly news. Konqueror with QtWebEngine underneath is a fine and capable browser; my go-to if I have Plasma5 available at all on FreeBSD.

Posted in FreeBSD, KDE | Comments Off on QtWebEngine on FreeBSD

CMake 3.9 on FreeBSD

The KDE-FreeBSD team also maintains the CMake packages on FreeBSD — mostly because KDE was the first big consumer of CMake. The meta-buildsystem is now used by hundreds of packages on FreeBSD. We recently switched the backend — the build system that is generated by CMake — from make to ninja, which gives us small-but-measurable build-time improvements.

Now we’re working on the CMake 3.9 update, which was released a two weeks ago.

Re-building hundreds of packages that use CMake is always an interesting exercise, since it’s the kind of big-practical test that regular testing avoids (this reminds me that really, we should be doing this in the RC phase rather than after release, to help the CMake folks find stuff before a release is finalized). The interesting bits have to do with all the ways that people find to abuse CMakeLists and do weird stuff.

Three CMake things I noticed recently:

  • Checking if stderr is a tty (for instance, to produce pretty colorized CMake output when it is) changed between CMake 3.0 and 3.1. OK, that’s not a recent change, but me-asking-myself “wasn’t this colorized?” was recent. Not a bug, something to work around most likely.
  • Finding UI files and automatically processing them has changed slightly. It is possible to add search paths. Quoting from the release notes,

    A “CMAKE_AUTOUIC_SEARCH_PATHS” variable was introduced to allow “CMAKE_AUTOUIC” to search for “foo.ui” in more places than the vicinity of the file including “ui_foo.h”.

    This breaks projects that #include "path/to/ui_foo.h". Previously, CMake ignored the path and looked for the UI file in the same directory as the source including it. Now, it looks for the UI file at the given path. In some packages which pull weird shenanigans with include flags and UI file locations, this breaks. Bug filed, though I have come to the conclusion that “Don’t Do That Then” is the right response and we’ll have to patch the packages that do this.

  • A change in the way auto-MOC works has revealed a bug of sorts in either auto-RCC or the ninja backend generator; this breaks Digikam for us. The same problem can be triggered in earlier CMake versions by turning on auto-RCC. Since we end up with different build results between make and ninja (make build succeeds, ninja doesn’t), I’ve filed a bug for this too. We’re still looking at what ought to be done about it, though. In the meantime there’s a simple fix for Digikam, though I’m not sure what other packages may be affected.

Trawling through packages that use or support (much) older CMake versions make me appreciate how far CMake has come since, say, 2.7. Whenever I find a page and a half of convoluted code to figure out which compiler flags support a given C++ standard, I’m glad of newer approaches like set(CMAKE_CXX_STANDARD 17) and be done with it. But I can understand projects not chasing CMake releases all that closely; there is a maintainence cost after all.

Anyway, thanks to the CMake folks for being very responsive to bug reports, and for FreeBSD users, expect CMake 3.9 soon-ish — it depends a little on how it intersects with the other updates we are trying to do, where Plasma5 is a big thing happening right now.

Posted in FreeBSD, KDE | Comments Off on CMake 3.9 on FreeBSD

Keyboard Layouts the way Sun Microsystems Intended Them

I am a long-time Sun Microsystems fan. So in the time that I worked on KDE 4 on OpenSolaris, I had a bunch of Sun hardware, including keyboards and mice. It’s always useful to have Stop-A available, even if the system the keyboard is attached to is not a SparcStation and doesn’t react to that gesture.

Screenshot of Keyboard KCMAnyway, I still use the Sun keyboard most of the time, but it is a decade old by now, and starting to show its age. And sometimes I use other hardware, like the KDE Slimbook, which has the control-key in the wrong place (next to the penguin, or meta-key). I have had a setxkbmap + xmodmap script that I have used since forever, but really that it a bit foolish: there are KDE settings to achieve the same thing.

So, to put Ctrl where it belongs (next to the letter A) and Caps-lock in the corner where a somewhat useless key belongs (next to the meta-key), use the KDE keyboard settings module: search for keyboard hardware in kickoff or krunner, then switch to the advanced tab, open up the Ctrl key position tree and put them in their place by checking swap ctrl and caps lock.

My muscle memory is much happier this way (it does adjust to different spacings of keys and the way the escape key is not all alone by itself, but the ctrtl key is important).

Posted in Bla Bla, KDE | 3 Comments

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”.

Posted in Bla Bla | Comments Off on Geeko in the Wild

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!)

Posted in Bla Bla, KDE | Comments Off on Akademy BoFs

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.

Posted in FreeBSD, KDE | Comments Off on Bug parity achieved

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, X.org 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.

Posted in Bla Bla, FreeBSD, KDE | Comments Off on KDE Slimbook and FreeBSD

KDE Slimbook!

Yesterday I picked up my new KDE Slimbook from the Slimbook.es 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.)

Posted in Bla Bla, FreeBSD, KDE | 1 Comment

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.

Posted in Bla Bla, FreeBSD | Comments Off on Best 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.

Posted in Bla Bla, KDE | Comments Off on Akademy Schedule