Skip to content

Sunday, 12 January 2025

Welcome to a new issue of "This Week in KDE Apps"! Every week we cover as much as possible of what's happening in the world of KDE apps.

This week we look at the usability improvements landing in Alligator, Dolphin, and Itinerary; new features for KMyMoney, Tokodon and NeoChat; and updated versions of Amarok and Skrooge.

Alligator RSS feed reader

You can now mark one feed or all feeds as read (Mark Penner, 25.04.0. Link), and save the settings when the application is suspended (Mark Penner, 24.12.3. Link).

Amarok Rediscover your music

Amarok 3.2.1 is out with a more complete Qt6 support and some small UI bug fixes. You can find the full announcement on Amarok's development Squad blog.

Note that this version is still marked as experimental.

Arianna EBook reader

Arianna will once again remember the current reading progress of your books with the new backend. (Ryan Zeigler. 25.04.0. Link)

It is now possible to add multiple books in your library at the same time. (Onuralp SEZER, 25.04.0. Link)

Dolphin Manage your files

Dolphin now visually elides the middle portion of long file names rather than the end. So rather than Family Gathering 2….jpg you might see Family Gath…ng 2018.jpg. Depending on your naming schemes, this might be a good or a bad change for you, so sorry in advance if it affects you negatively, but on average it should be an improvement (Nate Graham, 25.04.0. Link 1).

The right-click context menu in the Trash had the "Restore" action right next to the "Delete" action, which made it easy to accidentally click the opposite of what you wanted leading to data loss. This week Nate moved the "Delete" action to the very end of the menu so this no longer happens. Also the "Restore" wording was changed to "Restore to Former Location" for clarity (Nate Graham, 25.04.0. Link 1).

Felix fixed a regression in Dolphin 24.12.0 on X11 which caused the keyboard focus to move to the Places or Terminal panels when Dolphin is minimized and then unminimized (Felix Ernst, 24.12.2. Link).

KDE Itinerary Digital travel assistant

The Itinerary team improved travel document extractors for Bilkom and PKP PDF tickets (Grzegorz Mu, 24.12.2. Link 1 and link 2), International Trenitalia ticket barcodes (Volker Krause, 25.04.0. Link), and the Danish language support for Booking.com (Volker Krause, 24.12.3. Link).

The team also switched the querying public transport information feature from Deutsche Bahn to a new API after the previous one was disabled. This unfortunately results in the loss of some previously available trip information (Volker Krause, 24.12.2. Link).

Note that this same issue affects KTrip and for the same reason.

Keysmith Two-factor code generator for Plasma Mobile and Desktop

It's now possible to import accounts via otpauth:// URIs in QR codes (Jack Hill, 25.04.0. Link).

KDE Connect Seamless connection of your devices

The list of devices in the sidebar is now properly scrollable (Christoph Wolk, 25.04.0. Link).

Kdenlive Video editor

The scaling algorithm has been improved and now, when you zoom, individual pixels without blur are clearly displayed (Jean-Baptiste Mardelle, 24.04.0. Link).

Note that this change is currently only available on Linux.

KMyMoney Personal finance manager based on double-entry bookkeeping

Thomas added a new feature that shows paid out dividends in investment reports and in the calculation of returns (Thomas Baumgart. Link), and Ralf added a column showing the annualized return in the investment performance reports (Ralf Habacker Link).

LabPlot Interactive Data Visualization and Analysis

Israel made it possible for LabPlot to read the value generated by a formula from a cell instead of the formula text iself when importing data from Excel files (Israel Galadima. Link).

Merkuro Mail Read and write emails

The email lists in Merkuro Mail now supports selecting multiple emails at once, dragging and dropping and keyboard navigation (Carl Schwan, 25.04.0. Link 1 and link 2).

It's also now possible to move or copy emails to another folder manually.

NeoChat Chat on Matrix

Joshua implemented requests for user data erasure (Joshua Goins, 25.04.0. Link) and Carl fixed the bug that stopped the context menu froma appearing in the maximized image preview (Carl Schwan, 24.12.3. Link).

Skrooge Single-entry bookkeeping for home use

