Bug 703118

Summary: Dell ST2220T touchscreen does not work
Product: [Fedora] Fedora Reporter: ritz <rkhadgar>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: chiauee85, ctopher, gansalmon, gtiwari, itamar, jonathan, jwboyer, kernel-maint, madhu.chinakonda
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-08 17:09:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
DELL-ST2220T Touch Screen Monitor Driver Patch none

Description ritz 2011-05-09 10:45:08 UTC
Description of problem:
Dell ST2220T does not work. The device is seen, but no events are registered 

Version-Release number of selected component (if applicable):
kernel 2.6.38.5-24.fc15.x86_64 x86_64 GNU/Linux


How reproducible:
always


Steps to Reproduce:
1. Plugin the device
  
Actual results:
evtest returns no result

Expected results:
touch should be registered

Additional info:

The device is seen as a mouse ??? 

# cat /tmp/o
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ LG Display LGD-MultiTouch               	id=10	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Dell Dell USB Keyboard Hub              	id=6	[slave  keyboard (3)]
    ↳ Dell Dell USB Keyboard Hub              	id=7	[slave  keyboard (3)]
    ↳ Power Button                            	id=8	[slave  keyboard (3)]
    ↳ Power Button                            	id=9	[slave  keyboard (3)]


from dmesg

[   14.340313] hub 5-0:1.0: unable to enumerate USB device on port 2
[   14.413131] usb 1-1.1: new full speed USB device using ehci_hcd and address 6
[   14.500874] usb 1-1.1: New USB device found, idVendor=1fd2, idProduct=0064
[   14.501179] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   14.501696] usb 1-1.1: Product: LGD-MultiTouch
[   14.501977] usb 1-1.1: Manufacturer: LG Display
[   14.506445] input: LG Display LGD-MultiTouch as /devices/pci0000:00/0000:00:13.5/usb1/1-1/1-1.1/1-1.1:1.0/input/input2
[   14.508329] generic-usb 0003:1FD2:0064.0001: input,hiddev0,hidraw0: USB HID v1.00 Mouse [LG Display LGD-MultiTouch] on usb-0000:00:13.5-1.1/input0


from evtest
# evtest /dev/input/event2
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x1fd2 product 0x64 version 0x100
Input device name: "LG Display LGD-MultiTouch"
Supported events:
  Event type 0 (Sync)
  Event type 1 (Key)
    Event code 272 (LeftBtn)
    Event code 273 (RightBtn)
    Event code 320 (ToolPen)
    Event code 321 (ToolRubber)
    Event code 330 (Touch)
  Event type 3 (Absolute)
    Event code 0 (X)
      Value      0
      Min        0
      Max     1920
    Event code 1 (Y)
      Value      0
      Min        0
      Max     1080
    Event code 2 (Z)
      Value      0
      Min        0
      Max     1920
    Event code 3 (Rx)
      Value      0
      Min        0
      Max     1080
    Event code 4 (Ry)
      Value      0
      Min        0
      Max    32767
    Event code 5 (Rz)
      Value      0
      Min        0
      Max    32767
    Event code 40 (Misc)
      Value      0
      Min        0
      Max        1
    Event code 41 (?)
      Value      0
      Min        0
      Max        1
    Event code 42 (?)
      Value      0
      Min        0
      Max     1080
  Event type 4 (Misc)
    Event code 4 (ScanCode)
Testing ... (interrupt to exit)
<nothing follows>

Comment 1 ritz 2011-06-09 10:06:35 UTC
Adding Gopal to list, who has managed to talk to the h/w and is working on this.

Comment 2 gopal krishna tiwari 2011-06-20 05:20:54 UTC
Created attachment 505530 [details]
DELL-ST2220T Touch Screen Monitor Driver Patch

this is the patch to Start getting event or touch event from the DELL-ST2220T Touch screen monitor......to the upper layer.

