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

Enable touchscreen support #718

Closed
ChrisHughes opened this issue Oct 30, 2014 · 17 comments
Closed

Enable touchscreen support #718

ChrisHughes opened this issue Oct 30, 2014 · 17 comments

Comments

@ChrisHughes
Copy link

I recently bought a touchscreen LCD marketed as being for Raspberry Pi and was disappointed to find that no touchscreen support is enabled in Raspbian's kernel by default.

With the upcoming focus on RPi launching their own touchscreen LCD add-on, I'm wondering if it is time that we enable support for USB Touch Screens out of the box, or as a downloadable package.

The touchscreen needs the 'USB touchscreen Driver' and Egalax controller drivers enabled. I have tried building the kernel myself, but it was a lot of effort, and after several hours and a successful build, it had detected the touchscreen but the compiled kernel caused other issues on the Pi. I hate the idea of having to recompile my kernel constantly just to keep this thing working and stay on top of the latest updates. Forums are full of frustrated users trying to get these things working, so it's clear I'm not alone in requesting this. A few examples of other users struggling with this are below:

http://www.raspberrypi.org/forums/viewtopic.php?f=66&t=78937
http://raspberrypi.stackexchange.com/questions/22868/egalax-touchscreen-support-without-kernel-recompile-raspbian-os

Some other info relating to getting this working on the Pi:
http://engineering-diy.blogspot.ca/2013/02/raspberry-pi-raspbian-xbmc-and-egalax-7.html
http://simonmcc.blogspot.ca/2013/08/raspberry-pi-rpi-kernel-build-for.html
http://karuppuswamy.com/wordpress/2013/01/17/how-to-get-evtouch-touch-screen-kit-working-in-linux/

@kwagenknight
Copy link

I agree, this is getting taxing that they cant come out with a pre-compiled OS version for us by now! I have had this problem with my B+ for over a year feeling like NOTHING has been done anywhere to address this issue!

@ChrisHughes
Copy link
Author

Are there any other forums / channels I can post this to in order to get the kernel dev's attention?

@popcornmix
Copy link
Collaborator

What exactly is required? Just adding:
CONFIG_TOUCHSCREEN_EGALAX=m
to kernel config?

@ChrisHughes
Copy link
Author

@popcornmix It appears to be all that's needed, see this https://dev.bananian.org/print_bug_page.php?bug_id=54

@popcornmix
Copy link
Collaborator

Okay will add in next update.

@kwagenknight
Copy link

Great thank you sir!

@popcornmix
Copy link
Collaborator

Now added. Please run rpi-update and test.

@AloisKlingler
Copy link

regrettably this was not the right option for USB egalax touchscreens.

the right option is located in:
Device Drivers --->
Input device support --->
[*] Touchscreens --->
< > USB Touchscreen Driver (TOUCHSCREEN_USB_COMPOSITE)
[ ] eGalax, eTurboTouch CT-410/510/700 device support (TOUCHSCREEN_USB_EGALAX)

if you could include this also I can test immedaitely. :-))

Thanks for your work!

@AloisKlingler
Copy link

@popcornmix
I just recompiled current (or yesterday's current) 3.18.7-v7 with this diff in .config:

diff .config.old .config
1829c1829,1847
< # CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
---
> CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
> CONFIG_TOUCHSCREEN_USB_EGALAX=y
> # CONFIG_TOUCHSCREEN_USB_PANJIT is not set
> # CONFIG_TOUCHSCREEN_USB_3M is not set
> # CONFIG_TOUCHSCREEN_USB_ITM is not set
> # CONFIG_TOUCHSCREEN_USB_ETURBO is not set
> # CONFIG_TOUCHSCREEN_USB_GUNZE is not set
> # CONFIG_TOUCHSCREEN_USB_DMC_TSC10 is not set
> # CONFIG_TOUCHSCREEN_USB_IRTOUCH is not set
> # CONFIG_TOUCHSCREEN_USB_IDEALTEK is not set
> # CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH is not set
> # CONFIG_TOUCHSCREEN_USB_GOTOP is not set
> # CONFIG_TOUCHSCREEN_USB_JASTEC is not set
> # CONFIG_TOUCHSCREEN_USB_ELO is not set
> # CONFIG_TOUCHSCREEN_USB_E2I is not set
> # CONFIG_TOUCHSCREEN_USB_ZYTRONIC is not set
> # CONFIG_TOUCHSCREEN_USB_ETT_TC45USB is not set
> # CONFIG_TOUCHSCREEN_USB_NEXIO is not set
> # CONFIG_TOUCHSCREEN_USB_EASYTOUCH is not set

and now the eGalax touchpanel works flawless:

[ 3.542048] input: eGalax Inc. USB TouchController as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/input/input0

maybe you can also set the other USB touch panels to y as I think USB-touchpanels are the most used on rpi. :-)
would be great if you can add this to the current config.

thanks!

@popcornmix
Copy link
Collaborator

Will add in next update.

popcornmix added a commit to raspberrypi/firmware that referenced this issue Feb 23, 2015
See: raspberrypi/linux#843

kernel: serial: amba-pl011: Kickstart TX by explicit FIFO fill
See: raspberrypi/linux#148

kernel: config: enable TOUCHSCREEN_USB_COMPOSITE
See: raspberrypi/linux#718

firmware: ldconfig: Sort config options and use bsearch for lookups

firmware: video_decode: Require a small factor improvement for fifo timestamps
See: http://forum.kodi.tv/showthread.php?tid=215399

