LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-06-2020, 11:49 PM   #1
rootbeer666
LQ Newbie
 
Registered: Mar 2020
Posts: 9

Rep: Reputation: Disabled
Question Configuring dual touchscreens on CentOS 7 X.org


Hey all,

I've got this question that should actually be common. I've got two 24" Dell P2418HT touchscreen monitors connected to a PC running X.org on CentOS 7, with MATE desktop. I've got the desktop extended across the two monitors as configured within MATE, one is left, the other is right.

The problem I have is that the touch input is not scaled right, motion on one touchscreen causes 2x horizontal movement across both monitors. I suspect this is due to the fact that it thinks that the input device controls the entire desktop space, rather than within the limits of a single monitor. The touchscreens are connected to USB.

What is the approach for configuring a particular touchscreen to move pointer only within bounds of it's own monitor? I believe the term is "mapping".

Machine specs are as follows:
Shuttle DH370 barebone
i5-8400
Intel UHD Graphics 630
Monitors connected via DP
Resolution is 1920x1080 on each
CentOS 7.6.1810 (per /etc/redhat-release)

I'm not sure where to start looking in terms of configuring the touchscreen inputs and bounds. This machine is intended to be used without mouse or keyboard.

Help is much appreciated.

Last edited by rootbeer666; 03-07-2020 at 04:24 PM.
 
Old 03-09-2020, 02:32 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by rootbeer666 View Post
I've got this question that should actually be common. I've got two 24" Dell P2418HT touchscreen monitors connected to a PC running X.org on CentOS 7, with MATE desktop.
Nothing about this sounds common to me.
Questions:
- isn't CentOS using GNOME by default? Does that work as expected?
- does it work as expected with one monitor?
- does it work as expected with another distro?
- how are the monitors connected? to the same GPU?
- do you get any meaningful journal messages?
 
Old 03-10-2020, 06:59 PM   #3
rootbeer666
LQ Newbie
 
Registered: Mar 2020
Posts: 9

Original Poster
Rep: Reputation: Disabled
So I've come up with a solution on my own.

Problem: a touch digitizer is connected to USB and looks like just any other input device, and therefore the system is not able to determine if it belongs to any particular screen, you have to determine that yourself and tell the system.

End goal: mapping a digitizer input to a specific monitor, like so
xinput map-to-output <input_id> <monitor_port>
for each of your touchscreens.

To accomplish this in my case I wrote an ugly script that is run by the login greeter during login init. The script is ugly so instead I will describe the approach.

So if you have more than one touchscreen of the same model, which is my situation, the only way to differentiate the touch inputs is by the physical USB port they are plugged into, otherwise you have no way to tell which one is which. This, I have to determine the xinput id by looking for the known port location.

To accomplish that I did:
cat /proc/bus/input/devices
and find your touch controllers, and note the USB ports they're plugged into. Mine were 6 and 9 (I chose the string "6-1" and "9-1"). Next time your machine is powered on you will grep the output for those ports. You will then grep for the input event handlers assigned to those touch controllers (may look something like /dev/input/eventX). Depending on other input devices and the order of device initialization those handlers can change, so you should bind them dynamically. Record the event handler into a variable for later use.

Then grep the output of xinput for the touch controllers to get their xinput numeric ids.* Record them into a variable.

Then grep the output of xinput list-props <id> with each of the numeric xinput ids for your touch controllers, looking for the event handler(s) you have previously stored in variables. This will allow you to establish the correlation between a physical USB port (where you know which touchscreen is plugged into) and the xinput numeric id.

Get your monitor ports from xrandr, these will not change between reboots as long as you keep your touchscreen monitors plugged in the same way, so you can keep these static. For example mine were DP3 for left and DP1 for right.

Finally map the xinput ids to the monitor ports... For example mine were like:
xinput map-to-output 12 DP3
xinput map-to-output 13 DP1

if you treat them as static, but like I said, you should have a script that dynamically determines the xinput numeric id for each.

That's the recipe. Hope it helps someone in the future, as you will not find a complete set of information for this scenario elsewhere.


Last edited by rootbeer666; 03-10-2020 at 07:00 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Xephyr with dual touchscreens dunknownl Linux - General 3 04-27-2018 10:46 AM
Dual touchscreens one mouse how to configure x-server kjartani Linux - Hardware 0 02-24-2011 03:34 PM
Dual Elographics Touchscreens, RH8, XFree86 4.3 Issue frankiemy1 Linux - General 0 06-07-2005 12:36 AM
Setting up for multiple ELO touchscreens eeoufan Linux - General 1 04-10-2005 05:11 PM
Touchscreens and RedHat Shad034 Linux - Hardware 3 12-16-2004 01:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration