Skip to content

Thursday, 7 September 2023

Last weekend, I went to Freedom Not Fear 2023 in Brussels. Fnf is an unconference for and by European digital activists. It covers various topics, from the latest terrible European law (Chat Control) to discussing how to get more involved in our democracies.

I usually attend more technical conferences, and it was refreshing to participate in a conference where ethical and political discussions around digital rights were a central topic. It was an occasion to meet people from different backgrounds, from a Dutch politician (and self-proclaimed student for life), to a member of various organizations (e.g. Edri, NlNet, epicenter.works, Chatons, …) and journalists from Netzpolitik.

Encryption is Love, Encryption is democracy, Encryption is Safety
Encryption is Love, Encryption is democracy, Encryption is Safety

On Friday evening, aside from the welcome talk, we had a presentation from the European Data Protection Supervisor (Wojciech Wiewiórowski) about their work on deploying a Mastodon instance for the EU institutions and how the lack of subscribers makes it hard to justify continuing investing in it.

The presentation is on Peertube if someone wants to watch it.

Picture of Wojciech Wiewiórowski presenting his talk
Picture of Wojciech Wiewiórowski presenting his talk

During the weekend, we had an unconference-style conference where everyone could create a topic of discussion and present their work interactively. This worked very well.

Board with all the discussion topics
Board with all the discussion topics

Many participants were using Linux (and often with Plasma), but others were unaware of KDE. So I did a small lighting talk about the KDE community and presented a few utilities we create: Plasma, GCompris, Labplot, Krita, Merkuro and Itinerary. Time was limited, so I couldn’t show everything we were doing, but I hope this small list of software shows that we are covering many different types of software.

I prepared my slides the day before, as I saw some slots for lightning talks were still available, and the new KDE For pages were of great help. But it makes sense to have some slides provided by KDE Promo, which can then be reused and modified depending on the audience. I’ll bring up the idea at the next KDE Promo sprint in 2 weeks.

Aside from the weekend, which was packed with discussion, we went on Monday to the European Parlament and had a small presentation about how the European Parlament works. We also had the opportunity to ask Patrick Breyer from the German Pirate Party questions.

Picture of Carl Schwan in front of the European Parlament and a sign Democraty in Action
Picture of Carl Schwan in front of the European Parlament and a sign Democraty in Action

Picture of the European Parlament
Picture of the European Parlament

I enjoyed this conference and thank the organizers and Digital Courage for organizing this event and the two MEPs for using some of their travel allowance to bring many people to Brussels.

Group photo with most of the participants
Group photo with most of the participants

For a while now DrKonqi has a special developer notification system when used in combination with coredumpd. I just realized I never told anyone about it 😅 though.

It’s terribly simple: When used with coredumpd, parts of DrKonqi implicitly look at all crashes that pertain to your current user. Because of that it can also notify on all crashes, not just the KDE-related ones. Obviously it can’t report bugs or anything but sometimes, as a developer, it’s nice to know when things explode.

Screenshot

This is a purely opt-in feature and shouldn’t be enabled unless you know your way around the debugger GDB or really want to know about all the crashes.

To enable the feature simply add KDE_COREDUMP_NOTIFY=1 to your environment. For example using an environment.d file:

mkdir -p ~/.config/environment.d/
echo 'KDE_COREDUMP_NOTIFY=1' >> ~/.config/environment.d/50-$USER.conf

Wednesday, 6 September 2023

Introducing the RiveQtQuickPlugin – Powerful Animations For Your QtQuick Applications

Rive is a popular tool for vector animations. While the editor itself is a closed source commercial product, there are FOSS implementations for the player runtime. basysKom has developed a QtQuick integration based on the rive-cpp library. This article introduces the project and its current state.

Continue reading Introducing the RiveQtQuickPlugin – Powerful Animations For Your QtQuick Applications at basysKom GmbH.

Monday, 4 September 2023

The other week the question came up how one can debug an application crash when the Windows Store crash tracking system is unable to produce a usable stack trace. Seemed a good enough opportunity to share some wisdom :)

Generally speaking in order to get a stack trace you first need a minidump. minidumps are kind of like core dumps on POSIX systems, well, except, mini. Acquiring that is should be your first goal.

There are a million ways to get a dump, I’ll highlight two of the easiest that I know of.

Partner Center Dumps

Ideally the Microsoft Partner Center will have a dump for you. You can find it usually where the stack trace is as well. To get access to KDE’s applications you need to be a KDE developer and file a sysadmin request. Once you have access you have to head from the Dashboard to Insights then navigate in the left hand pane to Health there use the drop-down to select the application you want to look at. This should give you every bit of information about the application health your heart could desire. You’ll probably also want to switch from viewing the last 72 hours to the last month, unless the application is particularly faulty of course.

Now all you need to do is click on the crash you want to look at, and not get too annoyed over the unknown crashes you can’t do anything about 😡.

At this point you should be able to find a stack trace link and an additional download link. Sometimes the download link is not there, I have no idea why but I’m sure it’s documented somewhere. The download link is what we are after, it contains the minidump along with some other metadata.

User-Mode Dumps

Now, sometimes the partner center is not able to help us for whatever reason. Maybe the download link is missing, maybe it just doesn’t show the crash we are after, maybe the dump on the partner center is useless. Who knows. In that case we need some help from the user. Thankfully it’s not too painful. They need to enable collection of user-mode dumps by creating the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps, which then causes the Windows Error Reporting to throw a minidump into %LOCALAPPDATA%\CrashDumps. The user then needs to reproduce the crash and obtain the dmp file from the aforementioned location.

