Noob help with /dev/input/event

Getting your soundcard to work, using Debian on non-i386 hardware, etc

Noob help with /dev/input/event

Postby om_R2E3 » 2020-05-12 20:07

Hi. I am new to Linux (first post here) and struggling to get a touch screen working on Stretch. I'm several hours deep in this problem now so it's probably time to ask.

"Xinput list" shows the touch screen as eGalax USB touch controller:

Code: Select all
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Synaptics Inc. Composite TouchPad / TrackPoint    id=10   [slave  pointer  (2)]
⎜   ↳ Synaptics Inc. Composite TouchPad / TrackPoint (Stick)    id=11   [slave  pointer  (2)]
⎜   ↳ eGalax Inc. USB TouchController           id=12   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Power Button                              id=7    [slave  keyboard (3)]
    ↳ Lite-On Tech IBM USB Keyboard with UltraNav       id=8    [slave  keyboard (3)]
    ↳ Lite-On Tech IBM USB Keyboard with UltraNav       id=9    [slave  keyboard (3)]
    ↳ UVC Camera (046d:09a4)                    id=13   [slave  keyboard (3)]


"Xinput list-props 12" shows that the device node is /Dev/input/event10

Code: Select all
Device 'eGalax Inc. USB TouchController':
        Device Enabled (146):   1
        Coordinate Transformation Matrix (148): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Calibration Matrix (336):      1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Calibration Matrix Default (337):      1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Natural Scrolling Enabled (321):       0
        libinput Natural Scrolling Enabled Default (322):       0
        libinput Send Events Modes Available (268):     1, 0
        libinput Send Events Mode Enabled (269):        0, 0
        libinput Send Events Mode Enabled Default (270):        0, 0
        libinput Left Handed Enabled (323):     0
        libinput Left Handed Enabled Default (324):     0
        libinput Scroll Methods Available (325):        0, 0, 1
        libinput Scroll Method Enabled (326):   0, 0, 0
        libinput Scroll Method Enabled Default (327):   0, 0, 0
        libinput Button Scrolling Button (328): 0
        libinput Button Scrolling Button Default (329): 0
        Device Node (271):      "/dev/input/event10"
        Device Product ID (272):        3823, 1
        libinput Drag Lock Buttons (332):       <no items>
        libinput Horizontal Scroll Enabled (333):       1


"evtest" shows me two eGalax devices with the same name at event10 and event11:

Code: Select all
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:      Power Button
/dev/input/event1:      Power Button
/dev/input/event2:      PC Speaker
/dev/input/event3:      HDA ATI SB Rear Mic
/dev/input/event4:      HDA ATI SB Front Mic
/dev/input/event5:      HDA ATI SB Line
/dev/input/event6:      HDA ATI SB Line Out
/dev/input/event7:      HDA ATI SB Front Headphone
/dev/input/event8:      Synaptics Inc. Composite TouchPad / TrackPoint
/dev/input/event9:      Synaptics Inc. Composite TouchPad / TrackPoint (Stick)
/dev/input/event10:     eGalax Inc. USB TouchController
/dev/input/event11:     eGalax Inc. USB TouchController
/dev/input/event12:     Lite-On Tech IBM USB Keyboard with UltraNav
/dev/input/event13:     Lite-On Tech IBM USB Keyboard with UltraNav
/dev/input/event14:     HDA ATI HDMI HDMI/DP,pcm=3
/dev/input/event15:     UVC Camera (046d:09a4)
Select the device event number [0-15]:


When I test event10 and touch the screen nothing happens.
When I test event11 and touch the screen it registers the input.

Can anyone tell me a way to resolve this problem?
Could it be as simple as something like: Xinput set-prop 12 271 "/dev/input/event11" and if so what would the syntax be?

There is a config file "/usr/share/X11/Xorg.conf.d/10-evdev.conf" which I think configures hardware using the evdev driver. Inside the file it says:

Section "InputClass"
Identifier "evdev touchscreen catchall"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"