The Skrooge Team announced the release of version 25.1.0 of its Personal Finances Manager. This is the first version ported to Kf6/Qt6. You can find the full announcement here.

Tokodon Browse the Fediverse

Joshua improved the compatibility with GoToSocial servers even more (Joshua Goins, 25.04.0. Link) and also made it possible to share an account handle via a QR code (Joshua Goins, 25.04.0. Link).

Meanwhile Carl ported the remaining menus from Tokodon to the new convergent alternative (Carl Schwan, 25.04.0. Link).

Packaging

We updated the Craft packages to use Qt 6.8.1 and KDE Frameworks 6.10.0.

…And Everything Else

This blog only covers the tip of the iceberg! If you’re hungry for more, check out Nate's blog about Plasma and be sure not to miss his This Week in Plasma series, where every Saturday he covers all the work being put into KDE's Plasma desktop environment.

For a complete overview of what's going on, visit KDE's Planet, where you can find all KDE news unfiltered directly from our contributors.

Get Involved

The KDE organization has become important in the world, and your time and contributions have helped us get there. As we grow, we're going to need your support for KDE to become sustainable.

You can help KDE by becoming an active community member and getting involved. Each contributor makes a huge difference in KDE — you are not a number or a cog in a machine! You don’t have to be a programmer either. There are many things you can do: you can help hunt and confirm bugs, even maybe solve them; contribute designs for wallpapers, web pages, icons and app interfaces; translate messages and menu items into your own language; promote KDE in your local community; and a ton more things.

You can also help us by donating. Any monetary contribution, however small, will help us cover operational costs, salaries, travel expenses for contributors and in general just keep KDE bringing Free Software to the world.

To get your application mentioned here, please ping us in invent or in Matrix.

In the latest Plasma 6.3 Beta, you will find a new executable named kcursorgen in /usr/bin. It can convert an SVG cursor theme to the XCursor format, in any sizes you like. Although this tool is intended for internal use in future Plasma versions, there are a few tricks you can play now with it and an SVG cursor theme.

(Unfortunately, the only theme with the support that I know, besides Breeze, is Catppuccin. I have this little script that might help you convert more cursor themes.)

Requirements

  1. The qt6-svg library.
  2. The xcursorgen command, usually found in xorg-xcursorgen package.

Trick 1: Cursors at any size you like

You should be able to set any cursor size with SVG cursors, right? Well, not at the moment, because:

  1. Only those apps using the Wayland cursor shape protocol would be using SVG cursors. Other apps still use the XCursor format, with a limited list of sizes.
  2. Plasma's cursor setting UI hasn't been updated to allow arbitrary sizes.

But we can do it manually with kcursorgen. Take Breeze for example:

Step 1: Make a copy of the theme

First, copy the cursor theme to your home directory. And let's change the directory name, so the original one is not overriden:

mkdir -p ~/.local/share/icons
cp -r /usr/share/icons/breeze_cursors ~/.local/share/icons/breeze_cursors.my

Then open ~/.local/share/icons/breeze_cursors.my/index.theme in the editor. Change the name in Name[_insert your locale_]= so you can tell it from the original in the cursor settings.

Step 2: Regenerate the XCursor files

For example, if we want a size 36 cursor, and the display scale is 250%:

cd ~/.local/share/icons/breeze_cursors.my
rm -r cursors/
kcursorgen --svg-theme-to-xcursor --svg-dir=cursors_scalable --xcursor-dir=cursors --sizes=36 --scales=1,2.5,3

Some Wayland apps don't support fractional scaling, so they will round the scale up. So we need to include both 2.5 and 3 in the scale list.

The above command generates XCursor at size 36, 90 and 108. Note that the max size of the original Breeze theme is 72, so this is something not possible with the original theme.

(kcursorgen also adds paddings when necessary, to satisfy alignment requirements of some apps / toolkits. E.g., GTK3 requires cursor image sizes to be multiple of 3 when the display scale is 3. So please use --sizes=36 --scales=1,2.5,3, not --sizes=36,90,108 --scales=1, because only the former would consider alignments.)

Then you can go to systemsettings - cursor themes, select your new theme, and choose size 36 in the dropdown.

(Yes, you can have HUGE cursors without shaking. Size 240.)

