Touch reconnect after disconnection (hid input provider)

42 views
Skip to first unread message

Mauricio Vidal

unread,
Aug 23, 2022, 7:05:50 PM8/23/22
to Kivy users support
Hi:

My Linux device, with no X is not able to reconnect the touch screen if for some reason its cable is disconnected. The only way to make it work again is by restarting the app.

I have checked some issues on Github, but it seems to me that those are not related to my case, which uses  which uses hdinput.

Here is the part of my Kivy configuration file relevant to this:

[input]
mouse = mouse
egalaxCarnetix10_1 = probesysfs,match=eGalax Inc. USB TouchController Touchscreen,select_all=1,provider=hidinput
egalaxP829_9AHDT = probesysfs,match=eGalax Inc. Touch Touchscreen,select_all=1,provider=hidinput,param=invert_x=1,param=invert_y=0

Is there a way to force a reconnection inside the Kivy app?

(I don't' know why, but Kivy.org site at this moment is not reachable from my location to check the documentation)

Thank you for any pointer on this.

Mauricio Vidal

unread,
Sep 6, 2022, 11:22:24 AM9/6/22
to Kivy users support
So far, I have been able to get the log when the touch device disconnects:

Sep 6 10:16:34 intel stderr: Exception in thread HIDInputMotionEventProvider:
Sep 6 10:16:34 intel stderr: Traceback (most recent call last):
Sep 6 10:16:34 intel stderr: File "/usr/lib/python3.10/threading.py", line 1009, in _bootstrap_inner
Sep 6 10:16:34 intel stderr: File "/usr/lib/python3.10/threading.py", line 946, in run
Sep 6 10:16:34 intel stderr: File "/usr/lib/python3.10/site-packages/kivy/input/providers/hidinput.py", line 741, in _thread_run
Sep 6 10:16:34 intel stderr: OSError: [Errno 19] No such device

However, when re-attaching the cable of the touch device, there is no log (I'm at DEBUG level), then I guess that the issue starts here. How to get an event at Kivy when a device is attached once it is already running?

Any help would be much appreciated.

Robert

unread,
Sep 6, 2022, 7:43:31 PM9/6/22
to Kivy users support
A similar question was asked on Discord today, the response was   https://discord.com/channels/423249981340778496/670954354932449290/1016816152120397966

Discord invite if you need it https://discord.gg/PfTBYasK

Mauricio Vidal

unread,
Sep 8, 2022, 7:56:49 PM9/8/22
to Kivy users support
Thank you Robert,

Actually that was me asking there too. I got some useful info from the post you mention and some others after that.
While I haven't solve it yet, I'm documenting what I found here in case someone else finds it relevant:

Reply all
Reply to author
Forward
0 new messages