Tablet settings are not persisted across kwin sessions

Hello everyone!

I recently bought a drawing tablet — it works great out of the box and in Krita. I have a very wide screen and I want the drawing tablet’s area to be mapped only to a certain area of the monitor. I can configure this in the corresponding system settings module. In the following, I’m going to describe a problem I’m having with the settings. Can you reproduce this bug? If so, I’d open a ticket on the bug tracker for it.

Problematic behavior

Changes made in the drawing tablet section of system settings are applied to the current session correctly. However, the settings are reset to their default values when I end the session (i.e. log out and log back in, or reboot the system). The settings do not reset when I merely reconnect the drawing tablet via bluetooth.

Investigation

I have looked through the configuration files in ~/.config, ~/.cache and ~/.local but none of the KDE-related files appear to store the settings. I investigated how the drawing tablet input stack works under wayland, and it turns out that the input is handled by libinputand thatkwinis responsible for passing the settings to the libinput library. Therefore, I would expect kwin to also store the settings, for example in ~/.config/kwinrc.

It appears to me that kwin simply doesn’t save the settings, but only applies them for the currently running session. But it could conceivably also be a problem with the system settings, e.g. if the button “save” was wired to only “apply” the settings.

Workaround

Either configure the settings again in each session, or use a different driver such as OpenTabletDriver which works independently from KDE Plasma and libinput. OpenTabletDriver lacks Bluetooth support though.

System Information

Operating System: NixOS 25.11
KDE Plasma Version: 6.5.4
KDE Frameworks Version: 6.20.0
Qt Version: 6.10.1
Kernel Version: 6.12.63 (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 9950X 16-Core Processor
Memory: 96 GiB of RAM (92.0 GiB usable)
Graphics Processor 1: AMD Radeon RX 6700 XT
Graphics Processor 2: AMD Ryzen 9 9950X 16-Core Processor
Manufacturer: ASUS

I’m using the Wacom Intuos CTL-4100WL drawing tablet.

Anyone have any thoughts?

It does, IIRC in ~/.config/kcminputrc

TL;DR: It’s a configuration issue which I can fix once Bug 422529 gets fixed. Thanks for the pointer!

Long Answer

It seems last time I missed a line in journalctl. KWin failed to write the file:

Feb 13 17:30:09 hostname kwin_wayland[5597]: Couldn't write "/home/username/.config/kcminputrc" . Disk full?

Turns out this is due to the way I have my system configured: I choose which configuration files live on a persistent filesystem and which live on a tmpfs — among NixOS users this is a known pattern called impermanence. To do this, ~/.config/kcminputrc gets bind-mounted from a different filesystem. The file appears as a normal file, and directly writing to it works fine. But some applications try to replace the file near-atomically by first writing a second file and then moving it to ~/.config/kcminputrc. The second approach does not work on bind-mounted files. I assume KWin does this and it fails because of it.

I understand that most users do not have this kind of setup, but I feel like like KDE can offer a good path for users like me with relatively little changes. There are two potential changes, either of which would allow impermanence users to configure their system properly:

  • Fall back to regular writing if replacing the file fails.
    or
  • Put the config file in a subdirectory.
    Due to the location of ~/.config/kcminputrc, I am forced to either (a) link/mount all of ~/.config/ which removes most benefits of an impermanence setup, or (b) use the troublesome mount for ~/.config/kcminputrc and manually move files around when I want to change settings.

The latter change has been proposed already in Bug 422529.