Skip to content

Commit 14ece7a

Browse files
authored
Merge pull request #58 from FrameworkComputer/fw12-debugging
framework12: Add step-by-step debug instructions (looks good)
2 parents 2e4838c + de71f5c commit 14ece7a

File tree

1 file changed

+136
-0
lines changed

1 file changed

+136
-0
lines changed

framework12/debugging.md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Framework 12 - Debugging
2+
3+
Framework 12 has a couple of features not present on our other systems.
4+
They might not work on some installations, these instructions here help you find the root cause and how to fix it.
5+
6+
## Touchpad
7+
8+
No special configuration or recent kernel version needed.
9+
Kernel 6.x with libinput can work.
10+
11+
## Touchscreen
12+
13+
No special configuration or recent kernel version needed.
14+
Kernel 6.x with libinput can work.
15+
16+
## Tablet Mode
17+
18+
Kernel drivers required:
19+
20+
- `pinctrl_tigerlake` (Must be built into the kernel or load first)
21+
- [`soc_button_array`](https://github.com/torvalds/linux/blob/master/drivers/input/misc/soc_button_array.c)
22+
23+
### Check that both modules are loaded
24+
25+
```
26+
> sudo lsmod | grep -e pinctrl_tigerlake -e soc_button_array
27+
pinctrl_tigerlake 24576 0
28+
soc_button_array 28672 5
29+
```
30+
31+
If no, you can load them manually:
32+
33+
```
34+
> sudo modprobe pinctrl_tigerlake soc_button_array
35+
```
36+
37+
### Check that the kernel recognized the tabletmode GPIO
38+
39+
```
40+
> journalctl -k | grep gpio-keys
41+
Feb 27 19:14:00 fedora kernel: input: gpio-keys as /devices/platform/INT33D3:00/gpio-keys.1.auto/input/input17
42+
```
43+
44+
If no, then `pinctrl_tigerlake` might have loaded after `soc_button_array`.
45+
Reload them manually in the right order:
46+
47+
```
48+
sudo rmmod soc_button_array
49+
sudo modprobe soc_button_array
50+
```
51+
52+
To make this permanent you can configure your distribution to load
53+
`pinctrl_tigerlake` in initrd.
54+
55+
### Check that libinput can see tablet mode changes
56+
57+
```
58+
> sudo libinput debug-events | grep SWITCH_TOGGLE
59+
-event13 SWITCH_TOGGLE +0.000s switch tablet-mode state 1
60+
event13 SWITCH_TOGGLE +1.360s switch tablet-mode state 0
61+
```
62+
63+
We have not seen this fail, if the kernel modules are okay, this should work.
64+
If not, please contact Framework.
65+
66+
## Screen Rotation
67+
68+
GNOME, KDE, Windows all rotate the screen only if the system is in tablet mode,
69+
so please check if that's working first.
70+
71+
If you want to rotate in laptop mode, KDE has a setting and GNOME has a plugin to do that.
72+
73+
The kernel driver
74+
[`cros_ec_sensors`](https://github.com/torvalds/linux/blob/master/drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c)
75+
reads accelerometer from the EC controller. This is supported on Framework 12
76+
since Linux 6.12.
77+
78+
iio-sensor-proxy interprets that accelerometer data as a screen orientation and
79+
forwards it to GNOME/KDE via dbus.
80+
81+
### Check that the EC driver recognizes the system
82+
83+
```
84+
> sudo dmesg | grep cros_ec
85+
[ 9.014454] cros_ec_lpcs cros_ec_lpcs.0: loaded with quirks 00000001
86+
[ 9.025815] cros_ec_lpcs cros_ec_lpcs.0: Chrome EC device registered
87+
```
88+
89+
If no, likely your kernel is older than 6.12.
90+
91+
### Check that the kernel exposes accelerometer data
92+
93+
```
94+
> cat /sys/bus/iio/devices/iio:device0{name,label,in_accel_{x,y,z}_raw}
95+
cros-ec-accel
96+
accel-display
97+
-192
98+
14400
99+
6672
100+
```
101+
102+
If that is not working, please contact Framework.
103+
104+
### Check that the iio-sensor-proxy daemon is runnning
105+
106+
```
107+
> systemctl status iio-sensor-proxy.service | grep Active
108+
Active: active (running) since Thu 2025-02-27 19:14:02 CST; 19h ago
109+
```
110+
111+
If no, make sure the package is installed and the service is enabled and running.
112+
113+
114+
### Check that the daemon can be accessed and recognizes the sensor
115+
116+
```
117+
> monitor-sensor --accel
118+
Waiting for iio-sensor-proxy to appear
119+
+++ iio-sensor-proxy appeared
120+
=== Has accelerometer (orientation: normal)
121+
Accelerometer orientation changed: right-up
122+
Accelerometer orientation changed: normal
123+
```
124+
125+
If not, you are likely running iio-sensor-proxy 3.7.
126+
A fix has been [merged upstream](https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/400).
127+
Until the next release has reached distributions, you can either downgrade to
128+
3.7 or remove a line in the udev config:
129+
130+
```
131+
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
132+
sudo udevadm trigger --settle
133+
sudo systemctl restart iio-sensor-proxy
134+
```
135+
136+
Please see our distribution specific documentation for further details.

0 commit comments

Comments
 (0)