Auto screen rotation + keyboard disable

So I am testing out this device mentioned here:

  • Manjaro/GNOME successfully boots into it
  • The touchscreen works - I can scroll through PDFs with touch
  • Touch-clicking works - I can click on icons and they open
  • Digital pen works - it works in the sense that there aren’t any drawing programs I can test it on, but it can scroll/select

What doesn’t work is:

  1. Screen rotation - it remains in landscape mode all the time, even when I rotate the device in portrait mode
  2. Keyboard/trackpad disable when laptop is rotated - the keyboard is still active and with any slight pressure a key can be touched or trackpad activated
  3. On-screen keyboard does not show - should it?

I also looked at the Arch Wiki: Tablet PC - ArchWiki but it is unclear which path to take for this because many of the things suggested there are for X11 and not Wayland.

The output of xrandr shows:

(normal left inverted right x axis y axis)

Should I install the following:

  • iio-sensor-proxy
  • tablet-mode
  • detect-tablet-mode

or is there a clearer way to get the full functionality of the tablet-specific stuff?

I am documenting my adjustments here so everyone else can benefit.

At the moment, iio-sensor-proxy is installed but doesn’t switch on. I tried:

systemctl start iio-sensor-proxy

Then:

systemctl status iio-sensor-proxy

Output:

...systemd[1]: Starting IIO Sensor Proxy service...
...systemd[1]: Started IIO Sensor Proxy service.
...systemd[1]: iio-sensor-proxy.service: Deactivated successfully.

Still figuring that out…

tablet-mode is a package that needs to be installed to actually get a tablet mode on a 2-in-1 device. It is an AUR package, so:

sudo pamac build tablet-mode

After it builds successfully, check for the input devices:

sudo libinput list-devices

I recommend first testing it by just deactivating the keyboard.

As the instructions on tablet-mode GitHub say, create the JSON file by running:

sudo nano /etc/tablet-mode.json

Add this in the JSON:

{
    "tablet": [
        "/dev/input/eventX"
    ],
    "notify": false,
}

For the keyboard deactivation I had to add 2 events. They both had Capabilities: keyboard as their output for sudo libinput list-devices

Test it by looking for the tablet-mode icon and choosing it.

Bonus: Once the keyboard is disabled, GNOME becomes nice enough to give an on-screen keyboard, so you don’t need to install one.

Deactivate by finding tablet-mode icon and choosing it.

Once mouse-input is added, the device should be tablet-only completely.

Further update:

Wayland

The problems with screen rotation are on Wayland only. I tested iio-sensor-proxy with the latest Fedora which had it installed. It was running, but the screen rotation still doesn’t work.

The fix for screen rotation I found is here: How to rotate screen on wayland

So if iio-sensor-proxy just doesn’t work for you, try this:

  1. For disabling the keyboard/mouse, use my instructions above(Tablet Mode)
  2. For rotating the screen, use this version of gnome-randr.py

This should work for any DEs using Wayland with functioning hardware. You won’t get auto-rotation but at least you will get a proper tablet mode on your 2-in-1.

X11

X11 is awesome. Rotating your screen is easy, like so:

xrandr -o <orientation>

You have many options though. I recommend doing your reading on the following things in order:

  1. Tablet PC
  2. This answer on Ask Ubuntu
  3. and then this answer on Ask Ubuntu

Your options are much greater but I chose to look for a solution for Wayland because it seems to have better touch support than X11. One example is that Wayland can scroll/zoom by default in FF but X11 requires some settings change.

Issue is pretty much solved now, unless someone else knows something about Wayland that I don’t know.

Hope this helps!

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.