Debug Symbols

Once you have obtained a minidump it’s time to find us some debug symbols. The sad truth here is that I can’t really help with that. Depending on how your application was built you’ll be able to get PDBs somehow hopefully. They will either float around as PDBs somewhere or at the very least will be available inside the .appxupload or .appxsym zip files. As a general best practice for KDE software I would advise that when you do a binary release to the Windows Store you also release the x86_64-dbg.7z file to download.kde.org so we can get the relevant PDBs when needed.

Tracing

Alright, I hope you had luck with finding your debug symbols, because now it’s time to do some tracing! Whee. You’ll need Microsoft Visual Studio. Any edition will do. File->Open->File... the minidump and you should be greeted by a nice overview of metadata about the crash.

First we’ll want to setup our debug symbols. For that you first want to place your PDBs somewhere in convenient in your file system. I’m lazy and usually just slap them on the Desktop. In Visual Studio you should find the option Set symbol paths in the right hand list of actions. The option opens the settings window on the correct page. Simply hit the ➕ and type out the path where you extracted the PDBs.

Once the symbol paths are set up you can hit Debug with Mixed and off the tracer goes. Slowly, because it needs to download a million symbols. But eventually you’ll arrive at your stack trace.

(nevermind my crazy setup, I was doing some wonky multi threaded debugging earlier and don’t know how to restore the UI 😅)

Hope this helps some!

Saturday, 2 September 2023

New Falkon version 23.08.0 is being released as part of KDE Gear.

Notable changes

Zoom indicator to the AddressBar

When the zoom level on the page is different than the default, show current zoom level in the address bar.

Address bar with zoom label
Address bar with zoom label

Expand address bar suggestion popup to the window width

It is possible to widen the address bar suggestion popup to the window width. This option is disabled by default, but it can be useful on smaller screens.

Expanded address bar suggestion popup
Expanded address bar suggestion popup

Permanent certificate exceptions

Certificate exceptions can now be stored indefinitely. There is also a GUI to see and manage the current exceptions which is located at [Preferences > Other > Certificate Exception Manager]

Contributed by Javier Llorente.

Certificate exception Manager
Certificate exception manager

Changelog

  • A bit faster restoring of session with a lot of tabs
  • Add support for custom URI schemes (BUG: 434099)
  • Add CMake option “BUILD_PYTHON_SUPPORT” to enable/disable Python support
  • Add zoom indicator to the addressbar (BUG: 399001)
  • Add an option to expand addresbBar suggestion popup to the window width
  • Implement a GUI for managing ignored SSL hosts (by Javier Llorente)
  • Add KDE branding bookmarks and speeddial entries (By Javier Llorente)
  • Implement download integration with Plasma (By Javier Llorente)

Download: ffalkon-23.08.0.tar.xz (sig signed with EBC3FC294452C6D8)

Friday, 1 September 2023

Let’s go for my web review for the week 2023-35.


Microsoft is using malware-like pop-ups in Windows 11 to get people to ditch Google - The Verge

Tags: tech, microsoft, windows, criticism

Microsoft doing Microsoft things in Windows… unsurprising, will never end. Maybe at some point people will move to platforms they really have control on?

https://www.theverge.com/2023/8/30/23851902/microsoft-bing-popups-windows-11-malware


Social Media Decline: Ending for Twitter, Facebook, Instagram, TikTok

Tags: tech, social-media, messaging

Interesting evolution… looks like people will all go back to some chat system? It’ll be the 90’s all over again? Maybe IRC will make a comeback? :-)

https://www.businessinsider.com/social-media-dead-instagram-tiktok-bereal-replaced-group-chats-messaging-2023-8?r=US&IR=T


Web Scraping for Me, But Not for Thee (Guest Blog Post) - Technology & Marketing Law Blog

Tags: tech, web, copyright, law, gpt, machine-learning

Interesting analysis around the current situation around web scraping and intellectual property. This moved to being mostly dealt with using contract law which makes it a terrible minefield. Lots of hypocrisy all around too which doesn’t help. GPT and the likes will likely be the next area where cases will rise.

https://blog.ericgoldman.org/archives/2023/08/web-scraping-for-me-but-not-for-thee-guest-blog-post.htm


AI and the automation of work — Benedict Evans

Tags: tech, economics, automation, work, ai, gpt

Interesting opinion piece about GPT and LLMs. When you ignore the hype, consider the available facts, then you can see how it’s another extra tool and unlikely to replace many people.

https://www.ben-evans.com/benedictevans/2023/7/2/working-with-ai


A note to young folks: download the things you love

Tags: tech, streaming, culture

If you only stream it, it won’t be available forever. Keep this in mind when it’s something you find culturally relevant… it might require some conservation work.

https://birchtree.me/blog/a-note-to-young-folks-download-the-videos-you-love/


E-ink is so Retropunk

Tags: tech, e-ink, hacking

I agree with this. They are very interesting devices. Not necessarily easily hackable yet though. It’s definitely getting there.

https://rmkit.dev/eink-is-so-retropunk/


Keep CALM and CRDT On

Tags: tech, distributed, crdt, research

Interesting research, this shows opportunities to push CRDTs to the next level.

https://www.vldb.org/pvldb/vol16/p856-power.pdf


