Obsolete quirk prevents multitouch module for eGalax touchscreen from working

Bug #625511 reported by Philipp Merkel
94
This bug affects 20 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Maverick by steverweber

Bug Description

In the Maverick Kernel (tested with 2.6.35-19) the eGalax/DWAV touchscreen (USB ID 0eef:480d) found in the Eee PC T101MT doesn't send multitouch events although the correct module hid_egalax is included in the Kernel. The reason is that the MULTI_INPUT quirk is still used for this device although it is no longer needed, and it prevents the module from working.

Steps to reproduce:
Start Ubuntu 10.10 on an Eee PC T101MT with eGalax touchscreen. Check xinput --list to find out that the screen is listed twice. Run evtest to find out that four device nodes (/dev/input/event6 ... /dev/input/event9) are created for the device. Only one of them produces events, and they are only single touch events. The other nodes produce no events at all. None produces multitouch events.

Reason:
In drivers/hid/usbhid/hid-quirks.c , you find the line
{ USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH, HID_QUIRK_MULTI_INPUT }
which causes the MULTI_INPUT quirk to be added to the device, which prevents the hid_egalax module from working and thus only the quirky default handling of the touchscreen is applied.

Fix:
Remove this line from hid-quirks.c using the attached patch; Now hid_egalax manages the screen: it appears only once in xinput --list, only creates one device node which delivers single touch and multitouch events, as expected.

One problem with this fix though: Because of a bug in the hid_egalax module, the screen assumes a wrong range for the coordinate axes when in multitouch mode. There also is a patch for this, which is attached, too.

Revision history for this message
Philipp Merkel (plippo) wrote :
tags: added: patch
Revision history for this message
Philipp Merkel (plippo) wrote :

I've decided to attach the second patch to this bug, too, because otherwise applying the first patch would cause a regression. The second patch adjusts the coordinates of the input events (by shifting it by three bits) so they are in the same range as in single-touch mode (this doesn't cause a loss of precision as the last three bits of the events was always 0 anyway). It also adds the pressure sensitivity information for single-touch events. This way, all features of single-touch mode are also available for the single-touch events in multi-touch mode.

Revision history for this message
Kev (kevvroxx) wrote :

confirm all issues as above, thanks for all the hard work to the team.

Revision history for this message
riccardo de palo (riccardo-depalo-gmail) wrote :

Confirm the bug, no multitouch with 2.6.39-19 kernel. Thanks

Revision history for this message
Coffen (christoffer-riska) wrote :

Yup, same here. Multitouch not working. Hope to see this fixed soon.
Thanks to all fo the effort.

Revision history for this message
J Goh (kejgoh) wrote :

This bug affects me too! Thanks for the effort.

TH (th84)
description: updated
Philipp Merkel (plippo)
description: updated
tags: added: kj-triage
Revision history for this message
madbiologist (me-again) wrote :

This should be fixed upstream in kernel 2.6.36-rc5. From the changelog:

commit d34c4aa43df20bbf2730a67f14c1cf6d133d99e6
Author: Johan Hovold
Date: Thu Sep 2 23:05:09 2010 +0200

    HID: add no-get quirk for eGalax touch controller

    Add no-get quirk for eGalax touch controller to avoid timeout at probe.

    Signed-off-by: Johan Hovold
    Signed-off-by: Jiri Kosina

and

commit ebd11fecd3096b080c84fb35014916ae2b5ba64a
Author: Thierry Reding
Date: Mon Aug 30 13:11:42 2010 +0200

    HID: Add quirk for eGalax touch controler.

    This patch adds a quirk for the eGalax touch controller which reports
    two pairs of axes.

    Signed-off-by: Thierry Reding
    Signed-off-by: Jiri Kosina

Revision history for this message
Philipp Merkel (plippo) wrote :