Yes, you can have HUGE cursors without shaking

Trick 2: Workaround for the huge cursor problem in GTK4

As explained before, Breeze theme triggers a bug in GTK4 when global scaling is used, resulting in huge cursors. It's because Breeze's "nominal size" (24) is different from the image size (32).

We can work around this problem by changing the nominal size to 32.

Step 1 is same as above. Then we modify the metadata:

cd ~/.local/share/icons/breeze_cursors.my
find cursors_scalable/ -name 'metadata.json' -exec sed -i 's/"nominal_size": 24/"nominal_size": 32/g' '{}' \;
rm -r cursors/
kcursorgen --svg-theme-to-xcursor --svg-dir=cursors_scalable --xcursor-dir=cursors --sizes=32 --scales=1,1.5,2,2.5,3

Then you can go to systemsettings - cursor themes, select your new theme, and choose size 32 in the dropdown. Cursors in GTK4 apps should be fixed now.

Extra idea: (For distro maintainers) reduce cursor theme package size to 1/10

It might be possible to only package the index.theme file and cursors_scalable directory for the Breeze cursor theme (and other SVG cursors themes), then in an postinstall script, use kcursorgen to generate the cursors directory on the user's machine.

This would greatly reduce the package size. And also you can generate more sizes without worrying about blown package size.

But the fact that kcursorgen is in the breeze package might make some dependency problems. I have an standalone Python script that does the same. (But it requires Python and PySide6.)

Saturday, 11 January 2025

I recently sat down with Brodie Robertson again to appear on his Tech Over Tea show, this time on the subject of KDE’s recent fundraising, the role of money in open-source in general, and also design (I can never resist talking about this). If these topics interest you, check it out!

The Amarok Development Squad is happy to announce the immediate availability of Amarok 3.2.1, the first bugfix release for Amarok 3.2 "Punkadiddle"!

3.2.1 features fixes for some small UI bugs, improvements for file transfers to MTP devices, and some compilation fixes for different combinations of Qt6 versions and compilers, enabling easier testing of Qt6 builds. Additionally, it is now theoretically possible to enable last.fm and gpodder.net support in a Qt6 build. However, this requires Qt6 support in liblastfm and libmygpo-qt; a functionality that is not yet included in the most recent released versions of the libraries.

Changes since 3.2.0

CHANGES:
  • Support gpodder and lastfm on Qt6 builds
  • Limit maximum current track font size more when context view is narrow
BUGFIXES:
  • Fix displaying settings button for Internet services
  • Enable Wikipedia context applet on Qt6 builds
  • Don't crash when copying multiple files to MTP device (BR 467616)
  • Avoid unnecessarily flooding MTP devices with storage capacity queries
  • Compilation fixes for various compiler + Qt6 version combinations

Getting Amarok

In addition to source code, Amarok is available for installation from many distributions' package repositories, which are likely to get updated to 3.2.1 soon, as well as the flatpak available on flathub.

Packager section

You can find the tarball package on download.kde.org and it has been signed with Tuomas Nurmi's GPG key.

Welcome to a new issue of "This Week in Plasma"! Every week we cover as much as possible of what's happening in the world of KDE Plasma and its associated apps like Discover, System Monitor, and more.

This week the focus was on landing final Plasma 6.3 features and UI changes… and land them we did! Now it's time to spend the next month exclusively on bug-fixing and polishing.

Notable New Features

When notifications arrive while "Do Not Disturb" mode is engaged, exiting that mode now shows a single notification informing you of how many you missed, rather than sending them all in a giant unmanageable flood. (Fushan Wen, 6.3.0. Link)

The desktop context menu for symbolic links now includes a "Show Target" menu item, just like one one in Dolphin. (Nate Graham, 6.3.0. Link)

The System Monitor app and widgets are now capable of collecting GPU statistics on FreeBSD. (Henry Hu, 6.3.0. Link)

Notable UI Improvements

If you didn't like the change in Plasma 6.2 to use symbolic icons in Kickoff's category sidebar, you can now undo it yourself; we changed the implementation to pull icons from the standard data source, so you can set them to whatever you want using the Menu Editor app. (David Redondo, 6.3.0. Link 1 and link 2)

