Akademy 2015 – where awesome things happen

Day 0:

Reached La Coruña on Friday 24th evening in time for the pre-registration event to attend my first Akademy. I met a few familiar faces and Jonathan Riddell introduced to many hackers. Later in the night we witnessed the interesting Galician ceremony of calling spirits.

Day 1:

Matthias Kirschner, the vice president of FSFE, delivered his keynote “An endangered species: The computer as universal machine”, offering a perspective on how computers were ‘unrestricted’ tools in the beginning. He started with the picture of man landing on the Moon and then raising his mobile phone to state the fact that this tiny device has more computing power than the computer that helped man land on the Moon. Fast forward to present times, look at how various businesses are trying to restrict that computing power. Trying to build restricting technologies actually takes a lot of manpower, time, effort and incurs cost - consider for instance the example of ‘sim locking’ - phones are manufactured by default to operate with any compatible sim card, but companies put a lot of effort in the software and hardware to restrict and tie down to specific carriers. The talk clearly showed the need for communities defending freedom in the digital age.

“Plasma desktop” by David Edmundson – David argued with the help of survey graphs that desktop usage is not slowing down, nor is the usage of Linux on desktop. He emphasized on the point that Plasma focus on “getting things done” and being “contextually aware” using KActivities etc. David concluded with the notes that Plasma 5 is in an encouraging state, it has a lot of potential for improvement in the short and long term and this is a great time to get involved in shaping its future.

“Plasma mobile” introduction - by Sebastian Kügler and Boudewijn Rempt. This session was quite an interesting event by virtue of announcing Plasma Mobile and demonstrating it running on Nexus 5 phone. Plasma mobile reference implementation is built on top of Kubuntu, using libhybris compatibility layer and KWin as the compositing manager. After the talk, a number of Nexus 5 devices flashed with Plasma mobile were on demo which felt super responsive and stable enough for a fantastic mobile development system.

I then went to the presentation about “Kdenlive” by Jean-Baptiste Mardelle - this video editor is in development for more than 10 years. Jean explained how it uses MLT framework and how important a vision statement for Kdenlive for a bright future of this video editing software.

“KDE Frameworks in use” - by commercial applications, by David Faure. David, being the maintainer of KDELibs and KDE Frameworks libraries, shared his experiences with commercial applications using KDE Frameworks such as KArchive, KIO etc. He mentioned that most companies are happy to upstream the improvements and they get ‘free of cost’ maintenance going forward.

And then we broke for a fantastic lunch sponsored by BlueSystems at the cafeteria.

Next talk was about “Packing C++ structs” by Volker Krause. Volker explained how memory layout of members in a struct are usually sequential and each member occupies size of its type and are aligned to alignment requirements of the type. For example, in x86 systems an int variable occupies 4 bytes and is aligned to 4 byte boundary in memory. He further explained how each individual member of a struct could be rearranged (at definition) to optimize the total size occupied by the struct and eliminate padding which wastes memory space.

Àlex Fiestas explained in his talk how Agile, TDD (test driven development), CI (continuous integration) & CD (continuous delivery) all mean the same and why continuous feedback is essential for successful software development.

Jens Reuterberg then talked on how to deal with different categories of jerks lurk in the community who make people feel “their work is bad and they should feel bad”, and potential strategies assumed against each type.

Next up was “KDevelop” by Milian Wolf. The KF5 port of core platform and some plugins are already completed and it works. The developers are working with CMake upstream for a faster engine. Some old code were removed and with it lost few features but those will make a come back sooner or later. The C++ support improved greatly due to LLVM based kdev-clang.

“Trojitá – a fast IMAP email client” by Jan Kundrát. Jan demonstrated Trojitá on the stage loading many thousands of messages very quickly. The Plasma mobile team expressed their interest to work together with Jan in bringing Trojitá to mobile. Jan later in a casual discussion explained how Trojitá makes use of on-demand and lazy loading to achieve fast response and excellent performance. At first only the IMAP envelops are retrieved from the server and when a message is selected, its header and body are retrieved. He also discussed how lazy loading hurts performance in certain situations.

After the talks, met with and talked to “WikiFM/WikitoLearn developer Riccardo Iaconelli, offered help by some of my friends who work on PHP/JavaScript to improve the WikitoLearn backend system. We had further discussions next days.

Day 2:

Second day started with the keynote on “Evolving KDE” by KDE e.V president Lydia Pintscher. She looked at KDE as a community - where we have been, where do we stand and where do we want to go. She emphasized on the necessity to focus on key areas and products. To the question from an audience member on what concretely means by focusing, Lydia answered - ask questions such as ‘why do we have so many music players’ for instance. There were also opinions expressed that design decisions in a top-down order do not usually work in community based projects and it has to come from ground up where involved parties (users, developers, designers) come together to agree on decisions. More discussions within the community followed during the Evolving KDE BoF session.