Elixir Saves Pinterest $2 Million a Year In Server Costs

Tags: tech, elixir, programming, architecture, cost, performance

The claim is huge. The story doesn’t quite say how much is really about Elixir and how much from the revised architecture. That being said, going for something like Elixir has definitely an impact on the architecture… could it be that it pushes for better patterns?

https://paraxial.io/blog/elixir-savings


Unikernels: Rise of the Virtual Library Operating System - ACM Queue

Tags: tech, kernel, system

Nice article explaining unikernels and showing the example of MirageOS.

https://queue.acm.org/detail.cfm?id=2566628


C++ Papercuts :: The Coded Message

Tags: tech, c++, criticism

I tend to agree with those, they are among my pet issues with C++.

https://www.thecodedmessage.com/posts/c++-papercuts/


milen.me — Premature Optimization: Universally Misunderstood

Tags: tech, optimization, performance, architecture, programming

Another partial quote which led to misunderstanding. One should indeed think about performances early on.

https://milen.me/writings/premature-optimization-universally-misunderstood/


The Last Vestiges Of Object Oriented Programming

Tags: tech, object-oriented, programming

Nice overview of the good uses and wrong uses for classes. We’re far from the abuses of the early times now.

https://geoffviola.github.io/2020/09/07/the-last-vestiges-of-object-oriented-programming.html


</> htmx ~ Why htmx Does Not Have a Build Step

Tags: tech, frontend, web, browser, javascript, complexity, maintenance

Nice reasoning. It very well highlights the tradeoffs coming the choice they made. And of course the decision might change if the situation changes.

https://htmx.org/essays/no-build-step/


WTF is the Lean Web, anyways? | Go Make Things

Tags: tech, complexity, web, frontend

It’s clearly not clear cut, it’s a whole spectrum. I wish more web developers would at least ask themselves the question before having knee-jerk reactions reaching for their favorite framework of the day.

https://gomakethings.com/wtf-is-the-lean-web-anyways/


3D Gaussian Splatting for Real-Time Radiance Field Rendering

Tags: tech, 3d, ai, machine-learning

The level of details these techniques are giving now… this is very impressive.

https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/


Domain Repetition

Tags: tech, graphics, 3d, shader, mathematics

Nice introduction to domain repetitions. A fascinating concept (IMHO) very much used in procedurally generated content.

https://iquilezles.org/articles/sdfrepetition/


Anything But Tech Debt | Honeycomb

Tags: tech, technical-debt, business

More thinking gets around the debate about tech debt. This is definitely welcome. Using more precise labels can indeed being clarity in conversations.

https://www.honeycomb.io/anything-but-tech-debt


UX Design Patterns for Loading

Tags: tech, ux

Good set of patterns indeed. The article is web oriented but this makes sense in other type of applications as well.

https://pencilandpaper.io/articles/ux-pattern-analysis-loading-feedback/


How to pass a coding interview with me | Robert Heaton

Tags: tech, hr, hiring, interviews

Good list of advices, I regularly see people failing because of fundamental things like this… despite explaining my expectations first. So I’d add: listen to what the interviewer says about how he’s going to assess you.

https://robertheaton.com/interview/


The corporate kabuki of performance reviews - The Washington Post

Tags: management, hr

An old one but since I’m aware of companies still doing their performance reviews this way… Don’t fall for it, use a more humane process whenever you can.

https://www.washingtonpost.com/national/on-leadership/the-corporate-kabuki-of-performance-reviews/2013/02/14/59b60e86-7624-11e2-aa12-e6cf1d31106b_story.html


How to Impose Agile

Tags: tech, agile, change

Interesting opinion piece. Very often we see people mandating a “process”. It’s almost always the wrong way and how you end up with people following blindly “Scrum by the book” or “SAFe”. The approach proposed here is smarter: give the business constraints, let people choose what works best for them, support them along this journey.

https://ronjeffries.com/articles/018-01ff/imposition/


Measuring developer productivity? A response to McKinsey

Tags: tech, management, business, productivity

Excellent piece. Be careful what you measure. If you measure the wrong things people will game the system.

https://tidyfirst.substack.com/p/measuring-developer-productivity


Measuring developer productivity? A response to McKinsey 2

Tags: tech, management, business, productivity

And now the part two, with more warnings about what you measure. Also proposes a few ideas toward the end.

https://tidyfirst.substack.com/p/measuring-developer-productivity-440



Bye for now!

Profiling & Optimizing KRunner

One central topic of this year’s Akademy was energy efficiency and performance of software. I took this occasion to give KRunner another look in regard to profiling, because the multithreading refactor simplified lots of plugin code and allowed for more optimizations.

When I did some benchmarking around two years ago, one of my major performance surprises was the windowed widgets runner. This runner queried all available applets for each letter typed. https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/322/ reused the queried metadata for the duration of the match session.
When I created the “Systemsettings” runner plugin, I took the same approach toward reusing data. But with some better understanding of performance and improved KRunner APIs, I took another stance at improving this and the “Applications” runner. I choose these two, because they are one of the most central plugins for the search experience. Also, the underlying data that is queries (config modules and applications) is quite large.

For the applications runner, I already did an optimization to reuse the loaded apps during the lifetime of the match session around a month ago. All the described improvements are based on top of that work. My approach was to benchmark the runner using hotspot, look at the results and identify unexpectably expensive calculations.

