Touch Screen Calibration LinuxCNC 2.8.4

More
22 Mar 2023 00:08 #267266 by tittlek
Let me preface this all by saying I am not a Linux person. I find it extremely frustrating to get anything working because I don't know seemingly thousands of esoteric terminal commands. I have been spending an embarrassing amount of time trying to solve my issue and I'm at my wits end.

I had a completely functioning touchscreen setup until I decided to upgrade my LinuxCNC machine to 2.8.4 with a fresh install after I replaced a faulty breakout board. I have an ELO Touch Systems accutouch monitor. Linux seems to be recognizing it just fine, because without me installing anything the touch screen just works. The problem is the Y is inverted and the cursor is not calibrated to the correct location which makes it useless.

Some of what I've found points me in the direction of using xinput-calibrator, which I installed, ran, and then created an xorg.conf.d file with it's output. Which did exactly nothing. Upon further digging I realized that xinput is not even installed on Debian 10. So then I tried installing it. But the conf file still does nothing. However I was able to issue this command

xinput set-prop 9 "Coordinate Transformation Matrix" 1 0 0 0 -1 1 0 0 1   (no idea what any of this means, I'm just searching and typing in whatever comes up)

This fixed the Y inversion issue but did nothing for the pointer location. Then after a reboot it was back to square one, that setting didn't stick. Then I found out that Debian 10 uses something called Wayland instead of xinput, whatever that is. I'm so lost and confused and feeling so defeated that I can't figure out a simple screen calibration issue. I've searched far and wide and nothing has solved my issue. If anyone could point me in the right direction I'd greatly appreciate it. I find it absolutely insane that it is so hard to figure this out for a device like a touchscreen which it seems a lot of LinuxCNC people are using.

Please Log in or Create an account to join the conversation.

  • rodw
  • rodw's Avatar
  • Away
  • Platinum Member
  • Platinum Member
More
22 Mar 2023 01:54 #267270 by rodw
Replied by rodw on topic Touch Screen Calibration LinuxCNC 2.8.4
How did you install linux on your PC? Is it the Linuxcnc ISO?
Debian 10 is buster and wayland did not come in until 11 & 12

Anytime I've used a touch screen its just worked out of the box.

If you can't get it going, you could try my bookworm instructions for Debian 12 which might fix any driver related issues  as a lot of new drivers have been added to Linux since Buster.

docs.google.com/document/d/1jeV_4VKzVmOI...diY/edit?usp=sharing
 

Please Log in or Create an account to join the conversation.

More
25 Mar 2023 14:33 #267469 by tittlek
Replied by tittlek on topic Touch Screen Calibration LinuxCNC 2.8.4
Yes, I installed linux with the LinuxCNC 2.8.4 Debian 10 Buster PREEMPT-RT ISO

I ran the xinput_calibrator again. It lists two different locations for the conf file. either /etc/X11/xorg.conf.d or /usr/share/X11. I tried the latter location previously because that folder already existed, however I just tried creating the folder in /etc and made another 99-calibration.conf in there with the output of xinput_calibrator.

Same result, no change in the touchscreen cursor behavior.

That's why I was wondering is this distro of linux even using xinput at all or just ignoring it. I figured since it wasn't initially installed it's probably using something else to handle input devices? I don't know enough about linux to know how it handles it.

Please Log in or Create an account to join the conversation.

More
25 Mar 2023 15:26 - 25 Mar 2023 15:29 #267470 by Aciera
Replied by Aciera on topic Touch Screen Calibration LinuxCNC 2.8.4
It's been a while but maybe this is of interest:
forum.linuxcnc.org/18-computer/44572-tou...n-not-working#229406

[edit]
Note the description of how to the set the scale using the transformation matrix.
Last edit: 25 Mar 2023 15:29 by Aciera.

Please Log in or Create an account to join the conversation.

More
25 Mar 2023 17:19 #267478 by tittlek
Replied by tittlek on topic Touch Screen Calibration LinuxCNC 2.8.4
Yes, as I mentioned in my first post issuing this command:

xinput set-prop 9 "Coordinate Transformation Matrix" 1 0 0 0 -1 1 0 0 1

(which I got from the forum post you mentioned) did in fact fix the Y inversion issue. However it did nothing for the location of the pointer. Also it reverted back to the way it was before after reboot.

I did not try to make it permanent with the Create file: ~/.xsessionrc advice because previously making the conf file for this did nothing as well. The input that xinput_calibrate gives me for that conf file looks nothing like the input for the transformation matrix and I have no idea how to translate one to the other. Since I have absolutely no concept of what I'm doing or what is actually controlling any of this I gave up in despair.

Since it seems modifying my Coordinate Transformation Matrix does seem to have an effect on this I'm trying to work with that for now, but I don't know how I take the MinX, MaxX, MinY etc output from xinput_calibration and put it into the coordinate transformation matrix, and how I set all that in this ~/.xsessionrc

What is the ~/.xsessionrc file anywaay. I guess I have to spend the next 5 hours of my life learning yet another thing in linux that I'll never use again...

Please Log in or Create an account to join the conversation.

More
25 Mar 2023 17:55 #267484 by tittlek
Replied by tittlek on topic Touch Screen Calibration LinuxCNC 2.8.4
Well, creating the ~/.xsessionrc file didn't do anything.

I read the following on the Debian website:
Also note that because ~/.xsessionrc is read very early, any settings you place here may be overridden by your window manager or desktop environment, later in the login sequence

So I'm back to square one. and I still haven't learned anything that's helpful.

What I'm wondering... and this I think is where my frustration comes from... If my touchscreen monitor just happens to work on its own, something must be controlling it even before I installed xinput. So what is controlling it? If I could figure that out I might be able to change it's settings or calibrate it.

Why is this seemingly simply task so hard?

Please Log in or Create an account to join the conversation.

More
25 Mar 2023 18:04 #267487 by JPL
Replied by JPL on topic Touch Screen Calibration LinuxCNC 2.8.4
Did you try with the Linux touch driver from ELO? 
Here: www.elotouch.com/support/downloads#/cate...CuyoW/legacy/current

 

Please Log in or Create an account to join the conversation.

More
25 Mar 2023 21:30 #267501 by tittlek
Replied by tittlek on topic Touch Screen Calibration LinuxCNC 2.8.4
I thought about that, being apprehensive about going down the lets learn how to install linux drivers rabbit hole that I don't have time for.

So I broke down and tried that. It didn't work. I probably did something wrong since all I could do was just follow the step by step directions in the readme file.

I think I downloaded the right driver? for linux kernel versions 4.x?

However there are two options in the readme. One if for linux distros using systemd init? whatever that is. It told me to check to see if that's active but after typing in the commands I don't really know how to interpret the output to tell if its active. So I tried that option anyway, and as I mentioned it didn't work.

I feel like at this point I've spent so many hours just trying to get my gosh darn touchscreen calibrated that if I spent that time billing a client I could have bought 5 copies of mach 3 and never have to deal with linux again.

Please Log in or Create an account to join the conversation.

Time to create page: 0.059 seconds
Powered by Kunena Forum