Andrew Lake and Thomas Pfeiffer from VDG team talked about “Vision” - the importance of each project to define a vision and strive to achieve it, guarding against diversion such as trying to do everything and ending up not doing anything better. They offered help and BoF session for interested projects to define and refine the vision for those. Many project maintainers later made use of their offer to define and refine vision for their projects.

“QtModeling and meta-modeling” by Sandro Andrade. QtModeling was developed as part of his PhD, which is a tool to define software models such as UML.

“Welcome to Massachusetts” presentation was changed by the time of presentation to “Welcome to Wayland” as Martin Gräßlin managed to actually make KWin and Plasma work on Wayland. He ran the presentation in his laptop running with Wayland backend. Clearly, Plasma/Kwin on Wayland has made huge progress, but there are still pieces to fall in place and features to be implemented and rough edges to be polished. This certainly was one of the most interesting news from KDE world during Akademy.

I managed to pester Jan Grulich enough to implement the missing network traffic plotter in Plasma Network Manager. He had a prototype in his local branch, but adding the dynamically adapting transfer rate on Y-axis needed more work on the Plotter plasma component. We continued working and testing in the next days.

I missed Dan Vratil’s sandboxing applications talk. But then attended the talk in which Dan Vratil introduced KAsync, an asynchronous event library and its syntax. And then the talk on HiDPI applications by David Edmundson explaining Plasma’s own pixel scaling technique before Qt had the capability and once Qt has, how to not rely on the QT_DEVICE_PIXEL_RATIO.

The day ended with presenting this year’s Akademy awards – Milian Wolf for best application (KDevelop), Jen Reuterberg and VDG team for best non-application, Scarlett Clark for CI/Jenkins and Albert Vacca for kdeconnect.


A bunch of us went to La Coruña city center for dinner, and I found out that Mexican tortilla (the flat bread) and Spanish tortilla (with potato and egg) are two entirely different items; Kai Uwe learned the same at greater expense of nearly starving. But we all had a good laugh at Kai’s expense 😉

Day 3:

From day 3 onward, it was all about BoF sessions, hacking together, fixing things, implementing new features. I started to fix a long standing annoyance with KCharSelect on displaying characters with large width (such as South Asian scripts), turned out to be trickier than I thought. Later in the night I found the fix committed introduced a regression, planned to consult with David Faure next day.

Attended the “Plasma BoF”. Then attended “VDG BoF”, helped fixing Thomas Pfieffer’s Plasma5 installation and grub. Identified a password entry focus issue with plasma-nm on connecting to a new wifi when Thomas tried to do that; later talked to Jan and he fixed the issue in 2 minutes.

VDG team asked people from different ethnicity to pop in during BoF to make new KDE avatars. Jens Reuterberg took my picture and he is making a KDE avatar out of me 😉

Day 4:

Attended “Wayland BoF” conducted by Martin Gräßlin.

Continuing with investigating the KCharSelect regression, I was lucky to work with David Faure properly fixing KCharSelect both in kdelibs and in KWidgetAddons framework. We then noticed further issues with KF5 based KCharSelect, investigated and unearthed a Qt4→Qt5 QChar enum issue. More on that in another blog post.

“Solid BoF”. Few people turned up for the Solid discussion, we discussed the general status in hardware support and later Lamarque Souza handed over the maintainership of Plasma Network Manager to Jan Grulich.

Day 5:

Dan Vratil organized the “Containers and Application Sandboxing” BoF. He explained how to define and build runtimes and KDE applications in Fedora using xdg-app. Scarlett Clark’s continuous integration and Phabricator session followed, and Release team BoF afterwards.

I started testing the new plasma-volume-control (later renamed to plasma-pa [pulseaudio]). Built F22 rpms in Copr, F23 has copr build issues. Found a bunch of issues, fixed many of them and David Edmundson reviewed the on the spot which I committed in the repo. Reported rest of the issues to him and left them in his custody 😉

Missed Valentin Rusu’s talk “Going from graphical dev tools to VIM”.

We then took the day trip to Tower of Hercules and the Aquarium. Climbed up the tower and enjoyed the beautiful view of the sea. Dinner later at a small but expensive restaurant with delicious food – especially fish. I did immaculate pronunciation of an Italian tongue twister, earning high-fives from Marco Martin and Riccardo Iaconelli.

Day 6:

Fixed the mute volume and volume slider issues with plasma-volume-control. Talked to Andrew Lake about a plasma “welcome” screen. Worked with Kai Uwe on improving the Notes taking applet.

To compensate the missed session on vim editor by Valentin Rusu, he gave us an overview again at the hacking area. Amazed to see his vim setup – a full fledged IDE, and he showed many cool tricks using vim and i3 window manager. Even firefox is configured to have vim shortcuts.