In both plugins, I noticed that checks for an application being authorized or not were surprisingly expensive. In systemsettings, we did the check twice, once by appending the old KF5 “.desktop” postfix to the plugin ID. This could simply be removed in KF6. For the applications runner, the check was done inside KService to determine if the application is hidden. With KF6, the concept of ServiceTypes has gone away, and thus we don’t need this check anymore (https://invent.kde.org/frameworks/kservice/-/merge_requests/154).
While cleaning up the visibility check in KService provided faster results, it is even better to check the visibility once we load the applications and not when we filter multiple times for each letter typed.

There were also some pretty significant gains in the systemsettings runner by reducing lookups of the KPluginMetaData JSON object. For example, the user-visible name can be read once inside the loop and then stored as a simple variable. Another issue was that we created a QueryMatch object and assigned some properties, before checking if the given config module matches the query. This was a simple fix and avoided lots of unneeded object creations and temporary memory allocations.

Some other smaller improvements were:

  • Systemsettings runner:
    • Reusing calculated values, like the query being split in individual words
    • Only checking the name for short queries, this also avoid results to appear “random”
  • Applications runner:
    • Also avoid creating unneeded QueryMatch, though this affected far fewer cases
    • Reduce double writes/lookups for internal de-duplication check
    • Inline some trivial, internal methods
    • Use temporary variables for KService properties when we need it as a variable in the current scope anyway (avoiding usage of iterator on temporary)
    • Remove unneeded lambdas for simple filtering. This was a leftover for when we used KApplicationTrader for each letter typed
    • Remove unneeded X-KDE-More check, we don’t use this in any meaningful way
    • Remove check if app may be shown on current platform. In case this check would return false, the app would be considered hidden.

What it accomplished

Now you know about the technical changes, let’s look at the actual performance measurements! In the original merge requests, I have benchmarked using a test application that is part of the KRunner repo. Since that required me manually typing though, I have later on created a tool for automatically running queries.

Systemsettings runner: The total CPU cycles for matching and querying of the config module were reduced by around 30%. If one only looks at the CPU cycles for matching, the reduction was around two thirds. This means that data initialization was slightly improved, but is still the heaviest part. But once you have typed the first letter and the data is loaded, querying KRunner or the application launcher until it is closed is a lot more efficient!

BEFORE:
before.png AFTER:
after.png

Applications runner: The total CPU cycles were reduced by 24% and unlike the other runner, data initialization for the match session took slightly longer. This is due to the check if the app should be shown or not being made during loading and not filtering. But partly due to this tradeoff, querying is almost 60% faster!

The real-world gains depend on the user behavior. For the system settings runner, I have queried “theme” and emulated closing the launcher. For the applications runner, I have used “firefox” instead. In case you have a longer query, the optimizations would come more into play.

BEFORE:
before.png AFTER:
after.png

Besides improving performance, I also made sure to simplify and clean up the code. Compared to the previous state, the changes have removed 40 lines in total. There is for sure room for further optimizations, but I intentionally decided against changes that would cause a complexity vs. performance tradeoff.

I hope you enjoyed this read!

Thursday, 31 August 2023

Updates

Hardware

Case & Dimensions

First impressions start with the outside look and while I was concerned about that the silver colour would get on my nerves – it is OK really.

What is not just OK, but abso-bloody-lutely amazing is the custom engraving on the laptop lid Slimbook did for me. It is a Conant Gasket fractal and I have to thank María Hornos at Slimbook for both patience and perseverance in making this engraving a reality.

Slimbook Pro X 14 lid with a custom engraving, showing the Conant gasket and the Slimbook logo.

Size comparison of the closed laptops.

Slimbook Pro X 14 (14" display):

  • length: 320 mm
  • width: 212 mm
  • min. height: 18 mm
  • max. height: 20 mm

Lenovo ThinkPad X230 (13" display):

  • length: 305
  • width: 209 mm (233 mm, including the battery bulge)
  • min. height: 24 mm
  • max. height: 36 mm

Dell Latitude E7470 (14" display):

  • length: 335 mm
  • width: 233 mm
  • min. height: 20 mm
  • max. height: 22 mm

True to its name the case is very slim and in fact slimmer than both my old laptops. When it comes to the length and width it fits just between the two.

The fan intake is quite big and at the bottom side, with the outtake being at the back between the hinges. On low load, it is (quasi-)silent, during some serious load it is still much more quiet than either of my two old laptops and their old fans.

Input: Keyboard, Touchpad & Camera

To be frank, my very first impression of the keyboard and touchpad were that I felt a bit disappointed. These are not keys that I am typically used to and I tend to prefer harder keypresses. I also never had a touchpad with no buttons.

But it did not take long for me to get used to both and I can say they are both growing on me.

Amongst other things I wrote this blog post on the Slimbook and I must say after just one day I might even prefer this keyboard over the one on my work Dell Latitude E7470 (unsure yet about the ThinkPad keyboards).

It may be relevant to meniton that my daily driver is a Keyboard.io Model 01 with Matias Quiet Click modern Alps-mount key switches with a strong tactility and dampened on the down- and up-tick. When it comes to laptops, so far I was pretty pleased with ThinkPad’s keyboards (the older the better). On the other hand, Apple’s chiclet1 keyboards feel very wrong to me – I really tried, because at some point it looked like I will need to use a macBook at work, but I just cannot get used to them.

While a low-profile laptop keyboard will likely never2 has a typing-feel as satisfying as a mechanical keyboard, I did not think I would enjoy typing keyboard as much as I do. For some reason – and this surprised me quite a bit – the weird tiny Up and Down navigation keys work fine for me too.

One feature the ThinkPad keyboard has that sets it apart is its liquid drainage. I will miss that peace of mind when it comes to spillage.

With the button-less touchpad it took me a bit longer to get into the groove, but I can now say I am a convert of multi-finger gestures.

For me, I think the touchpad is of a good size – just big enough to be comfortable for gestures, but not as big to have my palms meddle with it while I type.

I also really like how the touchpad has a small led indicator in the corner to show when you turn it off.

The camera is not great though. Not the worst, but I would have expected more in 2023, even if just for video conferencing. The IR camera is a cool addition though.

(I did not try the microphone. I usually use a headset when I need to anyway.)

Output: Screen & Speakers

The screen impressed me quite a bit – the picture is much sharper and the colours prettier than I thought they would be.

I find the speakers to be OK. Nothing earth-shattering, but they can be loud enough and the sound quality is not bad. Honestly, I have had much worse before.

Ports & Misc

The one thing that is a bit underwhelming is the power supply. The cable feels a bit flimsy, but at least it is quite small.

The other thing that I miss from my ThinkPad is an always-on USB port, so I can e.g. charge my phone on the go, even if my laptop is asleep.

On the topic of USB ports, I do not understand why there is a USB-2.0 port – that one could have been safely replaced by a second USB-C.

I love the RJ45 jaws though :] – the laptop is too slim for an ethernet port, so it expands with a hinge that looks like a jaw.

Oddly enough, the Asus external DVD-RW drive requires 2 × USB-A to work – I suspect due to the power consumption. Perhaps USB-C might have been a better choice. The glossy case is not really to my taste and the drive is a tiny bit loud, but it seems to work fine.

The mini-dock makes a much better impression than on the pictures and while so far I only tried it as an USB hub, it works as expected. I even tried to plug in both USB-A plugs from the DVD and it went fine.

I find it a bit annoying that there is no LED on the outside, so with a closed lid I cannot tell if the laptop is on, off or sleeping. But I did notice that – no idea if that is by design or a fluke – the LED can be seen from the back through the air vents. So that works for me.

Software

Initially I planned to only take a quick look at the hardware, but as luck would have it Slimbook was kind enough to ship the computer with Ubuntu 22.04 LTS plus their own tools.

That gave me an opportunity to kick the proverbial tires a bit more seriously and also a chance to try out GNOME and Wayland.

Ubuntu

It should not come as a surprise, this is not my first time with Ubuntu(-based distros), but things have obviously changed since I last ran KUbuntu.

In the two days I have used the laptop so far, the system had two updates and both went well.

What I am a bit confused with though is that nowadays there are several graphical package managers installed: GDebi, Ubuntu Software, Software, and Software Updater are all separate applications. To complicate things further some packages come via Snap, others via Flathub and (seemingly only) a handful from actual APT.

During the two days I did manage to cause one crash (Doom (2016)) and one freeze.

Slimbook tools

Using the IR camera’s face-recognition to login using Slimbook Face is pretty cool and practical if you use your laptop in open most of the time. It is especially handy when you are installing things and it instead of having to break away from whatever you are doing and type in a password (on time), the little red square at the top just flashes twice instead.

That said, most of the time my laptop’s lid is closed and I use an external monitor and keyboard, so on a day-to-day basis this is of limited use to me.

About Slimbook AMD Controller and Slimbook Battery, I suspect it is just a handy UI for standard Linux settings, in which case I will be happy to set the settings directly. Then again, it is sometimes handy to have things in one place in a UI.

GNOME

I have been using KDE (Plasma) since 1.x, with occasional visits to other DE and WM. So this was a perfect opportunity to try out GNOME after many many year. And it was running on Wayland as well!

The first impression was that everything looks very sharp and pretty. I cannot say if this was because of AMD Vega, Wayland, the screen or what, but it was quite an improvement even over the Dell Latitude.

What I really like though is how the Super/Meta/Win key opens up a very useful overview – I hope the upcoming overview on Plasma will be similar, but include Activities too!

The three-finger gestures are also something I got used to really quickly and I would love to see in Plasma!

What bothers me quite a bit though is that the “this application is taking a long time” pops up way too quickly and often – I see several a day.

From the PIM side, Geary is just too simple for my use. I do somehow like the simplicity of the Calendar app though. I am not sure yet how it would work in the long term, but it worked well.

In a nutshell I can see the appeal – it does have a certain elegant simplicity to it –, but there were several occasions where it was not doing what I want it to and I could not figure out how to make it.

That said, if I was forced to use it, I would be OK with it. I still much prefer KDE Plasma (perhaps even i3 / SwayWM).

Gaming

If I already have a Vega 8 graphic card, I tried a few games both from Steam and GOG and it started as a mixed experience, but after I messed with Proton a bit, I am now (reasonably) impressed – for a mobile graphics card it performs pretty well. Then again, I have not had a dedicated graphics card in decades, so take that with a grain of salt.

It started off a bit depressing since I could not get Doom (2016), Redout: Enhanced Edition, and Divinity: Original Sin 2 to run on Steam – Doom actually crashed the desktop session. Everspace on GOG also did not start at all.

On GOG, Fort Triumph installs and runs, but not as well as I would hope.

On the other hand, the following work like a charm and survive pretty high settings and full HD:

  • BallisticNG (max. settings)
  • Epistory (very high settings)
  • Pychonauts (very high settings)
  • Return to Monkey Island (max. settings)
  • Secrets of Rætikon (max. settings)
  • Unvanquished (max. settings, ran as part of the phoronix-test-suite)
  • Ziggurat (high settings)

I suspect I either have something wrongly set up with Proton or the issue is connected with (Proton on) Wayland.

Yes, it was a Proton issue. With the help of ProtonDB and some internet searching, after tweaking some Proton settings in Steam I got the following to run fine:

  • Redout: Enhanced Edition (high, but not epic settings)
  • Valkyria Chronicles (max. settings)
  • Wasteland 2 (performance not great)

For Doom (2016) I needed to edit its config file to force it to use Vulkan (instead of OpenGL) to stop crashing Wayland. It still performs like crap, but it runs, so that is progress.

As for Everspace, the trick was to run EverspaceWithSystemLibraries.sh instead and then it ran fine even on high settings.

Divinity 2 remains a mystery, why I cannot get it to run. But at this stage, it is the only game I have not managed to get running eventually. So that is a huge improvement.

As launchers I tried Lutris and GameHub too and had a better experience with Lutris. Some games simply did not want to install on GameHub, but on Lutris there was no problem.

BTW, when did PC games become so massive? … 40 GB per game, seriously?!?

Benchmarks

I ran some benchmarks with phoronix-test-suite (not that I can tell much from them) and uploaded them to OpenBenchmarking.org, if you are into that stuff.

Miscellaneous

I was surprised how good LibreOffice runs and looks – I know! I never thought I would say that!

As for Thunderbird, I have do admit it has improved a lot since I last used it, but I still much prefer Kontact/KMail. What surprised me too is that it does not allow for special characters in the From: field.

I have mixed feelings about Marker. In principle I like the concept and also how clean it is, but something felt off, especially with the font size and the settings, so in the end I wrote this blog post in the standard GNOME Text Editor.

I have similarly mixed feelings about Apostrophe. It is very similar to KDE’s GhostWriter, but for GNOME. But you cannot change the editor font and its syntax highlighting is very limited. It may be due to Wayland and new hardware, but it perhaps feels a bit cleaner, but is also (too) limited in features.

Next time

Next step: start of installation.

I hope to write blog posts while I am doing the installation and set-up. So far the idea is that I would have smaller posts for each of the bigger steps (instead of one giant HowTo).

As such the next blog post should be about a simple install of EndeavourOS on a LUKS-encrypted Btrfs.

My plan is to first create a simple Btrfs and turn it into a RAID-1 Btrfs later on with btrfs balance start -dconvert=raid1 -mconvert=raid1. Fingers crossed!

… but spanners may meet cogs at weird angles, let us see.

hook out → day two with Slimbook, so far so good


  1. Some of their old Alps keyboards are a piece of legend though. 

  2. If we ignore the more crazy machines like the MNT Reform and the Balthazar BPCD which cram full mechanical keys into that. 

Tuesday, 29 August 2023

As promissed the last time, here is my crazy idea …

Updates

  • added Baloo fix for Btrfs, which is now scheduled for KF 5.111

Operating system / distribution

This time round, I will go for EndeavourOS.

Cue “I use Arch, BTW” jokes ;)

Why would I want to do this to myself?

Good question!

Honestly, because I fell it is time I had some fun with my system again (and GNU HURD is not ready yet1) and get my hands a bit dirtier. If it turns out it will take me too much time and effort, I will find something else.

I have used Manjaro for the past few years, and used Gentoo for a decade, so I feel like an(other) Arch(-based) distro is well within my reach. I chose EndeavourOS over vanilla Arch, because I do not want to do it entirely from scratch2 and EndeavourOS has a great forum and community.

With a rolling release distro like Arch though one can inadvertently update oneself into trouble. But this is where my biggest complication comes in …

File system

… that is right, the file system – The most common way to mess up your computer, seconded only by a typo in rm -rf3!

I am not a file system expert

If you have not noticed yet, I am not an expert in the field and I only half-grasp some of the concepts … on a good day! Please read up yourself if you want to venture down this rabbit hole.

Things may be wrong in this blog – if you spot something that you know is false, please let me know and I will correct it.

That said, I spent way too much time reading dozens of articles and forum threads on different file systems and set-ups while waiting for my new laptop to arrive, so I will try to explain my decision and enhance it with the most relevant links.

Btrfs

The obvious solution to the problem is, of course, making snapshots of the system. And Btrfs is one of the file systems that does this really well. It takes up minimal extra space and you can switch between them on the fly.

I dipped my toes into Btrfs and tried to use snapshots as backup before, but reverted back to Ext4, because I did not really understand it all and as such I also did not fully implement it. Which is commonly well known as “not a smart way of doing things”.

This time I am not going to use snapshots for (quasi-)backup purposes, because I am quite happy with my current backup system, but intend to leverage their superpowers for reverting back to a snapshot on the fly.

The idea therefore is that the system would automatically make a snapshot of the / subvolume on every update.4 So if anything goes wrong, I could simply boot into the snapshot before the mistake happened and wait for an update that works.

I also wanted to have a COW file system because it is said data on it is safer … and cows are cool (got to remind you how very little I know about these things! ;))

Another major reason is that Btrfs is capable of self-healing from bit rot and other disk degradation, but more on that down below.

There are some caveats with Btrfs though:

  • support for RAID-5/6 is still not stable – but I did not want to use those anyway;
  • there is an ongoing issue that on Btrfs Baloo reindexes everything after every reboot – but there is a patch out there already which fixes it, it has just not been merged into the upstream yetit was merged and will be part KDE Frameworks 5.111 release; some distros are already applying it though;
  • making snapshots (too often) can degrade SSD faster – so a smart subvolume plan is in order to decide what to snapshot and what not.

Why not …?

I did consider others file systems too, of course.

The following links I found pretty useful:

Ext4

Tried, tested, stable, apparently still(?) the fastest file system on SSD – that is the venerable Ext4 alright.

Why not then? Two reasons really:

  • it is not as exciting, and while I messed up a Btrfs set-up before, I messed up a LVM + Ext4 set-up before as well, so ¯\_(ツ)_/¯;
  • I really want to make use of snapshots to be able to roll back messed up updates and bad decisions.

ZFS

I never built up the courage to set up ZFS and from what I understand you need a lot more than two drives to make proper use of its features. And the Slimbook has “only” two M.2 slots.

It also sounds like it would be much more work to set it up on Linux (licensing questions5 aside).

XFS

I have close to no knowledge of XFS apart from that it quietly became a default in Fedora, instead of Btrfs. So my decision against it is based solely on the fact that I have some prior experience with Btrfs and that Btrfs is more commonly used.

It also seems that XFS is also more susceptible to bit rot and it is much harder to restore lost data from it.

Bcachefs

Wow! Bcachefs just sounds like the future! Like the best parts of ZFS and Btrfs and XFS, but made cleaner and better and more modern and … and … YEAH!!

(I apologise, this is very much way over my head.)

As for why not Bcachefs, it is not yet included in the Linux kernel – and if it the kernel devs do not consider it to be ready, I would rather not risk running it as a primary (encrypted, to boot!) file system on my primary machine.

Definitely a file system I will keep an eye on to potentially use it a few years from now!

Reiser5

Now that is a name you probably did not hear in over a decade!

Separating the artist from their art, ReiserFS was/is a great file system, especially for a lot of (very) small files that change often.

I remember using ReiserFS 3 for Portage files on Gentoo (on HDD) and it was a huge boost in performance!

From what I can tell neither Reiser4 nor Reiser5 where merged into the Linux kernel yet. And honestly, I am a bit concerned that with not many people talking about it, it would be difficult for me to find any help, when I inevitably mess something up.

LUKS

Since I cannot recall when was the last time I used a laptop that did not have a full-disk encryption, LUKS is happening, period.

I realise that this does not prevent from several attacks, but it does prevent from certain attacks, which I am OK with.

I am playing with the idea of having the /boot/ partition6 (or the decryption key) on a small USB stick, but that may be a complication I will postpone for another time.

There are some caveats though …

  • depending on the attack vector you are concerned about, LUKS on SSD may not be as secure as LUKS on HDD simply due to SSD erasing data less frequently to avoid degradation of the drive – check §5.19 of LUKS FAQ – should be fine for the most common use risk of a randomly stolen laptop though;
  • furthermore, using TRIM on an encrypted SSD can make it near impossible to restore;
  • currently LUKS2 – which is much improved over LUKS1 – does not run on GRUB – at least not out of the box. Systemd-boot does though, but it looks even uglier than LILO and I have not figured out yet how hard is it to set up to boot from snapshots. Will need to think about this a bit more, but am leaning towards either the Argon2- and LUKS2- patched GRUB or just using LUKS1 until GRUB catches on and then upgrade my disks to LUKS2.

RAID

To levarage the magic of Btrfs (or ZFS) to self-heal the file system if sectors on the drive corrupt, you can set two or more physical drives into RAID-1 (or RAID-10).

This is exacty what I intend to do – put two similar SSD, but different brands/models into a Btrfs RAID-1. Also if one of the drives fails completely, I can7 simply remove the faulty drive and re-add it to the RAID array.

Here it is important to note that block-based RAID does not help here, it needs to be a file-system-based RAID for the file system to be able to self-heal.

Again, caveats …

  • apparently if you put Btrfs into RAID you cannot use Swapfiles for your swap, but need to create a separate swap partition(s) – I will probably just create a swap partition on each SSD and add both to the swap pool.

Defaults are fine

I spent way too much time reading up on mount options to optimise SSD, TRIM, etc. There are so many pros and many cons, and above all there are massive caveats.

Watch out for outdated info!

In the past decade things have improved immensely when it comes to SSD technology, its support in Linux and Btrfs.

With that, also the defaults have adapted to reflect these changes.

If you are looking into overriding the defaults, make sure you are not reading outdated articles!

As an example of the above issue, I was reading up TRIM optimisations and the caveats of different combinations of file systems, RAID, encryption, etc. … until several articles in, I found a message on Linux RAID mailing list that stated that modern (i.e. from 2012!) SSD not only do not necessarily require TRIM any more, but forcing TRIM on them could actually have the opposite effect and degrade the SSD faster.

If you want to dive into SSD optimisations, I found the following resources the most useful (mind the warning above!):

Reading through that list and a few other things, what I learnt – in very broad strokes – is that a async TRIM is by default enabled on Btrfs if the kernel recognises the drive to be SSD, but if LUKS / dm-crypt is used it will override that default to not TRIM. Then there is also a list of specific SSD models coded into the Linux kernel, where the kernel itself will disable features that those drives cannot safely handle. And I am sure this is just the tip of the iceberg.

Ultimately … the defaults are sane and safe, whatever they end up being :) So change them only if you really know what you are doing.

