Калибровка тачскрина linux mint

Linux Mint Forums

Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

[SOLVED] Touchscreen calibration fails

Post by wolfsch » Tue Jul 31, 2012 7:29 am

I installed Linux Mint 13 KDE Edition and according to http://thefanclub.co.za/how-to/how-ubun . alibration I tried to calibrate the touch screen:

First I listed the calibratable devices:

wolfgang@LIFEBOOK-T730 ~ $ sudo xinput_calibrator --list [sudo] password for wolfgang: Device "Serial Wacom Tablet stylus" "Serial Wacom Tablet eraser" "Serial Wacom Tablet touch" the calibration itself:
wolfgang@LIFEBOOK-T730 ~ $ sudo xinput_calibrator --device 16 Calibrating standard Xorg driver "Serial Wacom Tablet stylus" current calibration values: min_x=0, max_x=26312 and min_y=0, max_y=16520 If these values are estimated wrong, either supply it manually with the --precalib option, or run the 'get_precalib.sh' script to automatically get it (through HAL). --> Making the calibration permanent  

I modified /usr/share/X11/xorg.conf.d/10-evdev.conf (Initially, the "Identifier" was "evdev touchscreen catchall". When this didn't work, I changed it to "Serial Wacom Tablet stylus"):

Section "InputClass" Identifier "Serial Wacom Tablet stylus" MatchIsTouchscreen "on" MatchDevicePath "/dev/input/event*" Driver "evdev" Option "Calibration" "236 26301 169 16412" EndSection

After logging out an in I could see no effect of the calibration. On the left side of the screen is still a considerable gap between pen tip and cursor.
Second, following xinput_calibrator's instructions, I created the file 99-calibration.conf, but put it in /usr/share/X11/. instead. No success.

Could anyone help me to understand what I am doing wrong here ?

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

Re: Touchscreen calibration fails

Post by Favux » Tue Jul 31, 2012 6:19 pm

Welcome to Linux Mint forums!

First your touchscreen is sandwiched with your Wacom digitizer and is handled by the Wacom X driver (wacom), not the evdev driver. Your internal connection is a serial one, what linux wacom calls a serial ISDv4 protocol device, which is why xinput_calibrator is calling it "Serial Wacom Tablet stylus". With ISDv4 devices (which are serial tablet PCs) the signals are multiplexed. Moreover the Wacom X driver will append a device type to the device name so your touchscreen's device name is likely "Serial Wacom Tablet touch". Verify that by running the command 'xinput list' in a terminal and posting the output.

So you are telling the wrong driver to match the wrong device name. Moreover evdev does not handle serial devices, it handles only usb devices.

Also xinput_calibrator is correct in telling you to install your custom .conf file in /etc/X11/xorg.conf.d. The wiki is wrong telling you to modify the evdev touchscreen snippet in /usr/share/X11/xorg.conf.d/10-evdev.conf. Custon user .conf's belong in /etc/X11/xorg.conf.d. You may have to create that xorg.conf.d directory (mkdir). The /usr/share/X11/xorg.conf.d location is for the Distribution.

Although xinput_calibrator gave you the wrong device name I would be interested if otherwise its 99-calibration.conf and its snippet worked. With the correct device name from 'xinput-list' of course. It is understandable that it isn't able to differentiate between what are multiple device names for your tablet PC.

Re: Touchscreen calibration fails

Post by wolfsch » Tue Aug 21, 2012 8:18 am

thank you so much for this detailed information, I am sure this will help to solve the problem.
Second I want to apologize for the late answer, which is due to holiday time and health issues.
As soon as I will find the time I will try another calibration and let you know the result.

Again, thank you so much for your help !

Re: Touchscreen calibration fails

Post by wolfsch » Thu Aug 23, 2012 5:12 am

I'm afraid in my initial post I was not very precise and mixed up the terms. What I really wanted to do is calibrate the Wacom digitizer in order to use it as a drawing tool with the pen. I did not want to calibrate the touchscreen, which I understood as the device allowing to work with the finger tips. This is why I chose "Serial Wacom Tablet stylus" (ID=16) for xinput_calibrator.

  • ⎜ ↳ Serial Wacom Tablet stylus [slave pointer (2)]
    ⎜ ↳ Serial Wacom Tablet eraser [slave pointer (2)]
    ⎜ ↳ Serial Wacom Tablet touch [slave pointer (2)]

I had a similar problem with Sketchbook Pro on Win7. In this post they describe how to increase the number of calibration points and it worked perfectly well:
http://forum.tabletpcreview.com/ep121-s . trick.html
Do you think a similar approach would be possible with xinput_calibrator ?

Re: Touchscreen calibration fails

Post by Favux » Sun Aug 26, 2012 8:56 pm

The linux wacom driver works differently than the Win version and you can't do the proceedure in the link.

Your calibration problem with your Fujitsu Lifebook T730 seems a little unusual. The stylus is usually pretty good out of the box. Normally it is touch, especially usb touch, that needs calibration.

I'd like to see your calibration values. In a terminal run this command:

xinput list-props "Serial Wacom Tablet stylus"

and then post the output. I'd also like to see the same output but with the xinput_calibrator settings commented out (#) so they don't apply and the output contains the default settings/calibration.

Do you notice this problem just when rotated into tablet mode? Or in laptop too? How are you rotating the tablet?

Re: Touchscreen calibration fails

Post by wolfsch » Thu Aug 30, 2012 2:44 pm

I observed that in both notebook and tablet mode. When I use it in tablet mode, I usually don't rotate at all, just rotate the tablet physically, if needed.

wolfgang@LIFEBOOK-T730 ~ $ xinput list-props "Serial Wacom Tablet stylus" Device 'Serial Wacom Tablet stylus': Device Enabled (132): 1 Coordinate Transformation Matrix (134): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 Device Accel Profile (265): 0 Device Accel Constant Deceleration (266): 1.000000 Device Accel Adaptive Deceleration (267): 1.000000 Device Accel Velocity Scaling (268): 10.000000 Device Node (253): "/dev/ttyS4" Wacom Tablet Area (333): 0, 0, 26312, 16520 Wacom Rotation (334): 0 Wacom Pressurecurve (335): 0, 0, 100, 100 Wacom Serial IDs (336): 227, 0, 2, 0, 0 Wacom Serial ID binding (337): 0 Wacom Pressure Threshold (338): 27 Wacom Sample and Suppress (339): 2, 4 Wacom Enable Touch (340): 1 Wacom Hover Click (341): 0 Wacom Enable Touch Gesture (342): 1 Wacom Touch Gesture Parameters (343): 0, 0, 250 Wacom Tool Type (344): "STYLUS" (326) Wacom Button Actions (345): "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0), "None" (0) Device Product ID (252): 0, 227 Wacom Debug Levels (346): 0, 0 
wolfgang@LIFEBOOK-T730 ~ $ xinput_calibrator --device "Serial Wacom Tablet stylus" Calibrating standard Xorg driver "Serial Wacom Tablet stylus" current calibration values: min_x=0, max_x=26312 and min_y=0, max_y=16520 If these values are estimated wrong, either supply it manually with the --precalib option, or run the 'get_precalib.sh' script to automatically get it (through HAL). --> Making the calibration permanent  

Источник

Проблема калибровки тачскрина ноутбука Toughbook CF-19 под управлением GNU/Linux и возможные пути решения

В качестве единственного личного компьютера у меня служит несколько нестандартный ноутбук - Panasonic Toughbook CF-19Mk5. За годы использования в качестве ОС на нём использовал различные дистрибутивы Linux. В начале практически любой дистрибутив исправно и в условно полном объёме работал с железом. В том числе без всякой отдельной калибровки чётко работал резистивный тачскрин ноутбука. Однако года 4 назад произошло непонятное мне изменение в Linux, и с какого то момента калибровка съехала. Собственно, нескольким попыткам решения проблемы и посвящена заметка. Пишу по памяти, так сказать с чистого листа.

Тачскрин на ноутбуке - элемент пусть не первой необходимости, но иногда бывает полезен чтобы не скролить курсор из угла в угол - тыкнул куда надо стилусом и всё. Но когда ты тыкаешь стилусом в точку а курсор оказывается где-то внизу слева от этой точки, то это нервирует. Проявилось это после одного из обновлений используемого тогда Mint Linux.

Поиски решения начал с установки винчестера с комплектной Win XP и калибровки экрана. В среде Win всё работало чётко. Поиск решения в сообществе mint выявил, что съезжающая калибровка у toughbook в linux - проблема старинная. Из описанных решений можно выделить использование утилиты из состава продуктов проекта X.Org - xinput_calibrator

При запуске утилиты от sudo на экране последовательно отрисовывается 4 мишени которые надо нажать стилусом. Окно закрывается и в терминале отрисовывается текст, который надо записать в соответствующий конфиг:

xinput_calibrator
Calibrating standard Xorg driver "Fujitsu Component USB Touch Panel"
current calibration values: min_x=0, max_x=65535 and min_y=0, max_y=65535
If these values are estimated wrong, either supply it manually with the --precalib option, or run the 'get_precalib.sh' script to automatically get it (through HAL).

--> Making the calibration permanent copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf'
Section "InputClass"
Identifier "calibration"
MatchProduct "Fujitsu Component USB Touch Panel"
Option "MinX" "90"
Option "MaxX" "65412"
Option "MinY" "-64"
Option "MaxY" "65299"
EndSection

Создал соответствующий файл, записал туда вывод калибровщика - и никакого результата.

Некоторое время спустя пробовал Astra Linux - там xinput_calibrator сработал исправно. Но в целом мне дистрибутив не понравился и я перебрался на Manjaro. Тут вопрос калибровки тачскрина снова встал "в полный рост". Опять пробовал вышеупомянутую утилиту, пробовал калибровку вписывать по очередной найденной инструкции. Без какого либо положительного результа.

Однако через некоторое время подключил сторонний репозиторий. Изучал что там есть и наткнулся на сборку малоизвестной альтернативы xinput_calibrator. Программа называется xcalibrate

страница программы https://github.com/reinderien/xcalibrate
Программа написана на Python c использованием tk

Кстати автор написал эту программу потому что на его старом ноутбуке Panasonic Toughbook CF-29 не работала программа xinput_calibrator 🙂

Pointer devices:
ID Name
4 Virtual core XTEST pointer
9 Fujitsu Component USB Touch Panel
11 PS/2 Generic Mouse

Old calibration:
[[ 1.126767 0. -0.089242]
[ 0. 1.175728 -0.037727]
[ 0. 0. 1. ]]

Calibrate? [y]: y
Point count (min 3) [4]: 4
Disable rotation? [y]: y

Указано 3 мишени из 4

/usr/bin/xcalibrate:210: FutureWarning: rcond parameter will change to the default of machine precision times max(M, N) where M and N are the input matrix dimensions.
To use the future default and silence this warning we advise to pass rcond=None, to keep using the old, explicitly pass rcond=-1.
m_transform, residuals, rank, singular = np.linalg.lstsq(m_mouse, m_screen)

New calibration:
[[ 1.12516318 0. -0.08927897]
[ 0. 1.18247197 -0.03973887]
[ 0. 0. 1. ]]
Quality (should be at least 3): 4.5

Test? [y]: y
Point count (min 3) [4]: 12

Use calibration? [y]: y
Create a file (for example 99-libinput-ts-calib.conf) in /usr/share/X11/xorg.conf.d/ and put in the following

Section "InputClass"
Identifier "calibration"
MatchProduct "Fujitsu Component USB Touch Panel"
Option "CalibrationMatrix" "1.1251631837961777 0.0 -0.08927897169357178 0.0 1.18247197158914 -0.03973886907469457 0.0 0.0 1.0"
EndSection

Собственно, в уже существующий файл добавил вывод и всё сразу заработало!

Надеюсь, заметка окажется кому-нибудь полезной.

Источник

Читайте также:  Suse linux zabbix agent
Оцените статью
Adblock
detector