Signed the FLA with KDE e.V.

Later in the day went for swimming after many years, which turned out to be harder than I expected.

Day 7:

Flew back to Brussels.

Overall, I met a lot of wonderful people who I am happy to make acquaintance of. I learned many things, contributed a few patches,  fixed some bugs and enjoyed the great atmosphere where people come together, exchange ideas, build new things, fix problems, evolve visions and immerse themselves in creativity.

Thanks a tonne to KDE e.V for sponsoring my attendance. A huge thanks to the organizers, GPUL and Rialta for excellent organization, coordination and facilities.

That heisenbug in touchpad KCM is fixed

KDE touchpad configuration module supports both Libinput touchpad driver and Synaptics driver. Newer versions of distros like Fedora 22 comes with both libinput and synaptics drivers installed, where libinput driver is chosen by default for touchpads. Some users wanted to use synaptics driver and tweak all options exported by it using the touchpad KDE control module. To do so, simply uninstall the libinput driver (xorg-x11-drv-libinput) and touchpad kcm uses synaptics driver which makes all the kcm options tweak-able. Some of those users reported that after uninstalling libinput driver but keeping synaptics driver (xorg-x11-drv-synaptics), touchpad KCM displayed the error message “No touchpad found” and no options were editable as reported in this bug.

This wasn’t easily reproducible in my system though I have seen it once or twice. On a fresh Fedora 22 KDE spin installation which comes with both libinput and synaptics drivers, I was able to reproduce the issue by simply uninstalling libinput driver which helped to debug the issue. The XlibBackend class first checked for the presence of X atom “libinput Tapping Enabled” to determine if libinput driver is active. In that case, the XlibLibinputBackend was instantiated which handled the configuration. Otherwise, fallback to synaptics driver and instantiate XlibSynapticsBackend.

The issue, turns out that X atom “libinput Tapping Enabled” is active even after libinput driver is uninstalled! This was verified by checking the list of initialized atoms, with a nimble tool “xlsatoms” from the xorg-x11-utils package. With and without libinput driver installed, the output of this command were something like:

$ xlsatoms | grep -i tap
316 libinput Tapping Enabled
$ dnf remove xorg-x11-drv-libinput
(logout/restart and login again for X to use synaptics driver)
$ xlsatoms | grep -i tap
313 libinput Tapping Enabled
342 synaptics Tap Action

Which clearly shows the libinput atom is active even when driver is not installed. That caused the KCM code to try to instantiate XlibLibinputBackend which is non-existent and fails with error message “No touchpad found”. This seems to be a bug in Clutter, Mutter and Gtk+ as found out in this Fedora bug ‘touchpad not found’ . Those toolkits inadvertently created this atom while the intention was to check its existence; but I don’t know if kcm_touchpad code was also creating this atom.

With that finding, kcm_touchpad code is revised to first instantiate XlibLibinputBackend and checks for failures. If it fails, we try to instantiate the XlibSynapticsBackend. It is a small fix, yet solves an issue that affected many users. This fix is confirmed by some testers and is now pushed to plasma-desktop. The code adds a couple of error messages, so it is not available in 5.3.2 release but will be available in 5.4.0.

Libinput support added to Touchpad KCM

libinput is a library to handle input devices in Wayland compositors and to provide a generic X.Org input driver. It provides device detection, device handling, input device event processing and abstraction so minimize the amount of custom input code compositors need to provide the common set of functionality that users expect.

libinput is expected to replace input drivers such as synpatics in the future, and there’s already a drive to move input stack in Fedora 22 to libinput as can be seen in the discussion here. Most of the software would transparently work, except – as quickly noted in that discussion – the KDE touchpad configuration. Tochpad KCM exposes almost every knob present in the synaptics driver. In contrast, libinput exposes very few options to configure – such as tap-to-click and keeps most of the other options enabled by default – such as disable touchpad while typing. This is more sensible and efficient to do – when using synaptics driver, disabling touchpad while typing was accomplished by the synclient daemon.

As an aftermath of the discussion in Fedora, libinput maintainer Peter Hutter contacted KDE developers, including yours truly who is guilty of porting the kcm-touchpad to KDE Frameworks 5. As I know nothing about input stack or touchpads in general (phew), Peter was kind enough to step up, clone the kcm-touchpad and add support for libinput in addition to (existing) synaptics driver. All I had to do then, is to port it again to Frameworks 5.

Tochpad KCM running on libinput

Tochpad KCM running on libinput

As of last week, the review request to do that has been reviewed by Martin Gräßlin and David Edmundson and merged into the master branch – in the meantime I have obtained KDE developer commit access. In other words, Touchpad KCM now supports both libinput and synaptics drivers! If both are installed, libinput is preferred and exposes only the relevant options. As the KCM user interface exposes a lot of options, most of them remain disabled. Ideally, it should be re-designed – for example the GNOME mouse/touchpad configuration (including GNOME Tweak tool) exposes very few options. Alexander Mezin, kcm-touchpad maintainer has mentioned plan to rewrite it, I hope he will be able to find some time.

The updated kcm-tochpad packages for Fedora 20, 21 and Rawhide (what to become F22) are available for testing in the copr in Fedora repositories. For some caveats such as edge scrolling available only on single-touch touchpads, see the discussion and associated bug here. There’s still some issue with edge scrolling setting, I’m investigating it.

KDE Touchpad configuration ported to Frameworks 5

Fedora 20 with KDE SC 4.14 has been very stable, and after a while it gets…boring – especially when Plasma 5 is already released and you see screenshots everywhere. If you cannot hold the urge and feel sufficiently adventurous, Dan Vratil has built the Fedora 20 and 21 rpms here. If you install i386 versions, beware that baloo-widgets cannot be installed due to unmet dependencies. So, once you install dvratil’s copr repo, just do:

dnf copr enable dvratil/kde-frameworks dvratil/kde-frameworks-unstable dvratil/plasma5
dnf remove kde\* && dnf install kf5\* plasma5\* --exclude=kf5-baloo-widgets\*

I had to manually edit /usr/share/xsessions/plasma.desktop to change "/usr//usr/bin" to "/usr/bin” so that “Plasma 5” appears in gdm list. After logging in, the desktop runs smooth, but you notice the lack of many applications because they are not yet fully ported to KF5/Plasma5.

KDE Plasma 5 desktop

KDE Plasma 5 desktop

Once I had the Qt5/KF5/Plasma5 based workstation fully operational, I could also develop, build and test KF5 based applications. Most of the KDE apps are ported or being ported to KF5 under 'frameworks' git branch. As the OpenSuSe team already have started building KF5 based apps in an unstable repository, I could leverage the spec files to build rpms.

The first itch I scratched was unavailability of touchpad configuration kcm. Not being able to enable touch-to-tap, vertical and horizontal scrolling is no fun. Looking at the git repo for kcm-touchpad showed that it is not yet ported to KF5. Checked out the git repo and started porting. There are quite some references, blogposts and tools available online to guide and ease the porting effort. As it is a kcm that is being ported, the first place to go is Frameworks Porting Notes. The subtopic of ECM (extended cmake modules) source incompatible changes is also handy updating CMakeLists.txt files. The next thing is reference to Martin Graesslin’s post on porting kcontrol module. And the final tool that is quite useful to port API changes is the kde-dev-scripts. Run the source files through relevant script – like "find -iname "*.cpp" -o -iname "*.h" -o -iname "*.ui" | xargs ~/Programs/Projects/kde-dev-scripts/kf5/<porting-script.pl>". When you hit an API change that cannot be automatically converted by the script, check frameworks at api.kde.org. Then port away, setup a build directory, compile, note the build failure, fix the build – repeat.

Alexander Mezin and Hrvoje Senjan reviewed the patches and after 6 revisions the patch is committed in kcm-touchpad frameworks branch.

KCM Touchpad on KF5

KCM Touchpad on KF5

RPMs for Fedora 20 and 21 (i386, x86_64) are built and available in my copr repo. It contains builds of kmix and konsole as well. More to build and I’ll make them available in the same repo once build completed. You are welcome to try at your own risk 🙂

Bluetooth NAP tethering support in KDE Plasma NM

Recently, Plasma Network Management applet gained ability for bluetooth tethering. The initial support was only for DUN (Dial Up Networking), but not for PAN (Personal Area Network) or NAP (Network Access Point).

Sat a whole day staring at KDE networkmanagement code and GNOME network-manager-applet to figure out how to extend this to NAP (my phone seems to support that); and with help of Lamarque, a few lines of code did the job.

Plasma NM Bluetooth NAP tethering

The patch to implement this is under review. It has had only limited testing from my end. Note that this will work only if you have applied patch for Solid to support bluetooth devices in kdebase-workspace. I’ve updated the kde-plasma-networkmanagement and kdebase-workspace RPMS and uploaded here. Binary RPMs are only for x86_64; for other architectures, rebuild the SRPMs. If there are brave souls out there to test it out, here’s the procedure:

  1. Update kdebase-workspace with the above ones
  2. Update kde-plasma-networkmanagement*
  3. Run “/usr/libexec/kde4/networkmanagement_configshell create --type bluetooth --specific-args "A1:B2:C3:D4:E5:F6 nap“. Replace A1:B2:C3:D4:E5:F6 with the hardware address of your bluetooth device (can be found out easily from BlueDevil).
  4. That’s it, the connection should automatically be set up and appear in Plasma NM.

Update: The patch is upstream. Lamarque has adapted and integrated it.