Tmpfs

Tmpfs is this magic thing that mounts a section of your RAM as a block device, primarily with the intention of storing your ephemeral temporary files (typically /tmp/, but often /run/, /var/run/, and /var/lock/ too) into RAM instead of the SSD or HDD.

This great for performance, since RAM is much faster even than SSD, so storing caches there makes sense. It is especially great for use with SSD because using Tmpfs can greatly reduce the writing and deleting of data from the drive.

A further trick I recently found out about is to put the browser cache, or even the whole browser profile, into Tmpfs. Similarly this both preserves the SSD a bit and also apparently greatly improves browser performance. With 32 GB of RAM, I think I can afford testing this out :)

There are several approaches to this, and I have not made my mind up yet, which one I will adopt:

Oh, and you can totally also compile directly on Tmpfs, but you really need enough RAM for that.

Backups

Of course, just RAID for hardware failure (especially encrypted) is not enough of a guarantee that no data will be lost, so I fully intend to continue using Borg backups.

What will likely change though is that I will migrate from (my fork of) Demure’s script to Borgmatic8.

Wayland

At least initially, I will try how Wayland works.

I am cautiously optimistic, but also half-expect to move back to X11 for a few more months, if some things are still broken.

I hope I am wrong though and can see Wayland + Plasma improve in time.9

