Merhabalar
Elimde Vestel VTAB 1041 model Intel CherryTrail İşlemcili bir tablet var. Windows yüklü olarak geliyor. Ben bu cihazı Linux ile kullanmak istediğim için MX Linux 19.4.1 yükledim. Dokunmatik, Ekran döndürme ve Conky ile batarya düzeyini gösterme gibi sorunlarını çözdüm. Birileri faydalansın diye buraya koyayım. Benzer cihazlar için de uyarlanarak kullanılabilir.
1. Dokunmatik
içeriğe aşağıdakileri ekliyoruz.
komutlarıyla ayarları aktifliyoruz.
içeriğe aşağıdakileri ekliyoruz.
Yukarıdaki kodun kullanacağımız matrixin önündeki işareti kaldırıyoruz.
Bilgisayarı yeniden başlatınca aktif hale geliyor.
2. Ekran Döndürme
içeriğe aşağıdakileri ekliyoruz.
komutlarıyla ayarları aktifliyoruz.
Bilgisayarı yeniden başlatınca aktif hale geliyor.
İşimiz bitmedi. Sensör çalışsa da sistemin ekran döndürme işini yapabilmesi için bir dosya daha yapmamız gerekiyor.
içeriği ekliyoruz.
Bu dosyayı XFCE4 başlanğıcında çalıştıracak şekilde autostart kısmına ekliyoruz.
3. Pil Düzeyi
Batarya düzeyini Conky programında göstermek için kullanılan "battery" komutu işe yaramadığı için bu şekilde bir düzenleme yaptım.
conkirc dosyamıza aşağıdaki komutları ekliyoruz
Şimdilik bu kadar.
Elimde Vestel VTAB 1041 model Intel CherryTrail İşlemcili bir tablet var. Windows yüklü olarak geliyor. Ben bu cihazı Linux ile kullanmak istediğim için MX Linux 19.4.1 yükledim. Dokunmatik, Ekran döndürme ve Conky ile batarya düzeyini gösterme gibi sorunlarını çözdüm. Birileri faydalansın diye buraya koyayım. Benzer cihazlar için de uyarlanarak kullanılabilir.
1. Dokunmatik
nano /usr/lib/udev/hwdb.d/61-evdev.hwdb
komutuyla dokunmatik boyutlarının okunacağı dosyayı oluşturuyoruz:içeriğe aşağıdakileri ekliyoruz.
Kod:
# Goodix Touchscreen and Pen
evdev:name:*Goodix*
EVDEV_ABS_00=::2178
EVDEV_ABS_01=::1364
EVDEV_ABS_35=::2178
EVDEV_ABS_36=::1364
systemd-hwdb update
udevadm trigger
komutlarıyla ayarları aktifliyoruz.
nano /etc/X11/xorg.conf.d/21-defaultrotatetouchscreen.conf
komutuyla dokunmatik ayarlarının okunacağı dosyayı oluşturuyoruz:içeriğe aşağıdakileri ekliyoruz.
Kod:
Section "InputClass"
Identifier "GoodixTouchscreen"
MatchProduct "Goodix Capacitive TouchScreen"
Option "TransformationMatrix" "0 -1 1 1 0 0 0 0 1" # sol laptop görünümü için
#Option "TransformationMatrix" "1 0 0 0 1 0 0 0 1" # normal kamera yukarıda dikey kullanım için
#Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1" # sağ
#Option "TransformationMatrix" "-1 0 1 0 -1 1 0 0 1" # ters
EndSection
Yukarıdaki kodun kullanacağımız matrixin önündeki işareti kaldırıyoruz.
Bilgisayarı yeniden başlatınca aktif hale geliyor.
2. Ekran Döndürme
nano /etc/udev/hwdb.d/61-sensor-local.hwdb
komutuyla yön sensörünün ayarları olan dosyayı oluşturuyoruz:içeriğe aşağıdakileri ekliyoruz.
Kod:
sensor:modalias:acpi:KIOX000A*:dmi:*:svnVESTEL*:pnVTAB1041*
ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1
systemd-hwdb update
udevadm trigger
komutlarıyla ayarları aktifliyoruz.
Bilgisayarı yeniden başlatınca aktif hale geliyor.
monitor-sensor
komutuyla sensörün çalışıp çalışmadığını kontrol edebiliriz.İşimiz bitmedi. Sensör çalışsa da sistemin ekran döndürme işini yapabilmesi için bir dosya daha yapmamız gerekiyor.
sudo apt install iio-sensor-proxy inotify-tools monitor-sensor
ile gerekli programları kuruyoruz.nano /opt/autorotate.sh
komutuyla ekranı döndürecek dosyayı oluşturuyoruz:içeriği ekliyoruz.
Kod:
#!/bin/bash
# https://github.com/julienw/config-files/blob/master/yoga/rotate-screen.sh
# October 2016 - Tested and worked on Toshiba Radius 11 Convertible Laptop with Debian 8.5 Sid and XFCE 4.12
# This is a bash script to make screen autorotation possible based on device orientation.
# All you need for this script to run iio-sensor-proxy and inotify ($sudo apt install iio-sensor-proxy inotify-tools)
# Nowdays, iio-sensor-proxy usually is included in any Linux Distro.
# For inotify source : https://github.com/rvoicilas/inotify-tools
# PS: Gnome has a built in implementation of auto screen rotation based on iio-sensor-proxy.
#
# Source Code: https://linuxappfinder.com/blog/auto_screen_rotation_in_ubuntu
#
# Receives input from monitor-sensor (part of iio-sensor-proxy package). You can run monitor-sensor first in command line to verify correct working.
# This script could be added to startup applications for the user.
#scr=$(xrandr |grep connected)
#echo $scr
#pos=$(expr index "${scr}" connected)
#echo 'position:' $pos
#screen=$(expr substr "${scr}" 1 $(($pos-2))) #pos has the value of "c" from connected. -1 has a space , -2 has the screen name
#echo 'Auto Recognized Screen:' $screen
function Tablet {
[[ $1 == "off" ]] && action="enable"
[[ $1 == "on" ]] && action="disable"
while read i; do
#echo "enabling $(xinput list --name-only $i)"
xinput $action $i;
done <<< "$(xinput list |grep -e 'AT.*keyboard' -e 'Synaptics' |grep -Po 'id=\K[0-9]+')";
}
screen2=$(xrandr | grep " connected" | awk '{print $1}') #this seems also to work and print the VGA-1 / eDP-1
echo 'Auto Recognize screen {alt}:'$screen2
> sensor.log # Clear sensor log to keep the size small.
#screen2=DSI1
monitor-sensor >> sensor.log 2>&1 & # Launch monitor-sensor - store output in a variable to be parsed by rest script
# Parse output or monitor sensor to get the new orientation whenever the log file is updated
# Possibles are: normal, bottom-up, right-up, left-up. Light data will be ignored
while inotifywait -e modify sensor.log; do #switch -e = event. modify = event to watch. sensor.log = file to watch.
ORIENTATION=$(tail -n 1 sensor.log | grep 'orientation' | grep -oE '[^ ]+$') # Read the last line that was added to the file and get the orientation
case "$ORIENTATION" in # Set the actions to be taken for each possible orientation
normal)
xrandr --output $screen2 --rotate normal
xinput set-prop "Goodix Capacitive TouchScreen" "Coordinate Transformation Matrix" 1 0 0 0 1 0 0 0 1
Tablet on;; ##&& gsettings set com.canonical.Unity.Launcher launcher-position Left ;;
bottom-up)
xrandr --output $screen2 --rotate inverted
xinput set-prop "Goodix Capacitive TouchScreen" "Coordinate Transformation Matrix" -1 0 1 0 -1 1 0 0 1
Tablet on ;; ##&& gsettings set com.canonical.Unity.Launcher launcher-position Left ;;
right-up)
xrandr --output $screen2 --rotate right
xinput set-prop "Goodix Capacitive TouchScreen" "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1
Tablet on ;; ##&& gsettings set com.canonical.Unity.Launcher launcher-position Bottom ;;
left-up)
xrandr --output $screen2 --rotate left
xinput set-prop "Goodix Capacitive TouchScreen" "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1
Tablet off ;; ##&& gsettings set com.canonical.Unity.Launcher launcher-position Bottom ;;
esac
done
exit #exit may not required. added by me.
Bu dosyayı XFCE4 başlanğıcında çalıştıracak şekilde autostart kısmına ekliyoruz.
3. Pil Düzeyi
Batarya düzeyini Conky programında göstermek için kullanılan "battery" komutu işe yaramadığı için bu şekilde bir düzenleme yaptım.
conkirc dosyamıza aşağıdaki komutları ekliyoruz
Kod:
$Batarya ${hr 2}
% ${exec acpi |awk '{print +$4}'} ${exec acpi |awk -F'[, ]' '{print $3}'} # Batarya yüzdesi, Batarya durumu
${execbar acpi |awk '{print +$4}'} # Batarya Yüzdesi Bar olarak göstermek için
Şimdilik bu kadar.