docs: troubleshooting improve touch info
This commit is contained in:
parent
c4e6aaf734
commit
f88f2ba873
@ -62,58 +62,63 @@ DISPLAY=:0 xinput set-prop "<device name>" 'Coordinate Transformation Matrix' <m
|
|||||||
|
|
||||||
Where the matrix can be one of the following options:
|
Where the matrix can be one of the following options:
|
||||||
|
|
||||||
| Rotation | Matrix |
|
| Rotation | Matrix |
|
||||||
| ------------------------------------- | --------------------- |
|
|-----------------------------------------|-----------------------|
|
||||||
| 0° | `1 0 0 0 1 0 0 0 1` |
|
| 0° | `1 0 0 0 1 0 0 0 1` |
|
||||||
| 90° Clockwise | `0 -1 1 1 0 0 0 0 1` |
|
| 90° Clockwise | `0 -1 1 1 0 0 0 0 1` |
|
||||||
| 90° Counter-Clockwise | `0 1 0 -1 0 1 0 0 1` |
|
| 90° Counter-Clockwise | `0 1 0 -1 0 1 0 0 1` |
|
||||||
| 180° (Inverts X and Y) | `-1 0 1 0 -1 1 0 0 1` |
|
| 180° (Inverts X and Y) | `-1 0 1 0 -1 1 0 0 1` |
|
||||||
| invert Y | `-1 0 1 1 1 0 0 0 1` |
|
| invert Y | `-1 0 1 1 1 0 0 0 1` |
|
||||||
| invert X | `-1 0 1 0 1 0 0 0 1` |
|
| invert X | `-1 0 1 0 1 0 0 0 1` |
|
||||||
| expand to twice the size horizontally | `0.5 0 0 0 1 0 0 0 1` |
|
| expand to twice the size horizontally | `0.5 0 0 0 1 0 0 0 1` |
|
||||||
|
|
||||||
For more in-depth guidance on using Coordinate Transformation Matrices:
|
For more in-depth guidance on using Coordinate Transformation Matrices:
|
||||||
|
|
||||||
* [Ubuntu wiki InputCoordinateTransformation](https://wiki.ubuntu.com/X/InputCoordinateTransformation)
|
* [Ubuntu wiki InputCoordinateTransformation](https://wiki.ubuntu.com/X/InputCoordinateTransformation)
|
||||||
* [Libinput docs](https://wayland.freedesktop.org/libinput/doc/1.9.0/absolute_axes.html)
|
* [Libinput docs](https://wayland.freedesktop.org/libinput/doc/1.9.0/absolute_axes.html)
|
||||||
|
|
||||||
It has been reported that the touch expands with screens that don't use HDMI. This is due to the composite output,
|
To make this **permanent**, modify `/etc/udev/rules.d/51-touchscreen.rules`:
|
||||||
which enables automatically as a fallback when no HDMI device is plugged in.
|
|
||||||
If this is the case, adding `enable_tvout=0` to `/boot/config.txt` and reboot.
|
```bash
|
||||||
|
sudo nano /etc/udev/rules.d/51-touchscreen.rules
|
||||||
|
```
|
||||||
|
|
||||||
|
```sh title="51-touchscreen.rules"
|
||||||
|
ACTION=="add", ATTRS{name}=="<device name>", ENV{LIBINPUT_CALIBRATION_MATRIX}="<matrix>"
|
||||||
|
```
|
||||||
|
|
||||||
|
Close the nano editor using `ctrl`+`x` (exit), then `y` for yes (save).
|
||||||
|
|
||||||
!!! example
|
!!! example
|
||||||
|
|
||||||
|
Test:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
DISPLAY=:0 xinput set-prop "ADS7846 Touchscreen" 'Coordinate Transformation Matrix' -1 0 1 0 -1 1 0 0 1
|
DISPLAY=:0 xinput set-prop "ADS7846 Touchscreen" 'Coordinate Transformation Matrix' -1 0 1 0 -1 1 0 0 1
|
||||||
```
|
```
|
||||||
|
|
||||||
To make this permanent, modify the file `/etc/udev/rules.d/51-touchscreen.rules`:
|
Permanent modification:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo nano /etc/udev/rules.d/51-touchscreen.rules
|
sudo nano /etc/udev/rules.d/51-touchscreen.rules
|
||||||
```
|
```
|
||||||
|
|
||||||
and add following line
|
```sh title="51-touchscreen.rules"
|
||||||
|
ACTION=="add", ATTRS{name}=="ADS7846 Touchscreen", ENV{LIBINPUT_CALIBRATION_MATRIX}="-1 0 1 0 -1 1 0 0 1"
|
||||||
```sh
|
|
||||||
ACTION=="add", ATTRS{name}=="<device name>", ENV{LIBINPUT_CALIBRATION_MATRIX}="<matrix>"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Close the nano editor using `ctrl`+`x` (exit), then `y` for yes (save).
|
Close the nano editor using `ctrl`+`x` (exit), then `y` for yes (save).
|
||||||
|
|
||||||
---
|
|
||||||
|
!!! example "Alternative"
|
||||||
|
|
||||||
As an alternative **if the above doesn't work**:
|
As an alternative **if the above doesn't work**:
|
||||||
|
|
||||||
edit `/usr/share/X11/xorg.conf.d/40-libinput.conf`
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo nano /usr/share/X11/xorg.conf.d/40-libinput.conf
|
sudo nano /usr/share/X11/xorg.conf.d/40-libinput.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
With the following contents:
|
```sh title="40-libinput.conf"
|
||||||
|
|
||||||
```sh
|
|
||||||
Section "InputClass"
|
Section "InputClass"
|
||||||
Identifier "libinput touchscreen catchall"
|
Identifier "libinput touchscreen catchall"
|
||||||
MatchIsTouchscreen "on"
|
MatchIsTouchscreen "on"
|
||||||
@ -123,3 +128,26 @@ If this is the case, adding `enable_tvout=0` to `/boot/config.txt` and reboot.
|
|||||||
EndSection
|
EndSection
|
||||||
```
|
```
|
||||||
Close the nano editor using `ctrl`+`x` (exit), then `y` for yes (save).
|
Close the nano editor using `ctrl`+`x` (exit), then `y` for yes (save).
|
||||||
|
|
||||||
|
## Touch is expanded:
|
||||||
|
|
||||||
|
This can be due to other framebuffers being active, for example the composite output of Raspberries
|
||||||
|
may be enabled automatically as a fallback when no HDMI device is plugged in.
|
||||||
|
If this is the case:
|
||||||
|
|
||||||
|
Open `/boot/config.txt` for editing:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo nano /boot/config.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
add at the bottom (in the `[all]` section)
|
||||||
|
|
||||||
|
```sh title="config.txt"
|
||||||
|
enable_tvout=0
|
||||||
|
max_frambefubbers=1
|
||||||
|
```
|
||||||
|
|
||||||
|
Close the nano editor using `ctrl`+`x` (exit), then `y` for yes (save).
|
||||||
|
|
||||||
|
**Reboot** to apply changes.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user