- Home /
Linux Touchscreen Support?
I've been using Unity 5.5 to create a Linux prototype that uses a 4k touchscreen monitor. I recently upgraded to 5.6.1f and now it seems that I've lost Linux touchscreen support in my builds. I'm wondering if anyone else has encountered this issue, and if they've found a fix for it (e.g. a patched version of SDL2)?
I do see the following in the patch notes: https://unity3d.com/unity/beta/unity5.6.0b1
Linux / SteamOS: Switched window management and input handling from X11 to SDL2 on Linux / SteamOS.
FWIW: I installed the Linux Editor to create a native Linux build for my platform, and touch input still doesn't work. (The touchscreen works in all other apps, and the mouse and keyboard still work as expected.)
Further investigation...
Executing strace ./prototype.x86_64 2>&1 | grep -i sdl
produces no output, and ldd prototype.x86_64
contains no references to SDL2:
linux-vdso.so.1 => (0x00007ffff4f6c000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2204d9c000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2204b7f000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f2204976000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f22045f4000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f22042eb000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f22040d4000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2203d0b000)
/lib64/ld-linux-x86-64.so.2 (0x00005617aa376000)
So, it appears that the changelog might be a red herring.
Also, the unfiltered results from strace
makes it clear that touch input isn't even being observed at all. I'll file a bug report, if one doesn't already exist.
Answer by Morseliot · Jul 12, 2017 at 09:24 AM
@calebgray11 Same problem here, lost touchscreen input on 5.6.2... Just in case, here is my thread https://forum.unity3d.com/threads/linux-build-x_86_64-touchscreen-click-doesnt-work.482843/ Builds from 5.3.5 working fine. Have you found any fix?
I ended up creating my own native Linux plugin using the following resources: 1. https://docs.unity3d.com/$$anonymous$$anual/NativePlugins.html 2. http://blog.codestage.ru/2013/11/18/types-conversion/ 3. https://people.freedesktop.org/~whot/patches/mul$$anonymous$$ch.c
Then I extended the StandaloneInput$$anonymous$$odule
and passed the Touch event through as $$anonymous$$ouse events via Process$$anonymous$$ousePress
in the Process
method. Hope this helps others until the bug is fixed!
It would be very helpful if you could share the source of this native plugin.
@calebgray11 is there any chance you could elaborate more on your plugin? Have you shared it somewhere by any chance? @Wolfos Have you made any progress on this? We have just found ourselves in the same spot and not sure if it's possible to make it work?
Your answer
![](https://koobas.hobune.stream/wayback/20220612124514im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Touchscreen scrolling without clicking 0 Answers
Zoom in on tapped point in 3D space 1 Answer
Build an text editor in unity 3d 0 Answers
How can I make a GUI button be touch activated? 0 Answers
Fire ball towards touch position 1 Answer