Next time

Yesterday I received my Slimbook Pro X 14.

Unexpectedly, it did have a working OS already installed, so I started playing around with it a bit. So the next blog post will be about first impressions of both the laptop and a distro and DE that I rarely interact with.

hook out → laptop arrived! excitement levels through the roof!!!


  1. Ha! I am full of crap jokes today! 

  2. I have done Gentoo from Stage 1 back on Gentoo 1.2 or 1.4, and warmly recommend it to anyone who wants to learn about how Linux works and has time for it. I do not have the time for such adventures nowadays. 

  3. I just made that up. But it is true that I am still sitting on my second-to-last crazy file system experiment – a LVM RAID-1 set-up with a single surviving HDD – and I still need to muster up the courage to try and rescue the photos from it. 

  4. There are also Linux distributions that do this at a more granular level as an integral part of their package manager – NixOS and Guix come to mind here. 

  5. I know SFLC said it is OK and I agree it is a sensible interpretation of GPL-2.0’s text. Whether that is a consequence the drafters of GPL-2.0 intended, is a separate question. 

  6. As a side note, when I was still on Gentoo and regularly compiled my own kernel, I used to keep /boot/ on a separate partition that was Ext2 and was not in /etc/fstab. So I had to remember to mount it every time I upgraded or modified the kernel. IIRC the point back then was because 1) booting from Ext4 was a problem in early GRUB, 2) you need /boot/ only when you actually boot and when you update your kernel, and as such 3) you do not need a journal for /boot/. I suspect there is no need for /boot/ to be treated that way anymore. Happy to be told otherwise! 

  7. I hope so, I am still a bit scared after the LVM RAID fiasco. 

  8. Even Demure himself said that might be a good idea. 

  9. I have a pang of nostalgia for those days where with every update on Linux you saw a major improvement. One update, you could hear music and sound effect at the same time; the next a modem would start working; monitors would get auto-detected; then USB got much faster … It was truly a time of wonder (but also of broken installs, expensive hardware and frustration). 

