Add nano editor commands for file edits (#1143)

* Add nano editor commands for file edits

This PR adds `sudo nano /path/to/file.ext` as well as closing/saving instructions

Adding nano edit commands to the page will improve people's ability to execute these steps. As noted during a Nero3D stream, neither our VzBot docs nor the page we linked to on KlipperScreen explained *how* to edit the file.

* Format table
This commit is contained in:
Anna 2023-10-13 18:18:48 +02:00 committed by GitHub
parent 79b3c7f749
commit 1b2a6b872c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,9 +8,9 @@ Some DSI screens have issues where touch doesn't work with Debian Bullseye, or e
The current workaround/temporary fix involves changing the kernel driver module used for these displays. The current workaround/temporary fix involves changing the kernel driver module used for these displays.
To apply this fix: ### Fix
Edit `/boot/config.txt` and change Open `/boot/config.txt` for editing using `sudo nano /boot/config.txt` and change
```sh ```sh
dtoverlay=vc4-kms-v3d dtoverlay=vc4-kms-v3d
@ -22,9 +22,11 @@ to
dtoverlay=vc4-fkms-v3d dtoverlay=vc4-fkms-v3d
``` ```
Close the nano editor using `ctrl`+`x` (exit), then `y` for yes (save).
**Reboot** to apply changes. **Reboot** to apply changes.
If that doesn't fix it, you can try commenting these lines out: If that doesn't fix it, you can try commenting these lines out, resulting in:
```sh ```sh
# dtoverlay=vc4-kms-v3d # dtoverlay=vc4-kms-v3d
@ -63,15 +65,15 @@ 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:
@ -88,18 +90,31 @@ If this is the case, adding `enable_tvout=0` to `/boot/config.txt` and reboot.
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` and add following line: To make this permanent, modify the file `/etc/udev/rules.d/51-touchscreen.rules`:
```bash
sudo nano /etc/udev/rules.d/51-touchscreen.rules
```
and add following line
```sh ```sh
ACTION=="add", ATTRS{name}=="<device name>", ENV{LIBINPUT_CALIBRATION_MATRIX}="<matrix>" ACTION=="add", ATTRS{name}=="<device name>", ENV{LIBINPUT_CALIBRATION_MATRIX}="<matrix>"
``` ```
Close the nano editor using `ctrl`+`x` (exit), then `y` for yes (save).
--- ---
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` edit `/usr/share/X11/xorg.conf.d/40-libinput.conf`
for example: ```bash
sudo nano /usr/share/X11/xorg.conf.d/40-libinput.conf
```
With the following contents:
```sh ```sh
Section "InputClass" Section "InputClass"
@ -110,3 +125,4 @@ If this is the case, adding `enable_tvout=0` to `/boot/config.txt` and reboot.
Option "TransformationMatrix" "0 -1 1 1 0 0 0 0 1" Option "TransformationMatrix" "0 -1 1 1 0 0 0 0 1"
EndSection EndSection
``` ```
Close the nano editor using `ctrl`+`x` (exit), then `y` for yes (save).