If not here, then where does the device path get assigned to event10?

Thanks in advance for your time.
om_R2E3
 
Posts: 3
Joined: 2020-05-12 19:43

Re: Noob help with /dev/input/event

Postby Head_on_a_Stick » 2020-05-13 14:18

om_R2E3 wrote:Could it be as simple as something like: Xinput set-prop 12 271 "/dev/input/event11" and if so what would the syntax be?

Yes, looks good to me. Have you tried it?

Or create a file at /etc/X11/xorg.conf.d/10-evdev.conf containing the posted stanza but with the event number explicitly specified instead of the wildcard.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12650
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Noob help with /dev/input/event

Postby om_R2E3 » 2020-05-14 06:27

Hi Head on a stick. Thanks for your response.

I couldn't get the xinput set-prop command to change the device node. I tried lots of combinations but never got it working.

I also tried editing the 10-evdev.conf file to link the device directly to the event node too but that didn't work either. I edited the file inside "/usr/share/X11/Xorg.conf.d/" becuase my installation of stretch has no file at "/etc/X11/xorg.conf.d" I am still not sure why there are two possible locations for this config file?

Yesterday I fixed the problem though!
I used chmod to change the permissions of the /dev/input/event folder.
Then I used rm to remove the duplicate (not functioning) event listed as my touch screen.
After a reboot all the of the event numbers changed. My touch screen is now event3 and not event10 and it is working. Xinput list-props shows that it is connected to the correct event node now.
Then I used xinput_calibrator to calibrate the screen, and saved the calibration output inside the config file "/usr/share/X11/Xorg.conf.d/10-evdev.conf"

So I'm happy.
Thanks.
om_R2E3
 
Posts: 3
Joined: 2020-05-12 19:43

Re: Noob help with /dev/input/event

Postby om_R2E3 » 2020-05-15 19:10

Scratch that, I still need help.

After rebooting the machine again the problem has returned:

Every reboot the system is creating two device event notes inside /dev/input for my touch screen device, and the wrong one is being grabbed by the evdev driver. Anyone know how to stop this from happening?

Sorry if the terminology I've used is wrong.
om_R2E3
 
Posts: 3
Joined: 2020-05-12 19:43

Re: Noob help with /dev/input/event

Postby eriefisher » 2020-05-15 22:05

Have you tried to put that .conf file in /etc/x11/xorg.conf.d/

It should stay there through a reboot and not be overwritten.
____________________________________________
There's a manual?
Siduction
Debian Sid
Xfce4 4.14
User avatar
eriefisher
 
Posts: 130
Joined: 2008-06-04 03:49
Location: Ontario's South Coast

Re: Noob help with /dev/input/event

Postby Head_on_a_Stick » 2020-05-17 12:51

om_R2E3 wrote:my installation of stretch has no file at "/etc/X11/xorg.conf.d"

That's why I said "create". The files in /usr/share/X11/Xorg.conf.d/ will be overwritten on package updates (not reboots, as eriefisher wrongly suggests).

om_R2E3 wrote:I am still not sure why there are two possible locations for this config file?

There are *many* possible locations for an X.Org configuration file, read
Code: Select all
man xorg.conf

om_R2E3 wrote:Yesterday I fixed the problem though!
I used chmod to change the permissions of the /dev/input/event folder.
Then I used rm to remove the duplicate (not functioning) event listed as my touch screen.

That sounds just awful. The content of /dev/ is dynamically created at boot so those changes will be reverted (thankfully).

om_R2E3 wrote:Every reboot the system is creating two device event notes inside /dev/input for my touch screen device, and the wrong one is being grabbed by the evdev driver. Anyone know how to stop this from happening?

Write a udev rule: http://www.reactivated.net/writing_udev_rules.html
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12650
Joined: 2014-06-01 17:46
Location: /dev/chair


Return to Hardware

Who is online

Users browsing this forum: No registered users and 19 guests

fashionable