One design characteristic of our QtWidgets is that they contain a lot of frames and frames inside other frames. This worked well with Oxygen style and its skeuomorphism shadow, less so with Breeze.

I first thought this was inheriten with QtWidgets and couldn’t be fixed without much effort. But fortunately, after looking a bit into Qt source codes and in particular in the internals of QDockAreaLayout, I discovered that the engine to draw and style the built-in components of QtWidgets: QStyle has a QStyle::PE_IndicatorDockWidgetResizeHandle primitive which allows drawing separators between detachable docks and similarly there is QStyle::CE_Splitter to paint the separator between elements inside a QSplitter. This is huge because this means instead of drawing frames, we can render separator and then get rid of most of our frames in our apps.

This is how Qt Linguist tool looks like with this change.

Linguist with instead of using frames for each dock, use separators
Linguist with instead of using frames for each dock, use separators

Unfortunately, there are still some places where we do want to draw frames, so we can’t remove them all. I added a heuristic that tries to determine when to draw one based on the spacing and margins of the parent layout. A heuristic is never perfect, but an app can additionally force the style to display a frame or vice versa force the style not to display it.

For more complex apps (read with more custom components), this change require a bit of tweaking but with a handful of one-liner in Kate, I got this modern look.

Kate without frames
Kate without frames

This is not perfect yet and this will require a bit more tweaking around the tab bar, but is already a big departure from the current style.

Similar, this is how Dolphin and Ark, look with these changes:

Dolphin with a frameless split view
Dolphin with a frameless split view

Ark with 3 panes, one on the top left with a the archive content, one on the right with the name of the archive and one on the bottom left with the archive comment
Ark with 3 panes, one on the top left with a the archive content, one on the right with the name of the archive and one on the bottom left with the archive comment

If you like this change, don’t hesitate to put a 👍 on the pending MR, and if you are a developer, please test your app with this change and look at how I adapted a few apps already. I tried the change with some big apps like Krita and Kdevelop and it looks good, but the more testing, the better it is.