You are not logged in.

#1 2018-05-02 12:32:59

riccardocagnasso
Member
Registered: 2012-02-22
Posts: 49

How to map to output to identical touchscreens

I've got a problem. I've a computer with two identical monitors with touchscreen and i need to map them to the correct video output.
I understand that i need to use udev to identify them via the USB port they are connected on. Here i get the first problem.

udevadm info -a -p $(udevadm info -q path -n /dev/input/mouse0)

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/0003:2575:0401.0001/input/input10/mouse0':
    KERNEL=="mouse0"
    SUBSYSTEM=="input"
    DRIVER==""

  looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/0003:2575:0401.0001/input/input10':
    KERNELS=="input10"
    SUBSYSTEMS=="input"
    DRIVERS==""
    ATTRS{name}=="Weida Hi-Tech                CoolTouchR System           "
    ATTRS{phys}=="usb-0000:00:14.0-1/input0"
    ATTRS{properties}=="2"
    ATTRS{uniq}==""

  looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/0003:2575:0401.0001':
    KERNELS=="0003:2575:0401.0001"
    SUBSYSTEMS=="hid"
    DRIVERS=="hid-multitouch"
    ATTRS{country}=="00"
    ATTRS{quirks}=="72720"

  looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0':
    KERNELS=="1-1:1.0"
    SUBSYSTEMS=="usb"
    DRIVERS=="usbhid"
    ATTRS{authorized}=="1"
    ATTRS{bAlternateSetting}==" 0"
    ATTRS{bInterfaceClass}=="03"
    ATTRS{bInterfaceNumber}=="00"
    ATTRS{bInterfaceProtocol}=="00"
    ATTRS{bInterfaceSubClass}=="00"
    ATTRS{bNumEndpoints}=="01"
    ATTRS{interface}=="CoolTouchR USB Interface 1  "
    ATTRS{supports_autosuspend}=="1"

  looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1/1-1':
    KERNELS=="1-1"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{authorized}=="1"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bDeviceClass}=="00"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bMaxPower}=="500mA"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bcdDevice}=="1430"
    ATTRS{bmAttributes}=="a0"
    ATTRS{busnum}=="1"
    ATTRS{configuration}=="CoolTouchR System 10x       "
    ATTRS{devnum}=="2"
    ATTRS{devpath}=="1"
    ATTRS{devspec}=="          (null)"
    ATTRS{idProduct}=="0401"
    ATTRS{idVendor}=="2575"
    ATTRS{ltm_capable}=="no"
    ATTRS{manufacturer}=="Weida Hi-Tech               "
    ATTRS{maxchild}=="0"
    ATTRS{product}=="CoolTouchR System           "
    ATTRS{quirks}=="0x0"
    ATTRS{removable}=="removable"
    ATTRS{speed}=="12"
    ATTRS{urbnum}=="183"
    ATTRS{version}==" 2.00"

  looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1':
    KERNELS=="usb1"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{authorized}=="1"
    ATTRS{authorized_default}=="1"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bDeviceProtocol}=="01"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bMaxPower}=="0mA"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bcdDevice}=="0415"
    ATTRS{bmAttributes}=="e0"
    ATTRS{busnum}=="1"
    ATTRS{configuration}==""
    ATTRS{devnum}=="1"
    ATTRS{devpath}=="0"
    ATTRS{devspec}=="          (null)"
    ATTRS{idProduct}=="0002"
    ATTRS{idVendor}=="1d6b"
    ATTRS{interface_authorized_default}=="1"
    ATTRS{ltm_capable}=="no"
    ATTRS{manufacturer}=="Linux 4.15.15-1-ARCH xhci-hcd"
    ATTRS{maxchild}=="12"
    ATTRS{product}=="xHCI Host Controller"
    ATTRS{quirks}=="0x0"
    ATTRS{removable}=="unknown"
    ATTRS{serial}=="0000:00:14.0"
    ATTRS{speed}=="480"
    ATTRS{urbnum}=="78"
    ATTRS{version}==" 2.00"

  looking at parent device '/devices/pci0000:00/0000:00:14.0':
    KERNELS=="0000:00:14.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="xhci_hcd"
    ATTRS{broken_parity_status}=="0"
    ATTRS{class}=="0x0c0330"
    ATTRS{consistent_dma_mask_bits}=="64"
    ATTRS{d3cold_allowed}=="1"
    ATTRS{device}=="0x9d2f"
    ATTRS{devspec}==""
    ATTRS{dma_mask_bits}=="64"
    ATTRS{driver_override}=="(null)"
    ATTRS{enable}=="1"
    ATTRS{irq}=="126"
    ATTRS{local_cpulist}=="0-3"
    ATTRS{local_cpus}=="f"
    ATTRS{msi_bus}=="1"
    ATTRS{numa_node}=="-1"
    ATTRS{revision}=="0x21"
    ATTRS{subsystem_device}=="0x8231"
    ATTRS{subsystem_vendor}=="0x103c"
    ATTRS{vendor}=="0x8086"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""

This is the output of udevadm of this device. AFAIK i should be able to match it with:

SUBSYSTEMS=="input"  KERNELS=="1-1"

Except it doesn't work. I dont' undestand why. In theory i should be able to match the device i want plus attributes by one parent. But it doesn't work. I can match a single device but when i try to add attributes from the parent, nothing.

Then i don't understand what i could modify in the device to be able to map it. I can set ENV{ID_INPUT.tags} and identify the device in xorg.conf but then i can't map it to a device there. And nothing i can set seems to affect xinput directly.

Offline

#2 2018-05-02 13:38:43

riccardocagnasso
Member
Registered: 2012-02-22
Posts: 49

Re: How to map to output to identical touchscreens

I've managed to match the correct devices in udev with

KERNEL=="event*", SUBSYSTEM=="input", SUBSYSTEMS=="input", ATTRS{name}=="Weida Hi-Tech                CoolTouchR System           ", ATTRS{phys}=="usb-0000:00:14.0-4/input0", SYMLINK+="input/ntrig-left"
KERNEL=="event*", SUBSYSTEM=="input", SUBSYSTEMS=="input", ATTRS{name}=="Weida Hi-Tech                CoolTouchR System           ", ATTRS{phys}=="usb-0000:00:14.0-1/input0", SYMLINK+="input/ntrig-right"

But i can't still figure out how to set "something" to these devices that i can manipulate with xinput and map to a video out

Offline

Board footer

Powered by FluxBB