From aa1dfabd409cce846cf1ce6502c6a1a32e0d54eb Mon Sep 17 00:00:00 2001 From: alfrix Date: Sat, 16 Sep 2023 19:02:07 -0300 Subject: [PATCH] docs: close #1120 and other minor updates --- docs/Configuration.md | 3 +- docs/Hardware.md | 65 +----------------- docs/Troubleshooting/Physical_Install.md | 5 +- docs/Troubleshooting/Touch_issues.md | 85 ++++++++++++------------ 4 files changed, 49 insertions(+), 109 deletions(-) diff --git a/docs/Configuration.md b/docs/Configuration.md index b7780f20..bcc340e6 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -88,7 +88,8 @@ calibrate_y_position: 100 # define the screw positons required for odd number of screws in a comma separated list # possible values are: bl, br, bm, fl, fr, fm, lm, rm, center # they correspond to back-left, back-right, back-middle, front-left, front-right, front-middle, left-middle, right-middle -screw_positions: "" +# example: +screw_positions: bl, br, fm # Rotation is useful if the screen is not directly in front of the machine. # Valid values are 0 90 180 270 diff --git a/docs/Hardware.md b/docs/Hardware.md index 4aab4141..7be34c1d 100644 --- a/docs/Hardware.md +++ b/docs/Hardware.md @@ -123,68 +123,5 @@ here are some examples: ## Touchscreen touch rotation -If your touchscreen isn't registering touches properly after the screen has been rotated, you will need to apply a -transformation matrix. -First you will need your device name, on a terminal run: - -```sh -DISPLAY=:0 xinput -``` - -Output: -```sh -⎡ Virtual core pointer id=2 [master pointer (3)] -⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] -⎜ ↳ ADS7846 Touchscreen id=6 [slave pointer (2)] -⎣ Virtual core keyboard id=3 [master keyboard (2)] - ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] -``` -In this case the device is the ADS7846 Touchscreen, yours may be different - -You can test a change by running: - -```sh -DISPLAY=:0 xinput set-prop "" 'Coordinate Transformation Matrix' -``` - -Where the matrix can be one of the following options: - -* 0°: `1 0 0 0 1 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` -* 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 X: `-1 0 1 0 1 0 0 0 1` - -For example: - -```sh -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` and add following line: - -```sh -ACTION=="add", ATTRS{name}=="", ENV{LIBINPUT_CALIBRATION_MATRIX}="" -``` - -As an alternative if the above doesn't work: - -edit /usr/share/X11/xorg.conf.d/40-libinput.conf - -for example: -```sh -Section "InputClass" - Identifier "libinput touchscreen catchall" - MatchIsTouchscreen "on" - MatchDevicePath "/dev/input/event*" - Driver "libinput" - Option "TransformationMatrix" "0 -1 1 1 0 0 0 0 1" -EndSection -``` - -More info about input transformation can be found in: - -* [Ubuntu wiki InputCoordinateTransformation](https://wiki.ubuntu.com/X/InputCoordinateTransformation) -* [Libinput docs](https://wayland.freedesktop.org/libinput/doc/1.9.0/absolute_axes.html) +[Moved to Touch issues](./Troubleshooting/Touch_issues.md) diff --git a/docs/Troubleshooting/Physical_Install.md b/docs/Troubleshooting/Physical_Install.md index 0396de8b..129aa7a2 100644 --- a/docs/Troubleshooting/Physical_Install.md +++ b/docs/Troubleshooting/Physical_Install.md @@ -8,8 +8,9 @@ If the screen never shows the console even during startup, Then it's typically a ## Cable issues * Check that the cable is inserted properly: -it shouldn't be loose, and in the case of DSI make sure the contacts face the right way -* If the touchscreen is connected via USB, try another port if available, if you are using a HUB try connecting the touch directly without the HUB. +it shouldn't be loose, and in the case of ribbon cables like DSI make sure the contacts face the right way +* If the touchscreen is connected via USB, try another port if available, + if you are using a HUB try connecting the touch directly without the HUB. * If the board has more than one HDMI try the other port ## Driver issues diff --git a/docs/Troubleshooting/Touch_issues.md b/docs/Troubleshooting/Touch_issues.md index 7f0ded46..20a40784 100644 --- a/docs/Troubleshooting/Touch_issues.md +++ b/docs/Troubleshooting/Touch_issues.md @@ -63,49 +63,50 @@ DISPLAY=:0 xinput set-prop "" 'Coordinate Transformation Matrix' + | Rotation | Matrix | + | - | - | + | 0° | `1 0 0 0 1 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` | + | 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 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` | -For more in-depth guidance on using Coordinate Transformation Matrices, see [InputCoordinateTransformation - Ubuntu Wiki](https://wiki.ubuntu.com/X/InputCoordinateTransformation). - -It has been reported that the touch expands with screens that don't use HDMI. This is due to the composite output, 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. - -For example: - -```sh -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` and add following line: - -```sh -ACTION=="add", ATTRS{name}=="", ENV{LIBINPUT_CALIBRATION_MATRIX}="" -``` - -As an alternative if the above doesn't work: - -edit `/usr/share/X11/xorg.conf.d/40-libinput.conf` - -for example: - -```sh -Section "InputClass" - Identifier "libinput touchscreen catchall" - MatchIsTouchscreen "on" - MatchDevicePath "/dev/input/event*" - Driver "libinput" - Option "TransformationMatrix" "0 -1 1 1 0 0 0 0 1" -EndSection -``` - -More info about input transformation can be found in: +For more in-depth guidance on using Coordinate Transformation Matrices: * [Ubuntu wiki InputCoordinateTransformation](https://wiki.ubuntu.com/X/InputCoordinateTransformation) * [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, +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. + +!!! example + + ```sh + 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` and add following line: + + ```sh + ACTION=="add", ATTRS{name}=="", ENV{LIBINPUT_CALIBRATION_MATRIX}="" + ``` + + --- + As an alternative **if the above doesn't work**: + + edit `/usr/share/X11/xorg.conf.d/40-libinput.conf` + + for example: + + ```sh + Section "InputClass" + Identifier "libinput touchscreen catchall" + MatchIsTouchscreen "on" + MatchDevicePath "/dev/input/event*" + Driver "libinput" + Option "TransformationMatrix" "0 -1 1 1 0 0 0 0 1" + EndSection + ```