Skip to content

Commit 4d1de4d

Browse files
authored
Merge pull request #62 from tynen/framework12-accel-arch
Fix: Enable Tablet Mode Auto-Rotation on Arch Linux
2 parents a70134c + a06fa05 commit 4d1de4d

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

framework12/Arch-accel.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Arch Linux Tablet Mode Setup
2+
3+
This guide will help you enable automatic screen rotation on Arch Linux and its derivatives. On many systems, the required package is not installed by default, and the available version may require a workaround to function correctly.
4+
5+
> Rather not deal with this at all? [Bazzite](https://guides.frame.work/Guide/Bazzite+Installation+on+the+Framework+Laptop+12/409?lang=en) and [Fedora](https://guides.frame.work/Guide/Fedora+42+Installation+on+the+Framework+Laptop+12/410?lang=en) have this working out of the box, with zero configuration required.
6+
7+
On a standard Arch Linux installation, the `iio-sensor-proxy` package that manages accelerometer data is not installed. Furthermore, some repositories may provide version 3.7, which has [a bug](https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/issues/411) preventing it from delivering sensor events to your desktop environment (GNOME, KDE, etc.).
8+
9+
The following steps will guide you through installing the package and applying the necessary fix.
10+
11+
### Step 1: Install `iio-sensor-proxy`
12+
13+
First, open a terminal and install the package using `pacman`.
14+
15+
```bash
16+
sudo pacman -S iio-sensor-proxy
17+
````
18+
19+
### Step 2: Apply the udev Workaround
20+
21+
Next, apply the one-line command to fix the bug. This command comments out the problematic rule and reloads the system services.
22+
23+
```bash
24+
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
25+
sudo udevadm trigger --settle
26+
sudo systemctl restart iio-sensor-proxy
27+
```
28+
29+
### Step 3: Verify the Fix
30+
31+
Finally, you can check if screen rotation is working correctly.
32+
33+
```bash
34+
monitor-sensor --accel
35+
```
36+
37+
You should see the following output, confirming the accelerometer is detected:
38+
39+
```
40+
Waiting for iio-sensor-proxy to appear
41+
+++ iio-sensor-proxy appeared
42+
=== Has accelerometer (orientation: normal)
43+
```
44+
45+
> Tablet rotation mode should now work immediately. However, if for some reason it does not, reboot your computer and then test rotation again. Remember to flip the screen completely back to test rotation properly.
46+
47+
```
48+
```

0 commit comments

Comments
 (0)