Reduced the clutter on the Edit Mode toolbar, making its contents more focused and relevant. (Nate Graham, Link 1, link 2, and link 3)

The DrKonqi crash reporter/browser app's main windows now remember their size, maximization state, and (on X11), position on screen. (Nate Graham, 6.3.0. Link)

External web links in Kirigami-based apps such as Discover now show the typical "arrow pointing out of a square" icon to make this more clear. (Carl Schwan and Nate Graham, Frameworks 6.11. Link)

Modernized the UI style of the standalone printer-related apps that are not yet integrated directly into the System Settings page. (Thomas Duckworth, 6.3.0. Link)

All close buttons throughout KDE software are now consistent; we've standardized on the black X. As part of this, we also changed the timeout indicator on Plasma notifications to not be dependent on any particular close button icon appearance, as was the case before. (Nate Graham, Plasma 6.3.0 with Frameworks 6.11. Link 1, link 2, and link 3)

System Settings' Night Light page has moved from the "Colors & Themes" group to the "Display & Monitor" group, which is a more natural and expected place for it. (Kisaragi Hiu, 6.4.0. Link)

In Plasma's Networks widget, there's now a "Configure" button for networks that you've used in the past but aren't currently connected to. (Kai Uwe Broulik, 6.3.0. Link)

Notable Bug Fixes

Plasma no longer crashes when you switch the desktop from "Folder" containment to "Desktop" containment, and then back. (Marco Martin, 6.3.0. Link)

The session restore "Excluded applications" list you can populate yourself now actually takes effect on Wayland. Also, you now list apps by their desktop file names, which lets the feature work for apps whose executable is ambiguous, such as Flatpak apps. (Harald Sitter, 6.3.0. Link 1 and link 2)

Fixed a bug that could cause full-screen windows being screencasted to freeze under certain circumstances. (Xaver Hugl, 6.3.0. Link)

Made laptops more robust against waking up while the lid is closed. (Xaver Hugl, 6.3.0. Link)

Tooltips for favorited apps in Kicker once again appear as expected, and don't disappear immediately on hover. (Marco Martin, 6.3.0. Link)

Typing text into KRunner that matches a history item but with different capitalization no longer causes the grayed-out auto-completion text to de-sync with the text you already typed. (Nate Graham, 6.3.0. Link)

Plasma no longer unnecessarily shows you an OSD indicating the default audio device when you return from a different TTY. (Kai Uwe Broulik, 6.3.0. Link)

Time zones shown in the Digital Clock widget's popup are once again sorted by time, rather than randomly. (Nate Graham, 6.3.0. Link)

Fixed a visual glitch that could manifest as brief graphical corruption when interacting with pages in the clipboard settings dialog in a certain way. (David Edmundson, 6.3.0. Link)

Fixed a bug in the Wayland session restoration feature that could make it inappropriately restore multiple instances of apps. (Harald Sitter, 6.3.0. Link)

In Discover, app pages and pages with lists of apps are no longer inappropriately horizontally scrollable. (Nate Graham and Ismael Asensio, 6.3.0. Link 1 and link 2)

Fixed an issue in Kirigami.Icon that affected multiple Plasma widgets, whereby an icon from the active icon theme would be mistakenly provided instead of a custom image, in cases where that custom image was referenced from an absolute path and happened to have the same filename as a themed icon. (Marco Martin, Frameworks 6.11. Link)

Fixed a case where some dialogs in Kirigami-based apps such as System Monitor could have overflowing footer buttons in some languages. (Nate Graham, Frameworks 6.11. Link)

Other bug information of note:

Notable in Performance & Technical

Reduced the System Monitor app's background CPU usage down to 1-3% with some clever internal restructuring. (Arjen Hiemstra, 6.3.0. Link)

Removed a bunch of unnecessary old "sanity checks" on login that were not actually providing any additional sanity, and could even prevent login under certain circumstances! (David Redondo, 6.3.0. Link)

Improved performance on certain GPUs while Night Light is active; previously it could sometimes be quite poor. (Xaver Hugl, 6.3.0. Link)

It's now possible to pre-authorize apps for remote desktop access, so you don't have to wait for them to pop up an interactive permission dialog. Preliminary documentation can be found here. (Harald Sitter, 6.3.0. Link)