Comment 3 Josh Boyer 2011-08-16 19:31:29 UTC
(In reply to comment #2)
> Created attachment 505530 [details]
> DELL-ST2220T Touch Screen Monitor Driver Patch
> 
> this is the patch to Start getting event or touch event from the DELL-ST2220T
> Touch screen monitor......to the upper layer.

Did you ever send this patch upstream?  I don't see anything related to it in the latest kernels.

Comment 4 gopal krishna tiwari 2011-08-17 04:05:29 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Created attachment 505530 [details]
> > DELL-ST2220T Touch Screen Monitor Driver Patch
> > 
> > this is the patch to Start getting event or touch event from the DELL-ST2220T
> > Touch screen monitor......to the upper layer.
> 
> Did you ever send this patch upstream?  I don't see anything related to it in
> the latest kernels.

I have Forwarded the patch to upstream but don't have any reply.

Comment 5 Chris 2011-09-03 20:06:56 UTC
I rolled this patch into a kernel build of 2.6.40.3-0

evtest shows:
--------------------
...
/dev/input/event4:	LG Display LGD-MultiTouch
Select the device event number [0-4]: 4
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x1fd2 product 0x64 version 0x200
Input device name: "LG Display LGD-MultiTouch"
Supported events:
  Event type 0 (Sync)
  Event type 1 (Key)
    Event code 330 (Touch)
  Event type 3 (Absolute)
    Event code 0 (X)
      Value      0
      Min        0
      Max    16384
    Event code 1 (Y)
      Value      0
      Min        0
      Max    16384
Testing ... (interrupt to exit)
Event: time 1315080222.016585, type 3 (Absolute), code 0 (X), value 9622
Event: time 1315080222.016588, type 3 (Absolute), code 1 (Y), value 6600
Event: time 1315080222.016590, -------------- Report Sync ------------

----------------

I only see type 3 events, no touches or (Key) or left button events. Making this not a very good touch screen unless all you want to do is move the cursor around.

Comment 6 ritz 2011-09-03 20:16:55 UTC
Hi Chris

  all this patch does is initialize the device, and report back the cursor. All touch on such a device is supposed to be registered as click. I am not sure, if this is the right way to do this, or do we use hoverclick.

Comment 7 Chris 2011-09-03 20:49:33 UTC
(In reply to comment #6)
> Hi Chris
> 
>   all this patch does is initialize the device, and report back the cursor. All
> touch on such a device is supposed to be registered as click. I am not sure, if
> this is the right way to do this, or do we use hoverclick.

Perhaps all touch should be a click but with this patch, there's no click, key or other event.

If I switch to the standard x_86_64 kernel:
-----------
2.6.40.3-0.fc15.x86_64 #1 SMP Tue Aug 16 04:10:59 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
-----------

and run evtest again it still shows up as an LG Display LGD-Multitouch. evtest spits out a lot of stuff, with just one touch. Here it all is
-----------
...
[root@zbox1 ctopher]# evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:	Power Button
/dev/input/event1:	Power Button
/dev/input/event2:	PIXART USB OPTICAL MOUSE
/dev/input/event3:	Alps Electric M2452
/dev/input/event4:	LG Display LGD-MultiTouch
Select the device event number [0-4]: 4
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x1fd2 product 0x64 version 0x100
Input device name: "LG Display LGD-MultiTouch"
Supported events:
  Event type 0 (Sync)
  Event type 1 (Key)
    Event code 272 (LeftBtn)
    Event code 273 (RightBtn)
    Event code 320 (ToolPen)
    Event code 321 (ToolRubber)
    Event code 330 (Touch)
  Event type 3 (Absolute)
    Event code 0 (X)
      Value      0
      Min        0
      Max     1920
    Event code 1 (Y)
      Value      0
      Min        0
      Max     1080
    Event code 2 (Z)
      Value      0
      Min        0
      Max     1920
    Event code 3 (Rx)
      Value      0
      Min        0
      Max     1080
    Event code 4 (Ry)
      Value      0
      Min        0
      Max    32767
    Event code 5 (Rz)
      Value      0
      Min        0
      Max    32767
    Event code 40 (Misc)
      Value      0
      Min        0
      Max        1
    Event code 41 (?)
      Value      0
      Min        0
      Max        1
    Event code 42 (?)
      Value      0
      Min        0
      Max     1080
  Event type 4 (Misc)
    Event code 4 (ScanCode)
Testing ... (interrupt to exit)
Event: time 1315082268.710873, type 4 (Misc), code 4 (ScanCode), value d0042
Event: time 1315082268.710876, type 1 (Key), code 330 (Touch), value 1
Event: time 1315082268.710883, type 1 (Key), code 320 (ToolPen), value 1
Event: time 1315082268.710889, type 3 (Absolute), code 40 (Misc), value 2
Event: time 1315082268.710895, type 3 (Absolute), code 0 (X), value 553
Event: time 1315082268.710901, type 3 (Absolute), code 1 (Y), value 333
Event: time 1315082268.710907, type 4 (Misc), code 4 (ScanCode), value d0042
Event: time 1315082268.710910, type 1 (Key), code 330 (Touch), value 0
Event: time 1315082268.710920, type 3 (Absolute), code 41 (?), value 3
Event: time 1315082268.710926, type 3 (Absolute), code 2 (Z), value 65535
Event: time 1315082268.710931, type 3 (Absolute), code 3 (Rx), value 65535
Event: time 1315082268.710938, type 3 (Absolute), code 42 (?), value 2
Event: time 1315082268.710941, -------------- Report Sync ------------
Event: time 1315082268.718873, type 4 (Misc), code 4 (ScanCode), value d0042
Event: time 1315082268.718876, type 1 (Key), code 330 (Touch), value 1
Event: time 1315082268.718900, type 4 (Misc), code 4 (ScanCode), value d0042
Event: time 1315082268.718903, type 1 (Key), code 330 (Touch), value 0
Event: time 1315082268.718926, -------------- Report Sync ------------
Event: time 1315082268.726872, type 4 (Misc), code 4 (ScanCode), value d0042
Event: time 1315082268.726875, type 1 (Key), code 330 (Touch), value 1
Event: time 1315082268.726899, type 4 (Misc), code 4 (ScanCode), value d0042
Event: time 1315082268.726901, type 1 (Key), code 330 (Touch), value 0
Event: time 1315082268.726925, -------------- Report Sync ------------
Event: time 1315082268.734871, type 4 (Misc), code 4 (ScanCode), value d0042
Event: time 1315082268.734874, type 1 (Key), code 330 (Touch), value 1
Event: time 1315082268.734898, type 4 (Misc), code 4 (ScanCode), value d0042
Event: time 1315082268.734901, type 1 (Key), code 330 (Touch), value 0
Event: time 1315082268.734924, -------------- Report Sync ------------
Event: time 1315082268.742868, type 4 (Misc), code 4 (ScanCode), value d0042
Event: time 1315082268.742872, type 1 (Key), code 330 (Touch), value 1
Event: time 1315082268.742896, type 4 (Misc), code 4 (ScanCode), value d0042
Event: time 1315082268.742898, type 1 (Key), code 330 (Touch), value 0
Event: time 1315082268.742922, -------------- Report Sync ------------
Event: time 1315082268.750884, type 4 (Misc), code 4 (ScanCode), value d0042
Event: time 1315082268.750888, type 1 (Key), code 330 (Touch), value 1
Event: time 1315082268.750912, type 4 (Misc), code 4 (ScanCode), value d0042
Event: time 1315082268.750915, type 1 (Key), code 330 (Touch), value 0
Event: time 1315082268.750939, -------------- Report Sync ------------
Event: time 1315082268.758869, type 4 (Misc), code 4 (ScanCode), value d0042
Event: time 1315082268.758872, type 1 (Key), code 330 (Touch), value 1
Event: time 1315082268.758896, type 4 (Misc), code 4 (ScanCode), value d0042
Event: time 1315082268.758899, type 1 (Key), code 330 (Touch), value 0
Event: time 1315082268.758923, -------------- Report Sync ------------
Event: time 1315082268.770866, type 4 (Misc), code 4 (ScanCode), value d0042
Event: time 1315082268.770870, type 1 (Key), code 330 (Touch), value 1
Event: time 1315082268.770893, type 4 (Misc), code 4 (ScanCode), value d0042
Event: time 1315082268.770896, type 1 (Key), code 330 (Touch), value 0
Event: time 1315082268.770920, -------------- Report Sync ------------
Event: time 1315082268.778870, type 4 (Misc), code 4 (ScanCode), value d0042
Event: time 1315082268.778875, type 1 (Key), code 330 (Touch), value 1
Event: time 1315082268.778901, type 4 (Misc), code 4 (ScanCode), value d0042
Event: time 1315082268.778904, type 1 (Key), code 330 (Touch), value 0
Event: time 1315082268.778928, -------------- Report Sync ------------
Event: time 1315082268.786863, type 1 (Key), code 320 (ToolPen), value 0
Event: time 1315082268.786909, -------------- Report Sync ------------
^C
[root@zbox1 ctopher]# 
-----------

I don't know if we need all those events, but at least in this mode, if I touch a new window, it becomes active. Forget doing anything useful however. If you touch an icon in Nautilus it will attempt to open the file a zillion times. (meaning a lot!).

So, the patch helps calm down the events but it doesn't make the touch screen really work. I'm in way over my head here, so any suggestions would be wonderful.

As an aside, building a new kernel every time a one-line change is made is killing me. I know this is not a forum for this kind of help, but a link to some info that might make debugging this a little easier would be greatly appreciated.

That said, I have the hardware so if anyone has something they'd like me to try, I'm here to help promote the Dell ST2220T to a full fledged Fedora citizen.

Comment 8 chew 2011-09-04 04:35:59 UTC
Hi Chris,

By changing the line "dev->touch = (pkt[2] & 0x03) ? 1 : 0" to "dev->touch = (pkt[1] & 0x03) ? 1 : 0" under st2220t_read_data() function in the driver patch, the click functionality will be able to work properly. Note: I have tried it on Fedora 14 with kernel 2.6.38 (64 bit).

Hope it helps.

Comment 9 gopal krishna tiwari 2011-09-05 04:50:27 UTC
Hi,

chris, I am agreed to comment 8. But issue with this monitor is it does not give any click events instead it has only touch for this you can use hoverclick as suggested in comment 6. Rather i have tried registering click event over touch but the issue is when you move mouse it take as click and when you take your finger off from the screen your click off so it disturb everything. So in that case you need to sacrifice with mouse movement.

Comment 10 Chris 2011-09-05 18:00:17 UTC
Hi chew,

It works!

For everyone else, here's what I did. I followed along with this wiki article

http://fedoraproject.org/wiki/Building_a_custom_kernel

I skipped "Copy the Source Tree and Generate a Patch" and copied the standard config for x86_64. I ran xconfig, but I didn't change anything. (usbtouchscreen is defined as a loadable module)

I downloaded the patch file from this bug report and put it in the SOURCES directory.

I modified the SPECS/kernel.spec file and defined "buildid" as ".Dell_ST2220T" so that the new kernel would have a unique name. I added the patch to the kernel.specs file as well.

I followed the instructions on building the kernel and firmware, but I could never get the firmware to install. I ended up installing the kernel using:

"su -c "rpm -ivh --force $HOME/rpmbuild/RPMS/<arch>/kernel-<version>.<arch>.rpm"

I got warnings, but it loaded.

Unfortunately, the patch as written does not emit touch events, just position, so I had to make the "chew" change in comment 8. Fortunately, I had gone through the pain of building and installing a custom kernel, so I just had to figure out how to modify just the usbtouchscreen.ko module and load it up.

I changed directories into the linux source "$HOME/rpmbuild//BUILD/kernel-2.6.39.fc15/linux-2.6.39.x86_64" in my case and issued a make command for the module:

"make drivers/input/touchscreen/usbtouchscreen.ko"

Then to install is, I used:
"su insmod ./drivers/input/touchscreen/usbtouchscreen.ko"

plugged in the Dell USB and it worked!

When I run evtest and just touch the screen and take my finger off I get:
---------------------
...
/dev/input/event4:	LG Display LGD-MultiTouch
Select the device event number [0-4]: 4
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x1fd2 product 0x64 version 0x200
Input device name: "LG Display LGD-MultiTouch"
Supported events:
  Event type 0 (Sync)
  Event type 1 (Key)
    Event code 330 (Touch)
  Event type 3 (Absolute)
    Event code 0 (X)
      Value   9667
      Min        0
      Max    16384
    Event code 1 (Y)
      Value   8535
      Min        0
      Max    16384
Testing ... (interrupt to exit)
Event: time 1315245129.689025, type 1 (Key), code 330 (Touch), value 1
Event: time 1315245129.689029, type 3 (Absolute), code 0 (X), value 7687
Event: time 1315245129.689031, type 3 (Absolute), code 1 (Y), value 7455
Event: time 1315245129.689034, -------------- Report Sync ------------
Event: time 1315245129.733038, type 1 (Key), code 330 (Touch), value 0
Event: time 1315245129.733052, -------------- Report Sync ------------
^C
---------------------

Using this driver I've been successful at dragging objects around in Nautilus, touching and dragging interface objects in Firefox etc.

Of course be careful.

Thanks to all for the help!

gopal, I'm not sure what you mean by disturb everything. I have not extensively tested this patched patch, but so far I able to get simple mouse-type actions with it. It's not multi-touch as far as I know, but then that's beyond my current specifications. So far this works for me. I'm hoping the module will load the next time I reboot!

Thanks again. I'll keep folks posted if I have further issues.

Chris

Comment 11 Josh Boyer 2012-02-08 17:09:22 UTC
The basic support should be in all Fedora releases at this point.  Upstream added this with commit c50bb1a4005630f47b5da26336f74a485033a515 which is in the 3.2 kernel.