Linux Mint 19 + Panasonic Toughbook CF-19 = touchscreen calibration issue

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help
Post Reply
ant-tv
Level 1
Level 1
Posts: 2
Joined: Mon Sep 17, 2018 5:32 am

Linux Mint 19 + Panasonic Toughbook CF-19 = touchscreen calibration issue

Post by ant-tv » Mon Sep 17, 2018 6:05 am

Hello

My first ever in 5+ years question about Linux Mint.

So. Until last week I have LMDE2 on my CF-19 laptop. Everything works perfectly. Without any questions.
Then I updated to the LMDE3, and in a day to LM 19 Cinnamon.

So the problem occurred.

The touchscreen does not calibrate.

How I have tried to calibrate my touchscreen:

Code: Select all

$ xinput_calibrator --list
Device "Fujitsu Component USB Touch Panel" id=9

$ 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' (/usr/share/X11/xorg.conf.d/ in some distro's)
Section "InputClass"
	Identifier	"calibration"
	MatchProduct	"Fujitsu Component USB Touch Panel"
	Option	"MinX"	"4379"
	Option	"MaxX"	"64068"
	Option	"MinY"	"1813"
	Option	"MaxY"	"57279"
	Option	"SwapXY"	"0" # unless it was already set to 1
	Option	"InvertX"	"0"  # unless it was already set
	Option	"InvertY"	"0"  # unless it was already set
EndSection

I'll provide the screenshots a bit later.


so, then I copied the snippet even in two places:

Code: Select all

$sudo mcedit /etc/X11/xorg.conf.d/99-calibration.conf
$sudo mcedit /usr/share/X11/xorg.conf.d/99-calibration.conf
then I reboot the system.

Nothing changed.
When I tap with a stylus in upper half of the touchscreen the cursor appeared lower from the place of tap, in the lower half - up to 3cm from the place of tap.

IMG_20180917_125546_HDR~01.jpg
tap with a stylus on a target, cursor appears in another position
IMG_20180917_125546_HDR~01.jpg
tap with a stylus on a target, cursor appears in another position
Any suggestions how to calibrate the touchscreena are welcome :)

ant-tv
Level 1
Level 1
Posts: 2
Joined: Mon Sep 17, 2018 5:32 am

Re: Linux Mint 19 + Panasonic Toughbook CF-19 = touchscreen calibration issue

Post by ant-tv » Mon Sep 17, 2018 8:23 am

Code: Select all

$ xinput_calibrator -v
DEBUG: XInputExtension version is 2.3
DEBUG: Skipping virtual master devices and devices without axis valuators.
DEBUG: Skipping device 'Virtual core XTEST pointer' id=4, does not report Absolute events.
DEBUG: Skipping device 'PS/2 Generic Mouse' id=11, does not report Absolute events.
DEBUG: Selected device: Fujitsu Component USB Touch Panel
DEBUG: Not usbtouchscreen calibrator: Not a usbtouchscreen device
DEBUG: Not evdev calibrator: Evdev: invalid "Evdev Axis Calibration" property format
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).
DEBUG: Found that 'Fujitsu Component USB Touch Panel' is a sysfs name.
DEBUG: Adding click 0 (X=181, Y=103)
DEBUG: Adding click 1 (X=887, Y=101)
DEBUG: Adding click 2 (X=186, Y=589)
DEBUG: Adding click 3 (X=882, Y=590)
	--> Making the calibration permanent <--
DEBUG: Found that 'Fujitsu Component USB Touch Panel' is a sysfs name.
  copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf' (/usr/share/X11/xorg.conf.d/ in some distro's)
Section "InputClass"
	Identifier	"calibration"
	MatchProduct	"Fujitsu Component USB Touch Panel"
	Option	"MinX"	"4267"
	Option	"MaxX"	"64084"
	Option	"MinY"	"1771"
	Option	"MaxY"	"57236"
	Option	"SwapXY"	"0" # unless it was already set to 1
	Option	"InvertX"	"0"  # unless it was already set
	Option	"InvertY"	"0"  # unless it was already set
EndSection

anxietyscroll
Level 1
Level 1
Posts: 3
Joined: Sat Oct 27, 2018 12:18 am

Re: Linux Mint 19 + Panasonic Toughbook CF-19 = touchscreen calibration issue

Post by anxietyscroll » Sat Oct 27, 2018 12:28 am

Hello, I hope this is going to help you, I found it in the url providen. This works this way. First run the script, it will give you the configuration for the 98-screen-blah blah inside xorg conf directory. The directory is listed by the script, but the /etc/X11/xorg.conf.d/ worked fine for me (Running Mint 19 Tara Mate x32)

Code: Select all

#!/bin/bash
#all credit to Mogwai. Script taken from url: https://wiki.archlinux.org/index.php/Talk:Calibrating_Touchscreen

device=$(xinput_calibrator --list)
device=$(sed -n 's/.*Device\s\"\(.*\)\".*/\1/p' <<< $device)

#reset xinput matrix
xinput set-prop "$device" 'Coordinate Transformation Matrix' 1 0 0 0 1 0 0 0 1

out=$(xinput_calibrator)

device_name=$(sed -n 's/.*MatchProduct\"\s\"\([0-9]*\).*/\1/p' <<< $out)

wtot=$(sed -n 's/.*max_x=\([0-9]*\).*/\1/p' <<< $out)
htot=$(sed -n 's/.*max_y=\([0-9]*\).*/\1/p' <<< $out)

minx=$(sed -n 's/.*MinX\"\s\"\([0-9]*\).*/\1/p' <<< $out)
maxx=$(sed -n 's/.*MaxX\"\s\"\([0-9]*\).*/\1/p' <<< $out)
miny=$(sed -n 's/.*MinY\"\s\"\([0-9]*\).*/\1/p' <<< $out)
maxy=$(sed -n 's/.*MaxY\"\s\"\([0-9]*\).*/\1/p' <<< $out)

wtouch=$(bc <<< "$maxx - $minx")
htouch=$(bc <<< "$maxy - $miny")

c0=$(bc -l <<< "$wtot / $wtouch")
c1=$(bc -l <<< "-$minx / $wtouch")
c2=$(bc -l <<< "$htot / $htouch")
c3=$(bc -l <<< "-$miny / $htouch")

tf_matrix="$c0 0 $c1 0 $c2 $c3 0 0 1"

#alter the setting for now
xinput set-prop "$device" 'Coordinate Transformation Matrix' $tf_matrix

echo "To make this permanent, save the following content under '/etc/X11/xorg.conf.d/98-screen-calibration.conf' or '/usr/share/X11/xorg.conf.d/98-screen-calibration.conf'"
echo "Section \"InputClass\""
echo "	Identifier \"calibration\""
echo "	MatchProduct \"$device\""
echo "	Option \"TransformationMatrix\" \"$tf_matrix\""
echo "EndSection"

Post Reply

Return to “Hardware Support”