How You Can Help

KDE has become important in the world, and your time and contributions have helped us get there. As we grow, we need your support to keep KDE sustainable.

You can help KDE by becoming an active community member and getting involved somehow. Each contributor makes a huge difference in KDE — you are not a number or a cog in a machine!

You don’t have to be a programmer, either. Many other opportunities exist:

You can also help us by making a donation! Any monetary contribution — however small — will help us cover operational costs, salaries, travel expenses for contributors, and in general just keep KDE bringing Free Software to the world.

To get a new Plasma feature or a bugfix mentioned here, feel free to push a commit to the relevant merge request on invent.kde.org.

The Skrooge Team announces the release 25.1.0 version of its popular Personal Finances Manager based on KDE Frameworks.

This is the first version for Kf6/Qt6.

Changelog

  • Correction bug 494197: Shortcut for Setting Status to Checked
  • Correction bug 494159: Wrong decimal separator in CSV import
  • Correction bug 494516: Categories "closed" are not displayed
  • Correction bug 494023: Downloading values from yahoo fails HTTP Error 401: Unauthorized
  • Correction bug 494077: document History panel and better document viewing transactions modified by an action
  • Correction bug 498157: Inconsistent icons in the Pages sidebar
  • Correction: Replace yahoo source (not working) by boursorama source
  • Correction: More robust copy of tables
  • Migration: Support build on qt6/kf6
  • Correction: Fix performances issue on qt6 due to QDateTime::fromString

Friday, 10 January 2025

A while ago a colleague of mine asked about our crash infrastructure in Plasma and whether I could give some overview on it. This seems very useful to others as well, I thought. Here I am, telling you all about it!

Our crash infrastructure is comprised of a number of different components.

  • KCrash: a KDE Framework performing crash interception and prepartion for handover to…
  • coredumpd: a systemd component performing process core collection and handover to…
  • DrKonqi: a GUI for crashes sending data to…
  • Sentry: a web service and UI for tracing and presenting crashes for developers

We already looked at KCrash, coredumpd, and DrKonqi. This week it’s time to look at the final piece of the puzzle — Sentry.

Sentry

Sentry is the service we have on the developer side of a crash to manage incoming reports.

As we’ve learned in the DrKonqi post, a Sentry-specific trace created by the preamble is eventually sent off to our Sentry server. In Sentry, yet more processing happens!

Symbolication

If the user hasn’t explicitly opted into it, there usually aren’t debug symbols available on the user system. This would ordinarily render backtraces useless since they are just a bunch of memory addresses without names or references to our source code. One of the reasons we adopted Sentry is because it can fill in the gaps through a process called symbolication. For symbolication it essentially needs to know all the loaded libraries and can then fetch the relevant debug symbols via the various debuginfod instances out there. Once it has the debug symbols it can resolve that the address 0x2343244 is really the function int main(int argc, char **argv)

Fingerprinting

When a trace has been symbolicated it’s ready for fingerprinting. This tries to merge together the same crash appearing in different submission into one single sentry event. Generally speaking if two submissions have the same trace frames, they are considered the same crash and merged into one event (in practice the rules are a bit more complicated).

Result

Eventually the crash event appears for us to fix.

In a future blog post, I’ll also give a more detailed guide on how to use Sentry to its full potential.

Sentry

Let’s go for my web review for the week 2025-01.


An Open Letter to All European Politicians and Leaders to Abandon X/Twitter

Tags: tech, social-media, twitter, politics

A good petition to push forward. Political leaders shouldn’t keep interacting in this cesspool.

https://www.openpetition.eu/petition/online/an-open-letter-to-all-european-politicians-and-leaders-to-abandon-x-twitter


The Ministry of Empowerment

Tags: tech, social-media, facebook, politics

Good reaction and opinion piece about the latest policy changes at Meta. This is really going to be toxic, but they just don’t care at the top.

https://www.zephoria.org/thoughts/archives/2025/01/08/the-ministry-of-empowerment.html


TikTok knows its app is harming kids, new internal documents show

Tags: tech, social-media, attention-economy, politics, law

