Calibration of touch screen not working? cant load `sudo DISPLAY=:0.0 xinput_calibrator`

confirmed gvolt ill do it again and report back. Thank you thus far.

Arrghhhh now its not writing to the the file saying it doesnt exist. Have to leave this for tonight as got to put the little one to bed! I’ll follow this up tomorrow

Volumio Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
volumio@dark-horse-audio:~$ cat /etc/X11/xorg.conf.d/99-calibration.conf
Section “InputClass”
Identifier “calibration”
MatchProduct “wch.cn USB2IIC_CTP_CONTROL”
Option “MinX” “8172”
Option “MaxX” “8195”
Option “MinY” “131161”
Option “MaxY” “131525”
Option “SwapXY” “1” # unless it was already set to 1
Option “InvertX” “0” # unless it was already set
Option “InvertY” “0” # unless it was already set
EndSection

volumio@dark-horse-audio:~$

ok did it again and still not showing UI on screen

Please post the output of

cat /var/log/Xorg.0.log

Maybe try this content for “/etc/X11/xorg.conf.d/99-calibration.conf”:

Section "InputClass"
        Identifier      "calibration"
        MatchProduct    "[wch.cn](http://wch.cn) USB2IIC_CTP_CONTROL"
        Option  "Calibration"   "8172 8195 131161 131525"
        Option  "SwapAxes"      "1"
EndSection

volumio@dark-horse-audio:~$ cat /var/log/Xorg.0.log
[ 57.003]
X.Org X Server 1.18.4
Release Date: 2016-07-19
[ 57.003] X Protocol Version 11, Revision 0
[ 57.003] Build Operating System: Linux 4.4.26-v7+ armv7l Raspbian
[ 57.003] Current Operating System: Linux dark-horse-audio 4.19.118-v7l+ #1311 SMP Mon Apr 27 14:26:42 BST 2020 armv7l
[ 57.003] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 cma=64M bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=480 bcm2708_fb.fbswap=1 smsc95xx.macaddr=DC:A6:32:F5:45:33 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 splash quiet plymouth.ignore-serial-consoles dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0xF dwc_otg.nak_holdoff=1 console=ttyS0,115200 kgdboc=ttyS0,115200 console=tty1 imgpart=/dev/mmcblk0p2 imgfile=/volumio_current.sqsh elevator=noop rootwait bootdelay=5 logo.nologo vt.global_cursor_default=0 loglevel=0 snd-bcm2835.enable_compat_alsa=1 snd_bcm2835.enable_headphones=1
[ 57.004] Build Date: 11 November 2016 11:59:59AM
[ 57.004] xorg-server 2:1.18.4-2+rpi1 (Debian -- Support)
[ 57.004] Current version of pixman: 0.32.6
[ 57.004] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 57.004] Markers: (–) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 57.005] (==) Log file: “/var/log/Xorg.0.log”, Time: Fri May 7 17:12:03 2021
[ 57.014] (==) Using config directory: “/etc/X11/xorg.conf.d”
[ 57.014] (==) Using system config directory “/usr/share/X11/xorg.conf.d”
[ 57.022] Parse error on line 1 of section InputClass in file /etc/X11/xorg.conf.d/99-calibration.conf
The Section keyword requires a quoted string to follow it.
[ 57.027] (EE) Problem parsing the config file
[ 57.027] (EE) Error parsing the config file
[ 57.027] (EE)
Fatal server error:
[ 57.027] (EE) no screens found(EE)
[ 57.027] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 57.027] (EE) Please also check the log file at “/var/log/Xorg.0.log” for additional information.
[ 57.027] (EE)
[ 57.027] (EE) Server terminated with error (1). Closing log file.

Check all quotation marks in “/etc/X11/xorg.conf.d/99-calibration.conf”. I suggest to substitute them by manually retyping them. I guess copying the text from the forum changed the quotation marks in some way.

1 Like

yes you were correct the quotation marks were replaced with these > >.

manually retyped and the UI is back up and running!

Bad news the damn calibration didn’t work, it’s still the same.

Volumio Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
volumio@dark-horse-audio:~$ cat /etc/X11/xorg.conf.d/99-calibration.conf
Section “InputClass”
Identifier “calibration”
MatchProduct “wch.cn USB2IIC_CTP_CONTROL”
Option “MinX” “8172”
Option “MaxX” “8195”
Option “MinY” “131161”
Option “MaxY” “131525”
Option “SwapXY” “1” # unless it was already set to 1
Option “InvertX” “0” # unless it was already set
Option “InvertY” “0” # unless it was already set
EndSection
volumio@dark-horse-audio:~$

