Thank you
@Myself5 for the guide and all the other people here that posted tips and codes.
I usually run Ubuntu but since on Arch Linux most things were working out of the box, I installed Manjaro on my new Chuwi Hi10 Air.
In my case, of the touchscreen, xinput_calibrator was not working on Manjaro or on Ubuntu. I manually calibrated the touchscreen with the evdev driver.
So, I just created the config file
Code:
sudo nano /usr/share/X11/xorg.conf.d/99-calibration.conf
Contents of 99-calibration.conf:
Code:
Section "InputClass"
Identifier "touchscreen"
MatchProduct "silead_ts"
Driver "evdev"
Option "Calibration" "5 1265 80 1960"
Option "SwapAxes" "1"
EndSection
As
@Myself5 said, our kernel has to be 5.1 or better.
Code:
$ uname -r
5.3.12-1-MANJARO
On Ubuntu you can install/unistall/manage kernels easily using the ukuu app.
You will also need to download the touchscreen driver files, as described on the previous posts:
Code:
sudo mkdir /lib/firmware/silead/
sudo wget -O /lib/firmware/silead/gsl1680-chuwi-hi10-air.fw https://github.com/onitake/gsl-firmware/blob/master/firmware/linux/silead/gsl1680-chuwi-hi10-air.fw
sudo cp /lib/firmware/silead/gsl1680-chuwi-hi10-air.fw /lib/firmware/silead/mssl1680.fw
Then reboot and check that the touchscreen is listed on your devices, as "silead_ts"
Code:
$ xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ silead_ts id=10 [slave pointer (2)]
⎜ ↳ HS-C109S-US-01-00- USB Keyboard Mouse id=14 [slave pointer (2)]
⎜ ↳ HS-C109S-US-01-00- USB Keyboard Consumer Control id=15 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ HS-C109S-US-01-00- USB Keyboard System Control id=13 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ bytcr-rt5651 Headset id=9 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ HS-C109S-US-01-00- USB Keyboard Wireless Radio Control id=17 [slave keyboard (3)]
↳ HS-C109S-US-01-00- USB Keyboard Consumer Control id=16 [slave keyboard (3)]
↳ HS-C109S-US-01-00- USB Keyboard id=18 [slave keyboard (3)]
↳ gpio-keys id=11 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ gpio-keys id=12 [slave keyboard (3)]
Some more things...
Gnome has a built in on board keyboard (since Gnome 3.28) that fires automatically when you click an input or if you swipe up from the bottom of the screen.
Set frame buffer rotation (while boot and on CTRL+ALT+F<number>) on grub, by adding on the kernel parameters
Code:
video=efifb fbcon=rotate:1
You can easily do that by installing the Grub Customizer and visiting the "General settings" tab, and adding the parameters under the kernel parameters.
Rotating the login screen, configure you desktop screen and then copy your configuration to the login screen
Code:
sudo cp ~/.config/monitors.xml /var/lib/gdm/.config/monitors.xml
Commands to change on demand screen scale and orientation:
Code:
# DSI1 is my screen name, you can find your by running `xrandr`
# Rotate to portrait mode
xrandr --output DSI1 --rotate "normal"
# Rotate to landscale
xrandr --output DSI1 --rotate "right"
# Scale screen
xrandr --output DSI1 --scale 1.25x1.25
Script to toggle screen rotation
Code:
#!/bin/sh
# Get output
info=`xrandr`
expr='m/([a-zA-Z0-9_-]+) connected primary \d+x\d+\+\d+\+\d+ ([a-z]+|)/'
# Get screen name
match=${expr}';print $1;'
display=`echo $info | perl -lne "$match"`
# Get orientation
match=${expr}';print $2;'
orientation=`echo $info | perl -lne "$match"`
#echo $display
#echo $orientation
# Toggle
if [ "$orientation" = "right" ]; then
xrandr --output "$display" --rotate "normal"
else
xrandr --output "$display" --rotate "right"
fi;
# You can also change the scale by removing the # on the next line
#xrandr --output "$display" --scale 1.25x1.25
You can add a button to your GNOME top bar to call this script by installing the extension
https://extensions.gnome.org/extension/1154/top-bar-script-executor/
I created a "Toggle screen orientation" button y saving the script under `~/.scripts/orientation.sh` with the icon `object-rotate-left`