I wish other platforms would go through so much scrutiny. Still it gives a good idea about the mental health issue they collectively represent.

https://www.npr.org/2024/10/11/g-s1-27676/tiktok-redacted-documents-in-teen-safety-lawsuit-revealed


I shared this post across 7 different social media platforms, here’s how their engagement stacked up

Tags: tech, social-media, politics, fediverse

Interesting little study of engagement on various platforms. Clearly the Fediverse could do better in terms of avoiding “friendly fire”, I suspect it’s the top reason limiting its growth.

https://fediscience.org/@kathhayhoe/113787783732811080


Time to check if you ran any of these 33 malicious Chrome extensions - Ars Technica

Tags: tech, browser, security, supply-chain

The browser extension ecosystems are definitely a weak link in term of security. Better not have too many random extensions installed.

https://arstechnica.com/security/2025/01/dozens-of-backdoored-chrome-extensions-discovered-on-2-6-million-devices/


Pushing the whole company into the past on purpose

Tags: tech, time, ntp

Sure, time handling is complicated… but really that opens the door at doing really fun stuff.

https://rachelbythebay.com/w/2025/01/09/lag/


HipScript

Tags: tech, browser, gpu, webgpu, computation, webassembly

And now we got all the pieces to run CUDA code in the browser. How will you like your cryptominer? Joke aside this opens interesting use cases.

https://lights0123.com/blog/2025/01/07/hip-script/


Property-Based Testing for the People

Tags: tech, tests, property-based-testing, usability

Very interesting research. Property-Based Testing made quite some progress the past few years but indeed it still needs to improve in term of usability. Looking forward to some of that research to get available in existing testing tools.

https://repository.upenn.edu/entities/publication/72ca3499-c5f6-4fc1-b5a3-9d66d8dd534e


End-to-end testing emails

Tags: tech, tests, email

Definitely a nice trick for testing if an email is really sent by a system under test.

https://blog.wesleyac.com/posts/e2e-testing-email


The future of htmx

Tags: tech, htmx, maintenance

This is a good goal, I wish them luck.

https://htmx.org/essays/future/


Goodbye SASS 👋, welcome back native CSS

Tags: tech, browser, frontend, web, css

With the progresses of CSS in recent years it’s clear that SASS becomes less useful.

https://medium.com/@karstenbiedermann/goodbye-sass-welcome-back-native-css-b3beb096d2b4


Unix and Microservice Platforms

Tags: tech, architecture, unix, microservices

I’m not a huge fan microservice based architectures. That said the parallel done there is interesting and a good reminder that the “write programs that do one thing and do it well” quote is incomplete.

https://www.brandonbloom.name/blog/2021/08/02/unix-and-microservice-platforms/


Overcoming Resistance to Extreme Programming

Tags: tech, agile, xp, management, learning, autonomy

Interesting exploration on the difficulties to switch a team to XP. I’m not fully aligned with some of the fine details pointed there… That said there is a core truth that “XP is about social change” so if you mandate it as a managerial decision it can’t be XP anymore.

https://benjiweber.co.uk/blog/2025/01/01/overcoming-resistance-to-extreme-programming/


Bad idea: Developer experience is equivalent to productivity

Tags: tech, productivity, developer-experience

It’s indeed tempting to conflate the two (at least for marketing purposes apparently, I see you LLM vendors…). Even if tempting, developer experience is definitely not equivalent to productivity.

https://jchyip.medium.com/bad-idea-developer-experience-is-equivalent-to-productivity-231f75c8c3f1


Engineering Growth — From Charmander to Charizard

Tags: tech, engineering, career, learning, leadership

Not a huge fan of the writing style and the pokemon metaphor. That said, seeing your growth as an engineer based on circles is spot on.

https://levelup.gitconnected.com/engineering-growth-from-charmander-to-charizard-e8fde93c69d5



Bye for now!

Thursday, 9 January 2025

Plasma Wayland Protocols 1.16.0 is now available for packaging. It is needed for the forthcoming Plasma 6.3.

URL: https://download.kde.org/stable/plasma-wayland-protocols/
SHA256: da3fbbe3fa5603f9dc9aabe948a6fc8c3b451edd1958138628e96c83649c1f16 Signed by: E0A3EB202F8E57528E13E72FD7574483BB57B18D Jonathan Riddell jr@jriddell.org

