Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB touchscreen controller replug brokes ts_test #208

Open
mosolovsa opened this issue Nov 9, 2023 · 0 comments
Open

USB touchscreen controller replug brokes ts_test #208

mosolovsa opened this issue Nov 9, 2023 · 0 comments

Comments

@mosolovsa
Copy link

Hi! Thanks for maintaining such complex and demanded project!

I'm not sure if that's a right place to ask questions, so excuse me if it's not.

I have ARM embedded Linux board with USB touchscreen controller. It's required to run single Qt app with tslib and linuxfb plugin (without X-Server or anything similar).

To test the touchscreen I use ts_test app.

  1. Identify chardev major and minor, then create file for that chardev (I assume that file can be used by tslib (and it's so) and have constant filesystem path)
# cat /proc/bus/input/devices 
...
I: Bus=0003 Vendor=14c8 Product=0005 Version=0101
N: Name="Zytronic Displays Limited Zytronic Touchscreen Controller Touchscreen"
P: Phys=usb-1c1c400.usb-1/input0
S: Sysfs=/devices/platform/soc/1c1c400.usb/usb5/5-1/5-1:1.0/0003:14C8:0005.0001/input/input1
U: Uniq=
H: Handlers=event1 
B: PROP=0
B: EV=1b
B: KEY=420 0 0 0 0 0 0 0 0 0 0
B: ABS=100 3
B: MSC=10

# cat /sys/devices/platform/soc/1c1c400.usb/usb5/5-1/5-1:1.0/0003:14C8:0005.0001/input/input1/event1/dev
13:65

# mknod /dev/uinput c 13 65

Then run ts_test with:

TSLIB_TSDEVICE=/dev/uinput ts_test

The problem is when USB repluged - ts_test app stop receiving input from touchscreen controller. If I restart ts_test with the same command from shell - it's working like a charm up to next replug.

Is there any possibility to handle USB replug by some hack? E.g. handle replug by udev event or something similar? Main showstopper is that I can't just restart Qt app because of complex state, that can't be serialized with ease, I have same behavior in Qt app - on USB replug Qt app stops receiving touchscreen input and all is fine if Qt app is restarted.

There is related issue:
#52
That's somehow resolved by commit:
5bfde87
I couldn't understand how that can help me with this case.

Is there any possibility to make things work without restarting the app on replug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant