Tablet mode in KDE? (auto-rotate, virtual keyboard)

I just installed my Framework 12 (13th Gen Intel® Core™,sage!) with Debian GNU/Linux 13rc2 (“trixie”, release real soon, kernel 6.12.35+deb13-amd64), with a KDE 6 “plasma” desktop. dmidecode says I’m running BIOS 3.3 but I tried running LVFS as per Framework Laptop 12 BIOS and Driver Releases (13th Gen Intel® Core™) but it did not do anything.

I wonder if people have figured out how to make the sensors work for automatic rotation and popping open virtual keyboard as necessary when in “tablet” mode.

So far, I could only find an empty “virtual keyboard” section in the settings, and the screen, well, it just doesn’t auto-rotate by default.

Everything so far is pretty smooth, and those issues are probably software (rather than hardware) related, but still, maybe someone else figured those out?

2 Likes

So, first thing, I have perhaps posted this before exhausting all avenues here, but I feel it is still useful as I will report what I find!

It seems like, for the virtual keyboard, you need to install maalit-keyboard, then enable it in the “virtual keyboard” settings, found on How to enable virtual keyboard included in KDE? - #11 by Barak_Roberts - Help - KDE Discuss.

So at least that part should be solved! And it works smartly, in that it turns on only when the lid is flipped (and, presumably, because the keyboard disappears).

Also, it looks like there’s a bug affecting Ubuntu (and also Debian), according to What are the Linux system requirements for tablet mode? (which somehow I didn’t find while searching this forum)… I followed this guide and now monitor-sensor --accel works, but KDE doesn’t rotate the display automatically yet.

root@dorothea:~# monitor-sensor --accel
    Waiting for iio-sensor-proxy to appear
+++ iio-sensor-proxy appeared
=== Has accelerometer (orientation: undefined, tilt: undefined)
    Accelerometer orientation changed: normal
    Tilt changed: vertical
    Accelerometer orientation changed: left-up
    Accelerometer orientation changed: normal
    Accelerometer orientation changed: right-up
    Accelerometer orientation changed: normal

so this could be a KDE issue as well?

Looks like this thread might be a duplicate of What are the Linux system requirements for tablet mode?

Final update: rebooting fixed it!

All good, and amazing, that. :slight_smile:

2 Likes

This is actually a setting in KDE’s System Settings under
“Workspace” → “General Behavior” → Scroll down to “Touch”

Version 3.04 just hasn’t been uploaded to LVFS’s servers yet (at the time of writing*)
See here:

If you write the Fedora KDE live ISO to a thumb drive, and then boot into the live environment from it, does it work “out of the box” without any fiddling whatsoever?

Should someone stumble on this topic while troubleshooting:
If you are on Arch or NixOS and the first option ‘Automatically enable…’ does not work, this is because for this to work pinctrl_tigerlake needs to be loaded before soc_button_array.
Some distros (for example arch) load pinctrl_tigerlake as a module instead of building it into the kernel resulting in it being loaded after soc_button_array.


To fix this in Arch:

add

MODULES=(pinctrl_tigerlake)

to /etc/mkinitcpio.conf


To fix this on NixOS
add

  boot.initrd.kernelModules = [ "pinctrl_tigerlake" ];

to configuration.nix


For more info look here:

3 Likes

What a superb followup. This is the way. I’m not affected, but thank you!

Thanks, this fixed my lack of touch mode on Arch!

Just in case it’s of interest to somebody:

On a system with:

Debian Bookworm 12.11
KDE Plasma 5.27.5
Kernel 6.1.0-37

I realize this is an unsupported OS and an older kernel, but I wanted to see what worked and what didn’t.

I installed maliit-keyboardand selected it under System Settings → Input Devices → Virtual Keyboard.

Flipping the FW12 into tablet mode correctly disables the keyboard and touchpad. A virtual keyboard icon appears in the taskbar, and activates when you click on text fields. Flipping back into laptop mode correctly enables the keyboard and touchpad, and deactivates the virtual keyboard.

Screen rotation does not work; presumably because that requires kernel 6.12 for the `cros_ec_sensors` driver.

Running through some debugging commands just to see what they show…

linux-docs/framework12/debugging.md at main · FrameworkComputer/linux-docs · GitHub

Works:

  • lsmod shows only soc_button_array, not pinctrl_tigerlake, but tablet mode works anyway
  • journalctl -k does show gpio-keys
  • After installing libinput-tools, libinput debug-events shows the expected SWITCH_TOGGLE events

Doesn’t work (because the kernel is too old):

  • dmesg doesn’t show cros_ec
  • There is no /sys/bus/iio/ directory
  • iio-sensor-proxy.service is “inactive (dead)”
  • monitor-sensor --accel waits forever for iio-sensor-proxy to appear

Just to be thorough I tried the udev rules tweak and rebooted, with no change.

Allegedly Debian Trixie will release (to stable) on August 9th, so I’ll wait a couple days and then do a fresh install with that to get screen rotation working. But I’m pleased that everything else seems to be working fine out of the box on Debian 12 + KDE. The media buttons work, wifi and audio work, webcam works, battery status displays properly, etc.