rechecked and its gone in fine?

tried this to, the UI works just the calibration is all off, still does the same thing.

Wish it was just a little easier to do but these things never are i guess. At least i am learning a great deal!

:+1:

I suggest to run “xinput_calibration” again. IMHO the current values look weird.

1 Like

volumio@dark-horse-audio:~$ DISPLAY=:0.0 xinput_calibrator
Calibrating standard Xorg driver “wch.cn USB2IIC_CTP_CONTROL”
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 “wch.cn USB2IIC_CTP_CONTROL”
Option “MinX” “8109”
Option “MaxX” “8223”
Option “MinY” “127748”
Option “MaxY” “127020”
Option “SwapXY” “1” # unless it was already set to 1
Option “InvertX” “0” # unless it was already set
Option “InvertY” “0” # unless it was already set
EndSection
volumio@dark-horse-audio:~$

Hm, those values don’t look that different…

Maybe it could be an option to use a calibration file from the manufacturer of the display. This wouldn’t be ultra precise, but probably better than what you have now, Could you provide the name of the manufacturer and the exacr model name of the display?

8.8 inch IPS 1920x480 60Hz 40 pins Multi touch LCD screen display with micro USB port controller board for Aida64 raspberry pi|Tablet LCDs & Panels| - AliExpress

got it from ali express!

also my cursor moves backwards still. So up and down is left and right, right and left is up and down!

Not too much of information available over there… :wink:

So that is your main problem and the cause why you want to calibrate, I guess?

Maybe put on hold using xinput_calibrator and using “/etc/X11/xorg.conf.d/99-calibration.conf” for the moment and lets have a closer look if and how the touch is inverted or swapped.

For now I suggest to “deactivate” “99-calibration.conf” by renamig it

sudo mv /etc/X11/xorg.conf.d/99-calibration.conf /etc/X11/xorg.conf.d/99-calibration.conf.bak

After rebooting systematically test where the cursor appears when you touch the screen in the corner areas and how it moves when you swipe from left to right and from up to down. Describe the results in detail so I can follow it. :wink:

Also please show the contents of “/boot/config,txt” and “/boot/userconfig,txt”:

cat /boot/config.txt

cat /boot/userconfig.txt

1 Like

ill get this done over the weekend and report back gvolt, thanks for your patience and help!

Hi gvolt

so i renamed the file to deactivate it, after doing this i rebooted.

When i touch the left hand corner of the screen the pointer appears on the right hand corner about an inch away.

when i touch the bottom right hand corner the pointer appears on the top left hard corner.

when i touch the bottom right hand corner the pointer appears on the bottom left hand corner]

when i touch the top right hand corner the pointer appears on the bottom right hand corner.

sliding my finger left moves the pointer up, sliding it right moves it down.

Sliding my finger up move its right, sliding my finger down moves it left.

contents of cat /boot/config,txt

initramfs volumio.initrd
gpu_mem=32
max_usb_current=1
dtparam=audio=on
audio_pwm_mode=2
dtparam=i2c_arm=on
disable_splash=1
hdmi_force_hotplug=1

include userconfig.txt

Volumio i2s setting below: do not alter

dtoverlay=applepi-dac

contents of userconfig.txt

Add your custom config.txt options to this file, which will be preserved during updates

hdmi_timings=480 0 30 30 30 1920 0 6 6 6 0 0 0 60 0 55296000 8
hdmi_group=2
hdmi_mode=87
hdmi_drive=2
display_rotate=1
hdmi_force_mode=1

framebuffer_width=1920
framebuffer_height=480
max_framebuffer_width=1920
max_framebuffer_height=1920

Thanks

This appears contradictory. Could you check again and / or clarify please?

From your description of the sliding / moving directions the X and Y axes seem to be swapped.

Now please rename “/etc/X11/xorg.conf.d/99-calibration.conf.bak`” back to “/etc/X11/xorg.conf.d/99-calibration.conf” and describe again where the cursor appears on touching at the four corners also swiping in the four directions.

my apologies

touching the top left hand corner brings the pointer to the top right hand corner

touching the bottom left hand corner brings the pointer to the top left hand corner

touching the top right hand corner brings the pointer to the bottom right hand corner

touching the bottom right hand corner brings the pointer to the bottom left hand corner.