firmware: video codec: allow length-delineated input to have startcodes as well
See: popcornmix/omxplayer#272
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue Feb 23, 2015
See: raspberrypi/linux#843

kernel: serial: amba-pl011: Kickstart TX by explicit FIFO fill
See: raspberrypi/linux#148

kernel: config: enable TOUCHSCREEN_USB_COMPOSITE
See: raspberrypi/linux#718

firmware: ldconfig: Sort config options and use bsearch for lookups

firmware: video_decode: Require a small factor improvement for fifo timestamps
See: http://forum.kodi.tv/showthread.php?tid=215399

firmware: video codec: allow length-delineated input to have startcodes as well
See: popcornmix/omxplayer#272
@popcornmix
Copy link
Collaborator

Please run rpi-update and test.

@ChrisHughes
Copy link
Author

@popcornmix It is working now. Thank you very much!

It still does need some config to work with X right out of the box, but at the kernel level it is detecting and registering it as an input device which all works great.

@mathewpeterson
Copy link

This saves me a TON of time and effort, thank you!

@hrshadhin
Copy link

In my case everything ok. But its not give proper touch point. If i touch right side of screen the mouse pointer is shows on left side of screen. Where is the problem?

@mathewpeterson
Copy link

@hrshadhin
Copy link

Thanks a lot. Its working great.

neuschaefer pushed a commit to neuschaefer/raspi-binary-firmware that referenced this issue Feb 27, 2017
See: raspberrypi/linux#843

kernel: serial: amba-pl011: Kickstart TX by explicit FIFO fill
See: raspberrypi/linux#148

kernel: config: enable TOUCHSCREEN_USB_COMPOSITE
See: raspberrypi/linux#718

firmware: ldconfig: Sort config options and use bsearch for lookups

firmware: video_decode: Require a small factor improvement for fifo timestamps
See: http://forum.kodi.tv/showthread.php?tid=215399

firmware: video codec: allow length-delineated input to have startcodes as well
See: popcornmix/omxplayer#272
@epikao
Copy link

epikao commented Jan 6, 2018

Hello,
with teensy 3.2 we can simulate a USB touchscreen, with
TouchscreenUSB.press(finger, x, y);
TouchscreenUSB.release(finger);

see also:
https://forum.pjrc.com/threads/32331-USB-HID-Touchscreen-support-needed

Unfortunately raspian can only shows a touch if press touch but as soon as a release the touch freezes...
On Windows or Mac it works fine but not with Raspbian, can you add support?

popcornmix pushed a commit that referenced this issue Sep 6, 2019
[ Upstream commit edf070a ]

hsr_port_get_hsr() could return NULL and kernel
could crash:

 BUG: kernel NULL pointer dereference, address: 0000000000000010
 #PF: supervisor read access in kernel mode
 #PF: error_code(0x0000) - not-present page
 PGD 8000000074b84067 P4D 8000000074b84067 PUD 7057d067 PMD 0
 Oops: 0000 [#1] SMP PTI
 CPU: 0 PID: 754 Comm: a.out Not tainted 5.2.0-rc6+ #718
 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-2.fc30 04/01/2014
 RIP: 0010:hsr_dev_xmit+0x20/0x31
 Code: 48 8b 1b eb e0 5b 5d 41 5c c3 66 66 66 66 90 55 48 89 fd 48 8d be 40 0b 00 00 be 04 00 00 00 e8 ee f2 ff ff 48 89 ef 48 89 c6 <48> 8b 40 10 48 89 45 10 e8 6c 1b 00 00 31 c0 5d c3 66 66 66 66 90
 RSP: 0018:ffffb5b400003c48 EFLAGS: 00010246
 RAX: 0000000000000000 RBX: ffff9821b4509a88 RCX: 0000000000000000
 RDX: ffff9821b4509a88 RSI: 0000000000000000 RDI: ffff9821bc3fc7c0
 RBP: ffff9821bc3fc7c0 R08: 0000000000000000 R09: 00000000000c2019
 R10: 0000000000000000 R11: 0000000000000002 R12: ffff9821bc3fc7c0
 R13: ffff9821b4509a88 R14: 0000000000000000 R15: 000000000000006e
 FS:  00007fee112a1800(0000) GS:ffff9821bd800000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: 0000000000000010 CR3: 000000006e9ce000 CR4: 00000000000406f0
 Call Trace:
  <IRQ>
  netdev_start_xmit+0x1b/0x38
  dev_hard_start_xmit+0x121/0x21e
  ? validate_xmit_skb.isra.0+0x19/0x1e3
  __dev_queue_xmit+0x74c/0x823
  ? lockdep_hardirqs_on+0x12b/0x17d
  ip6_finish_output2+0x3d3/0x42c
  ? ip6_mtu+0x55/0x5c
  ? mld_sendpack+0x191/0x229
  mld_sendpack+0x191/0x229
  mld_ifc_timer_expire+0x1f7/0x230
  ? mld_dad_timer_expire+0x58/0x58
  call_timer_fn+0x12e/0x273
  __run_timers.part.0+0x174/0x1b5
  ? mld_dad_timer_expire+0x58/0x58
  ? sched_clock_cpu+0x10/0xad
  ? mark_lock+0x26/0x1f2
  ? __lock_is_held+0x40/0x71
  run_timer_softirq+0x26/0x48
  __do_softirq+0x1af/0x392
  irq_exit+0x53/0xa2
  smp_apic_timer_interrupt+0x1c4/0x1d9
  apic_timer_interrupt+0xf/0x20
  </IRQ>

Cc: Arvid Brodin <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
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

7 participants