Could you please confirm for me that in laptop mode, when maliit is not explicitly enabled with a tray icon, your virtual keyboard does not pop up if you tap a text field on the touchscreen?

I’m having this exact issue with bazzite, and it doesn’t seem like there is even a setting for restricting maliit to only appear when no physical keyboard is detected. Automatic touch mode and restricting rotatoion to touch mode works. I’m just curious if I’m running into an isolated bug or a missing feature.

… it doesn’t seem like there is even a setting for restricting maliit to only appear when no physical keyboard is detected …

I think you’re right. Here’s what I see:

In laptop mode, the keyboard tray icon (“Input Method”) is still present, but is hidden under the “Show hidden icons” caret. When I switch to tablet mode, the icon moves to the active part of the tray, but its state does not change.

It starts out set to “Virtual Keyboard: enabled” (green dot showing). In that mode, touching a text field opens the on-screen keyboard, regardless of whether I’m in tablet mode or laptop mode.

If I switch it to “Virtual Keyboard: disabled” (no dot), touching a text field does nothing regardless of mode.

I agree that I’m not able to find a setting to prevent the virtual keyboard from appearing in laptop mode but still allow it to appear in tablet mode. Obviously you can use the tray icon to toggle back and forth between modes, but that’s an extra tap each time.

I am able to swipe the virtual keyboard down off of the screen again if I don’t want it. Swiping it all the way off the screen allows it to reopen the next time I tap on the text field. Swiping it down most of the way (leaving a white bar at the bottom of the screen) keeps it hidden for subsequent taps, until I tap off of the current program.

Thank you for sharing, so it doesn’t seem like a me issue. I’d have expected something like this to be already be a feature. Using the touchscreen in laptop mode is far less convenient when the virtual keyboard just randomly pops up if I touch the wron spot.

Let’s see if I can cobble together something with udev rules…

1 Like

This disables the virtual keyboard using the same method as the tray icon:

qdbus org.kde.KWin /VirtualKeyboard org.freedesktop.DBus.Properties.Set org.kde.kwin.VirtualKeyboard enabled false

And this re-enables it:

qdbus org.kde.KWin /VirtualKeyboard org.freedesktop.DBus.Properties.Set org.kde.kwin.VirtualKeyboard enabled true

But I’m not finding an easy way to trigger that from the libinput events.

[Edit: If you don’t have qdbus you might have qdbus6 which should work the same.]

1 Like

Thanks, that’s one less thing to find!

I’ll not have time to mess with this for the next week, but hopefully I can find the right triggers after.

Also see my guide for kubuntu for KDE plasma setup

On a system with:

Debian Bookworm 13.0 (Trixie; the new Debian Stable)
KDE Plasma 6.3.6
Kernel 6.12.38

Installed maliit-keyboard and selected it under System Settings → Input & Output → Keyboard → Virtual Keyboard.

Installed iio-sensor-proxy, applied the udev fix, and rebooted.

I did NOT need to do anything with pinctrl_tigerlake; that must already be OK on this distro.

Tablet mode works as expected; moving the hinge past 180 degrees puts icons in “touch” mode and disables the keyboard & mouse. While in tablet mode, the display auto-rotates as expected. Returning back to laptop mode works correctly.

As before it does not appear to be possible to configure the virtual keyboard to only appear in tablet mode; it appears for any touch input in any mode. In Debian 12 I was able to swipe the keyboard most (but not all) of the way off the screen to suppress it for subsequent taps on the same application. In Debian 13 that doesn’t appear to be possible either; I can only swipe the keyboard fully away, so it comes back on the next tap.

Is there any easy way to change the virtual keyboard when entering and exiting tablet mode? I’m currently studying Chinese, so I’m using ibus for inut in laptop mode; I’d rather not have to manually change the virtual keyboard every time I want to go into tablet mode.

1 Like

maliit-keyboard has some settings visible via gsettings:

$ gsettings list-recursively org.maliit.keyboard.maliit
org.maliit.keyboard.maliit active-language 'en'
...
org.maliit.keyboard.maliit enabled-languages ['en']

You can adjust those with `gsettings set org.maliit.keyboard.maliit `.

I don’t know if any of those are relevant to your setup, but it might be worth taking a look.

I don’t currently have time to do this myself, surely some Fedora enthusiast will be able to! :slight_smile:

I’m having this same issue with my FW12 on Fedora KDE. Trying to use the touchscreen in laptop mode leads to the onscreen keyboard popping up. Tapping the new tab button on Firefox, opening the settings menu, or any other touch input that results in an automatically selected text input.

Has anyone been able to fix this problem? I ended up going back to gnome, but I vastly prefer everything else about KDE. It feels like there should be an easy way to use the built in touch-mode conversion to automatically enable and disable the onscreen keyboard, but so far I haven’t found anything that actually solves this.

Same here and am using gnome for this reason.

I think KDE plasma dropped the effort to implement good touchscreen-support. The behaviour of the on-screen-keyboard isn’t adjustable.

I hope KDE will someday find their way to touchscreens….

1 Like