# Tablet Mode and Screen Rotation on Linux

> The Framework Laptop 12 supports tablet mode detection and automatic screen rotation These features may require specific kernel modules or configuration depend

Source: https://knowledgebase.frame.work/en_us/tablet-mode-and-screen-rotation-on-linux-SJkaIhBSbg

Last updated: 2026-01-15T00:50:13.887Z

The Framework Laptop 12 supports tablet mode detection and automatic screen rotation. These features may require specific kernel modules or configuration depending on your distribution. This guide covers how to verify and troubleshoot both features.

For stylus configuration and troubleshooting, see [**Stylus Setup and Troubleshooting on Linux**](https://knowledgebase.frame.work/en_us/stylus-setup-and-troubleshooting-on-linux-B1J5djrSbx).

## Tablet Mode

Tablet mode allows the system to detect when the display is folded back, enabling touch-friendly interfaces and disabling the keyboard.

### Required Kernel Modules

Tablet mode detection requires two kernel modules:

*   `pinctrl_tigerlake` — Must be built into the kernel or loaded first
*   `soc_button_array` — Handles GPIO button events including tablet mode switch

### 1\. Check That Both Modules Are Loaded

sudo lsmod | grep -e pinctrl\_tigerlake -e soc\_button\_array

Expected output:

pinctrl\_tigerlake    24576 0
soc\_button\_array     28672 5

If missing, load them manually:

sudo modprobe pinctrl\_tigerlake soc\_button\_array

### 2\. Check That the Kernel Recognized the Tablet Mode GPIO

journalctl -k | grep gpio-keys

Expected output:

Feb 27 19:14:00 fedora kernel: input: gpio-keys as /devices/platform/INT33D3:00/gpio-keys.1.auto/input/input17

If this doesn't appear, `pinctrl_tigerlake` may have loaded after `soc_button_array`. Reload them in the correct order:

sudo rmmod soc\_button\_array
sudo modprobe soc\_button\_array

To make this permanent, configure your distribution to load `pinctrl_tigerlake` in initrd. For Arch Linux users, see [**Arch Linux Tablet Mode Setup**](https://github.com/FrameworkComputer/linux-docs/blob/main/framework12/Arch-accel.md#arch-linux-tablet-mode-setup).

#### NixOS Configuration

The [**nixos-hardware**](https://github.com/NixOS/nixos-hardware/tree/master/framework/12-inch/13th-gen-intel) repository provides tweaks for Framework Laptop 12. Enable it by adding the `<nixos-hardware/framework/12-inch/13th-gen-intel>` module to your NixOS modules.

Alternatively, configure tablet mode manually:

boot.initrd.kernelModules = \[ "pinctrl\_tigerlake" \];

### 3\. Check That libinput Can See Tablet Mode Changes

Run the following command and fold/unfold the display:

sudo libinput debug-events | grep SWITCH\_TOGGLE

Expected output:

event13  SWITCH\_TOGGLE    +0.000s   switch tablet-mode state 1
event13  SWITCH\_TOGGLE    +1.360s   switch tablet-mode state 0

If the kernel modules are loaded correctly, this should work. If not, please contact Framework Support.

## Screen Rotation

GNOME, KDE, and Windows only rotate the screen automatically when the system is in tablet mode. Verify tablet mode is working before troubleshooting screen rotation.

**Tip:** If you want to rotate in laptop mode, KDE has a built-in setting and GNOME has plugins available to enable this.

Screen rotation requires the `cros_ec_sensors` kernel driver, which reads accelerometer data from the EC controller. This is supported on Framework Laptop 12 since Linux 6.12. The `iio-sensor-proxy` daemon interprets accelerometer data as screen orientation and forwards it to GNOME/KDE via D-Bus.

### 1\. Check That the EC Driver Recognizes the System

sudo dmesg | grep cros\_ec

Expected output:

\[    9.014454\] cros\_ec\_lpcs cros\_ec\_lpcs.0: loaded with quirks 00000001
\[    9.025815\] cros\_ec\_lpcs cros\_ec\_lpcs.0: Chrome EC device registered

If this doesn't appear, your kernel is likely older than 6.12.

### 2\. Check That the Sensor Is Working

Run the following command and verify that lid angle and sensor data respond when you move the device or bend the lid:

sudo watch -n1 framework\_tool --sensors

Expected output:

Accelerometers:
  Lid Angle:   118 Deg
  Lid Sensor:  X=+0.00G Y=+0.86G, Z=+0.53G
  Base Sensor: X=-0.03G Y=-0.07G, Z=+1.02G

This requires `framework_tool`. See [**Framework System on Linux**](https://knowledgebase.frame.work/en_us/framework-system-on-linux-a-tool-to-monitor-configure-and-update-framework-laptop-hardware-HJbak1uRel) for installation instructions.

### 3\. Check That the Kernel Exposes Accelerometer Data

cat /sys/bus/iio/devices/iio:device0/{name,label,in\_accel\_{x,y,z}\_raw}

Expected output:

cros-ec-accel
accel-display
-192
14400
6672

If this isn't working, please contact Framework Support.

### 4\. Check That the iio-sensor-proxy Daemon Is Running

systemctl status iio-sensor-proxy.service | grep Active

Expected output:

Active: active (running) since Thu 2025-02-27 19:14:02 CST; 19h ago

If not running, ensure the package is installed and the service is enabled.

### 5\. Check That the Daemon Recognizes the Sensor

monitor-sensor --accel

Expected output:

    Waiting for iio-sensor-proxy to appear
+++ iio-sensor-proxy appeared
=== Has accelerometer (orientation: normal)
    Accelerometer orientation changed: right-up
    Accelerometer orientation changed: normal

### iio-sensor-proxy 3.7 Regression

If `monitor-sensor` doesn't recognize the accelerometer, you may be running iio-sensor-proxy 3.7, which has a [known regression](https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/400) fixed in version 3.8.

If your distribution hasn't updated to 3.8, you can either downgrade to 3.6 or apply a workaround by removing a line in the udev config:

sed 's/.\*iio-buffer-accel/#&/' /usr/lib/udev/rules.d/80-iio-sensor-proxy.rules | sudo tee /etc/udev/rules.d/80-iio-sensor-proxy.rules
sudo udevadm trigger --settle
sudo systemctl restart iio-sensor-proxy

#### NixOS Workaround

NixOS 25.05 and 25.11 (unstable) include patches for the iio-sensor-proxy 3.7 bug ([#427476](https://github.com/NixOS/nixpkgs/pull/427476), [#427853](https://github.com/NixOS/nixpkgs/pull/427853)). If you haven't got the patched version yet, apply this overlay:

nixpkgs.overlays = \[
  (final: prev: {
    iio-sensor-proxy = prev.iio-sensor-proxy.overrideAttrs (oldAttrs: {
      postPatch = oldAttrs.postPatch + ''
      sed -i -e 's/.\*iio-buffer-accel/#&/' data/80-iio-sensor-proxy.rules
      '';
    });
  })
\];

See distribution-specific documentation for further details. Current versions by distribution (only 3.7 is affected):

Distribution

Version

Fedora 42/43

[Check Repology](https://repology.org/project/iio-sensor-proxy/versions)

Ubuntu 24.04 LTS / 25.10

[Check Repology](https://repology.org/project/iio-sensor-proxy/versions)

Arch Linux

[Check Repology](https://repology.org/project/iio-sensor-proxy/versions)

Debian 12/13

[Check Repology](https://repology.org/project/iio-sensor-proxy/versions)

NixOS stable/unstable

[Check Repology](https://repology.org/project/iio-sensor-proxy/versions)