Full changelog:

  • external-brightness: Allow the client to specify observed brightness
  • output management: add a failure reason event
  • output device,-management: add a dimming multiplier
  • output device/management: add power/performance vs. color accuracy preference

Tuesday, 7 January 2025

Most operating systems nowadays provide a feature like night light: Colors are adjusted over the course of the day to remove blue light in the evening, to potentially help you sleep1 and make your eyes more comfortable.

Linux is no different; there’s Redshift to apply this on X11 desktops, and since many years ago desktop environments also ship it built in. However, there’s always been a rather annoying problem with these implementations: None of them were color managed!

What does it actually do

On a low level, these implementations set the video cards gamma curves to multiply the red, green and blue channels of the image that’s sent to the screen.

The actual intention behind the feature though is to change the white point of the image. The white point is, as the name implies, the color that we consider to be “white”. With displays, this usually means that red, green and blue are all at full intensity. By reducing the intensity of green and blue we can change that white point to some other color.

What’s wrong then?

The scenario I described only concerns itself with white, but there are more colors on the screen… If you multiply the color channels with some factors, then they get changed as well. To show how much and why it matters, I measured how this naive implementation behaves on my laptop.

These plots are using the ICtCp color space - the white point they’re relative to is in the center of the other points, the distance to it describes saturation, and the direction compared to the center the color.

Without night light, relative to 6504KPlasma 6.2 at 2000K, relative to 6504K
without night lightwith night light on 6.2

These are both relative to 6504K, but to see the result better, let’s look at it relative to their respective white points:

Without night light, relative to 6504KPlasma 6.2 at 2000K, relative to 2000K
without night lightwith night light on 6.2

To put it into words, relative to white, red looks less intense (as white has become more red). Similarly, green becomes less intensely green… but it also moves a lot towards blue! Blue meanwhile is nearly in the same spot as before. In practice, this is visible as blue staying nearly as intense as it was, and green colors on the screen get a blue tint, which is the opposite of what night light is supposed to achieve.

How to fix it

To correct this issue, we have to adapt colors to the new whitepoint during compositing. You can read up on the math here if you want, but the gist is that it estimates what color we need to show with the new whitepoint for human eyes to perceive it as similar to the original color with the original whitepoint.

If your compositor isn’t color managed, then applying this may be quite the challenge, but as KWin is already fully color managed, this didn’t take a lot of effort - we just change the colorspace of the output to use the new white point, and the renderer takes care of the rest. Let’s take a look at the results.

Without night light, relative to 6504KPlasma 6.2 at 2000K, relative to 6504KPlasma 6.3 at 2000K, relative to 6504K
without night lightwith night light on 6.2with night light on 6.3
Without night light, relative to 6504KPlasma 6.2 at 2000K, relative to 2000KPlasma 6.3 at 2000K, relative to 2000K
without night lightwith night light on 6.2with night light on 6.3

Relative to the white point, red, green and blue are now less saturated but not changed as much in color, and everything looks more like expected. To put the result in direct comparison with the naive implementation, I connected desktop PC and laptop to my monitor at the same time. On the left is Plasma 6.2, on the right Plasma 6.3:

wallpaper comparison 6.2 vs. 6.3

more specific comparison 6.2 vs. 6.3

This means that in Plasma 6.3 you can use night light without colors being wrongly shifted around, and even without sacrificing too much color accuracy2.

Caveats

Well, there’s only one caveat really: Unless your display’s native white point is 6504K, the color temperature you configure in the night light setting is a lie, even if you have an ICC profile that perfectly describes your display. This is because instead of actually moving the white point to the configured color temperature, KWin currently offsets the whole calculation by the whitepoint of the display - so that “6500K” in the settings means “no change”, independent of the display.

I intend to fix this in future Plasma versions though, so that you can also set an absolute white point for all connected displays with a convenient setting.





  1. Despite the common claims about it, scientific evidence for night light improving sleep is still lacking afaik 

  2. Adapting colors to a different white point always loses some accuracy though; for best color management results you should still configure the whitepoint on your display instead of doing it in software