Madbiologist, no, the fix you mentioned is for a different eGalax controler. The fix for this bug here is currently being reviewed on the linux-input mailing list (it's almost accepted, Stéphane Chatty is only waiting for some feedback whether the fix is also valid for another screen handled by the same driver).

Revision history for this message
Philipp Merkel (plippo) wrote :

Please note that the patch has been accepted upstream: http://www.spinics.net/lists/linux-input/msg11539.html

I guess it's too late to backport it to Maverick?

Revision history for this message
madbiologist (me-again) wrote :

Sorry about comment #7 - I was updating a few bugs concurrently and did this one by mistake. Hence the "mad" (as in madness, not as in angry) part of my nickname.

The patch for this bug has been included upstream in kernel 2.6.37-rc1. From the changelog:

commit f51661105c3c8a0afcd69f995a4f4a10e53da153
Author: Philipp Merkel
Date: Fri Oct 1 15:38:59 2010 +0200

    HID: Fix for problems with eGalax/DWAV multi-touch-screen

    This patch fixes three problems with the eGalax/DWAV multi-touch
    screen found in the Eee PC T101MT:

    1) While there is a dedicated multitouch driver for the screen
       (hid-egalax.c), the MULTI_INPUT quirk is also applied, preventing
       the hid-egalax driver from working. This patch removes the quirk
       so the hid-egalax driver can handle the device correctly.
    2) The x and y coordinates sent by the screen in multi-touch mode are
       shifted by three bits from the events sent in single-touch mode, thus
       the coordinates are out of range, leading to the pointer being stuck
       in the bottom-right corner if no additional calibration is applied
       (e.g. in the X evdev driver). This patch shifts the coordinates back.
       This does not decrease accuracy as the last three bits of the "wrong"
       coordinates are always 0.
    3) Only multi-touch pressure events are sent, single touch emulation is
       missing pressure information. This patch adds single-touch
       ABS_PRESSURE events.

    Signed-off-by: Philipp Merkel
    Acked-by: Stéphane Chatty
    Signed-off-by: Jiri Kosina

A PPA of this kernel is available at http://kernel.ubuntu.com/~kernel-ppa/mainline/

Changed in linux (Ubuntu):
status: New → Fix Committed
Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Aaron Christianson (ninjaaron) wrote :

Eh... maybe I need to file a separate bug report or something, but I just upgraded to the Maverick 2.6.37-rc2, and my egalax touchscreen (on a Dell duo) still doesn't work. "xinput list" returns three not one, not two, but three egalax touchscreens:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ eGalax Inc. USB TouchController id=10 [slave pointer (2)]
⎜ ↳ eGalax Inc. USB TouchController id=11 [slave pointer (2)]
⎜ ↳ eGalax Inc. USB TouchController id=12 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=15 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]

I'm not sure what is to be done about this. Is it because I installed from 2.6.35-21? Would I need to do a custom installation from scratch with a newer kernel to fix it? What to do?

Revision history for this message
Michael Franzl (michaelfranzl) wrote :

Thanks a lot for this. The touchscreen Glancetron GT15plus (lsusb output: ID 0eef:0001 D-WAV Scientific Co., Ltd eGalax TouchScreen) was not fully working with the default kernel of Ubuntu 10.10. Clicking worked but the cursor would jump to the top left corner of the screen at each click.

I've installed the Ubuntu mainline kernel 2.6.37-020637rc2-generic and now it works perfectly.

Revision history for this message
Tuomas (tuma+sec) wrote :

Like Aaron wrote, I got the same problem on my Dell Latitude E6420 laptop. It seems that this patch does not fix my problem, although the symptoms are the same.

lsusb:

Bus 001 Device 005: ID 0eef:7356 D-WAV Scientific Co., Ltd

xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ eGalax Inc. USB TouchController id=11 [slave pointer (2)]
⎜ ↳ eGalax Inc. USB TouchController id=12 [slave pointer (2)]
⎜ ↳ eGalax Inc. USB TouchController id=13 [slave pointer (2)]
⎜ ↳ ImPS/2 ALPS GlidePoint id=15 [slave pointer (2)]
⎜ ↳ Dell Dell USB Optical Mouse id=18 [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)]
    ↳ Video Bus id=7 [slave keyboard (3)]
    ↳ Power Button id=8 [slave keyboard (3)]
    ↳ Sleep Button id=9 [slave keyboard (3)]
    ↳ Laptop_Integrated_Webcam_FHD id=10 [slave keyboard (3)]
    ↳ AT Translated Set 2 keyboard id=14 [slave keyboard (3)]
    ↳ Dell WMI hotkeys id=16 [slave keyboard (3)]
    ↳ LITEON Technology USB Multimedia Keyboard id=17 [slave keyboard (3)]

Revision history for this message
Tuomas (tuma+sec) wrote :

forgot to mention that I am running 64 bit Natty. Single-touch works when usbhid.quirks=0xeef:0x7356:0x40 is appended to kernel parameters.

Revision history for this message
zwox (kylie.minogue) wrote :

confirm that single touch works with usbhid.quirks=0xeef:0x7356:0x40 appended to kernel.
I read the thread and something is bugging me, what exactly is "usbhid.quirks=0xeef:0x7356:0x40" standing for, because I tried to build a custom kernel, and everything works well with this appended as kernel parameters, but I also built some modules for handling egalax touchscreen.
It appears in 3.0-rc7 that hid-egalax was merged into hid-multitouch and it seems that this modules doesn't handle my egalax (0eef:7356 on a dell latitude e6420).
I can't figure out what module exactly handles it because removing the kernel parameters, the touchscreen jump to the top left corner at any single touch on the screen.
the only modules loaded at boot time by system are :

Module Size Used by
ntfs 194422 0
ppdev 16782 0
lp 17074 0
cpufreq_userspace 12576 0
cpufreq_conservative 13105 0
acpi_cpufreq 12893 1
mperf 12411 1 acpi_cpufreq
rfcomm 40999 8
cpufreq_stats 12777 0
bnep 17470 2
cpufreq_powersave 12454 0
binfmt_misc 16949 1
uinput 17360 1
nfsd 303385 13
exportfs 12567 1 nfsd
loop 26506 0
nvidia 11769525 43
iwlagn 189164 0
uvcvideo 69970 0
btusb 17289 2
parport_pc 26287 0
battery 13109 0
button 12937 0
ac 12624 0
video 17629 0
processor 27965 9 acpi_cpufreq
i2c_i801 16891 0
psmouse 63288 0
tpm_tis 17265 0
ext4 373903 9
mbcache 12985 1 ext4
jbd2 77208 1 ext4
sg 29895 0
usb_storage 47847 0
sr_mod 21855 0
uas 17272 0
cdrom 39472 1 sr_mod
sd_mod 43854 4
thermal 17383 0

I had a look on hid-multitouch.c and i couldn't figure out why without the kernel parameter, the touchscreen had the same behaviour whereas it seems the probleme was partially solved and the routines in the source handle events quiet differently.

Revision history for this message
Clayton Kramer (clayton-kramer) wrote :

I'm having the same problem with my Latitude E6420. Single-touch works with the quirks parameter but no multi-touch. I'm running x64 Natty with the 2.6.38-10-generic kernel.

Revision history for this message
zwox (kylie.minogue) wrote :

i've compiled a new 3.0.0 kernel with witch the click work on the touchscreen, but the cursor is not moving, everything without the usbhid parameter passed to the kernel. I think with a little more work, i'll soon be able to have it to work perfectly in multitouch mod, but i was wondering, with the kernel parameter i got 3 egalax device listed by xinput list, whereas i get only one without those parameters, is it also possible to make it work with mpx, configuring 1 or 2 of the 3 devices with different core pointer ? I tried just for fun, but it didn't worked, I assumed that with usbhid parameters, the multi-touch is mapped as 3 different single-touch event given the fact that the usbhid parameter prevents the use of multi-touch... Am I wrong ?

Revision history for this message
Søren Holm (sgh) wrote :

I'm having the exact same problem as Tuomas..

Revision history for this message
Chey (chey-smith) wrote :

I am having the same problem as Tuomas and zwox. I have a Dell Latitude E6420. Single touch works when I load the usbhid module with the following parameters:

quirks=0xeef:0x7356:0x40

I am running Ubuntu 11.10 with the latest updates.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.