Opened 13 years ago
Closed 10 years ago
#8338 closed enhancement (fixed)
Touch screen doesn't work on Acer W500
Reported by: | lxstoian | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Drivers | Version: | R1/Development |
Keywords: | Acer, W500, touchscreen | Cc: | |
Blocked By: | Blocking: | #8370, #9545 | |
Platform: | x86 |
Description
This is an x86 tablet ( AMD C-60 APU ). The touch screen is eGalax : http://home.eeti.com.tw/web20/eg/Touch_Drives.html
Haiku doesn't have support for touch screens , but as things are going now in the computer world this might be a feature to consider.
Attachments (9)
Change History (32)
follow-up: 2 comment:1 by , 13 years ago
comment:2 by , 13 years ago
Replying to Bouncer:
Haiku did at one time have some support for touch screens.
Going off of ticket #7481 that was a work-in-progress patch that was never yet committed, so that's not really the case.
I believe we lost the support sometime last summer when mmlr rewrote Haiku's USB HID software. Perhaps he just left off some drivers, or didn't have time to modify them.
The whole point of proper HID support is precisely that you don't need specialized drivers for everything, the HID spec provides detailed enough descriptors to be able to handle any kind of input device. However, quite a few vendors are idiots and flag their devices as type 0xff (vendor-specific), which results in you having no choice but to use their drivers because it can't be determined that they are in fact HID devices. Furthermore, it's not even clear that it's a USB device at all in this particular case, at least their web page doesn't clarify that. As such, it's not out of the realm of possibility for it to be exporting itself on the PS/2 bus. The output of listusb -v on the system in question would be required to determine that.
by , 13 years ago
Attachment: | ep121-eGalax_HID.txt added |
---|
comment:3 by , 13 years ago
Well, I am certainly no expert in USB drivers. But I see no evidence that the device has type 0xff as you suggest. I ran the listusb -v as you suggested - and it definitely seems to be a HID device. Am attaching relevant portion of the output. But enough of this - I am not trying to hijack the ticket, just trying to offer some additional input.
comment:4 by , 13 years ago
You should find a file /tmp/usb_hid_report_descriptor_*.bin for your device. Please attach it plus a syslog.
comment:5 by , 13 years ago
I will provide listusb , listdev , syslog and usb_hid_report... once I get home in 2 hours.
comment:6 by , 13 years ago
Keywords: | Acer W500 added |
---|
comment:7 by , 13 years ago
Blocking: | 8370 added |
---|
comment:8 by , 13 years ago
I am sure that touchscreen is USB HID. After some hack I force Haiku HID driver to send absolute coordinates from touchscreen, but without any pressure detection. After some research I found that device had many reports and it sends coordinates in report 4. Haiku input system detect only first report and ignore others. I hardcoded report 4.
I think I can fix this problem if I do some more research. Also this touchscreen can handle up to 4 contacts in one time and Haiku must support it. What message need to be send for second, third and forth contact? I think there are some changes in input_server, app_server and interface kit needed.
I think it's need to add contact number to mouse messages and send this messages to views with B_MULTITOUCH_AWARE flag.
Also there are some mechanism for right mouse button emulation needed. In windows it just long time pressure with special indicator. I think that it can be implemented as filter.
comment:10 by , 13 years ago
To find out reports sent by your device, the USB HID driver analyzes the report descriptors. Thus, to add support for this device, you should make sure you understand what reports are provided by your device to be able to modify correctly the USB HID driver. And you're right it's probably mandatory to add support for these multitouch digitizers downstream.
See also http://www.usb.org/developers/hidpage/HUTRR34.zip to see if that fits your device.
comment:11 by , 13 years ago
Part of syslog:
KERN: usb_hid: adding protocol handlers KERN: usb_hid: root collection holds 5 application collections KERN: usb_hid: collection usage page 13 usage id 4 KERN: usb_hid: collection not a supported keyboard subset KERN: usb_hid: mouse device with 0 buttons and no wheel KERN: usb_hid: report id: 4 KERN: usb_hid: collection not a joystick or gamepad KERN: usb_hid: collection usage page 1 usage id 1 KERN: usb_hid: collection not a supported keyboard subset KERN: usb_hid: mouse device with 2 buttons and no wheel KERN: usb_hid: report id: 1 KERN: usb_hid: collection not a joystick or gamepad KERN: usb_hid: collection usage page 65280 usage id 1 KERN: usb_hid: collection not a supported keyboard subset KERN: usb_hid: collection not a mouse/tablet/digitizer KERN: usb_hid: collection not a joystick or gamepad KERN: usb_hid: collection usage page 13 usage id 4 KERN: usb_hid: collection not a supported keyboard subset KERN: usb_hid: mouse device with 0 buttons and no wheel KERN: usb_hid: report id: 2 KERN: usb_hid: collection not a joystick or gamepad KERN: usb_hid: collection usage page 13 usage id 14 KERN: usb_hid: collection not a supported keyboard subset KERN: usb_hid: collection not a mouse/tablet/digitizer KERN: usb_hid: collection not a joystick or gamepad KERN: usb_hid: added 3 handlers for hid device KERN: usb_hid: init_driver() OK KERN: usb_hid: publish_devices() KERN: usb_hid: publishing input/tablet/usb0 KERN: usb_hid: publishing input/tablet/usb1 KERN: usb_hid: publishing input/tablet/usb2
Why 3 mouses? Mayble device presents legacy mouse support. One mouse has 2 buttons...
Report 4 holds absolute coordinates. Report 1 doesn't.
input_server tablet device take only one report and cursor don't move if reports other than 4 are disabled.
Also as I see multitouch work. If I contact with 4 fingers and move Haiku cursor flashing in 4 places. Also I see high CPU load and cursor slow down.
Now it's need to detect where touch pressure and contact number holds.
comment:12 by , 13 years ago
I was stupid. HIDReport has PrintToStream() method... It says that:
KERN: usb_hid: HIDReport 0x82699c80 KERN: usb_hid: type: 1 input KERN: usb_hid: report id: 4 KERN: usb_hid: report size: 40 bits = 5 bytes KERN: usb_hid: item count: 6 KERN: usb_hid: HIDReportItem 0x80833440 KERN: usb_hid: byte offset: 0 KERN: usb_hid: shift: 0 KERN: usb_hid: mask: 0x00000001 KERN: usb_hid: has data: yes KERN: usb_hid: array: no KERN: usb_hid: relative: no KERN: usb_hid: minimum: 0 KERN: usb_hid: maximum: 1 KERN: usb_hid: usage minimum: 0x000d0042 KERN: usb_hid: usage maximum: 0x000d0042 KERN: usb_hid: HIDReportItem 0x808333e0 KERN: usb_hid: byte offset: 0 KERN: usb_hid: shift: 1 KERN: usb_hid: mask: 0x00000001 KERN: usb_hid: has data: yes KERN: usb_hid: array: no KERN: usb_hid: relative: no KERN: usb_hid: minimum: 0 KERN: usb_hid: maximum: 1 KERN: usb_hid: usage minimum: 0x000d0032 KERN: usb_hid: usage maximum: 0x000d0032 KERN: usb_hid: HIDReportItem 0x80833c20 KERN: usb_hid: byte offset: 0 KERN: usb_hid: shift: 2 KERN: usb_hid: mask: 0x0000001f KERN: usb_hid: has data: yes KERN: usb_hid: array: no KERN: usb_hid: relative: no KERN: usb_hid: minimum: 0 KERN: usb_hid: maximum: 16 KERN: usb_hid: usage minimum: 0x000d0051 KERN: usb_hid: usage maximum: 0x000d0051 KERN: usb_hid: HIDReportItem 0x80833b60 KERN: usb_hid: byte offset: 0 KERN: usb_hid: shift: 7 KERN: usb_hid: mask: 0x00000001 KERN: usb_hid: has data: yes KERN: usb_hid: array: no KERN: usb_hid: relative: no KERN: usb_hid: minimum: 0 KERN: usb_hid: maximum: 1 KERN: usb_hid: usage minimum: 0x000d0047 KERN: usb_hid: usage maximum: 0x000d0047 KERN: usb_hid: HIDReportItem 0x80833500 KERN: usb_hid: byte offset: 1 KERN: usb_hid: shift: 0 KERN: usb_hid: mask: 0x0000ffff KERN: usb_hid: has data: yes KERN: usb_hid: array: no KERN: usb_hid: relative: no KERN: usb_hid: minimum: 0 KERN: usb_hid: maximum: 32767 KERN: usb_hid: usage minimum: 0x00010030 KERN: usb_hid: usage maximum: 0x00010030 KERN: usb_hid: HIDReportItem 0x80833290 KERN: usb_hid: byte offset: 3 KERN: usb_hid: shift: 0 KERN: usb_hid: mask: 0x0000ffff KERN: usb_hid: has data: yes KERN: usb_hid: array: no KERN: usb_hid: relative: no KERN: usb_hid: minimum: 0 KERN: usb_hid: maximum: 32767 KERN: usb_hid: usage minimum: 0x00010031 KERN: usb_hid: usage maximum: 0x00010031
Encoded types:
B_HID_UID_DIG_TIP_SWITCH B_HID_UID_DIG_IN_RANGE B_HID_UID_DIG_CONTACT_IDENTIFIER Unknown(Digitizers::Code(0x0047)) B_HID_UID_GD_X B_HID_UID_GD_Y
I use B_HID_UID_DIG_TIP_SWITCH as primary mouse button and get something working.
I can't find what means digitizer code 0x47. Hut1_12v2.pdf says that: 47-FFFF - Reserved. HUTRR34.pdf don't says anything about code 0x47.
Finally I got crash from atheroswifi driver(Haiku always try to connect to unknown open WiFi and often fails). Device haven't keyboard and I can't type anything in KDL. I will fill another ticket.
comment:13 by , 13 years ago
Have a look at http://msdn.microsoft.com/en-us/library/windows/hardware/ff553734%28v=vs.85%29.aspx or http://lxr.free-electrons.com/source/drivers/hid/hid-debug.c#L152
0x47 seems to be a new usage for "Confidence"
comment:14 by , 13 years ago
I have no time for developing driver now. For now I use Windows 8 Developer Preview on this machine.
It would be nice to have touch support in Haiku. Now there are a lot of devices with touchscreen controlled interface(but many of this have ARM CPU).
comment:15 by , 12 years ago
Finally I got touchscreen working on Haiku! It is working, but with report id 4 hack and multitouch isn't handled correctly.
As I read from Microsoft documentation HID device can had many reports. Haiku HID driver create device for every report id. Is this correct? Also tablet input_server device can't handle more than 1 device correctly.
I changed mouse generation logic in tablet add on: now B_MOUSE_MOVED message generated before B_MOUSE_DOWN / B_MOUSE_UP. Without it most applications didn't handle mouse messages correctly. Some issues with event handling still exists in menus.
I don't think that patch is useful because it is hardcoded to Acer W500. HID report handling should be changed to remove hack.
comment:16 by , 12 years ago
Keywords: | touchscreen added |
---|
by , 12 years ago
Attachment: | touchscreen.diff added |
---|
My hacks on driver. It enables touchscreen and tries to introduce multitouch. WARNING! This is experimental modifications and not a patch for fixing this ticket.
comment:19 by , 12 years ago
Blocking: | 9545 added |
---|
comment:20 by , 10 years ago
I found and fixed real ussue that pervents touchscreen working. tablet input_server add-on incorrectly generates device name causing name collision and only first tablet are registered. I don't know why, but USB HID tablet driver found 3 tablet devices (/dev/input/tablet/usb0, usb1, usb2) but first one don't produce any input.
by , 10 years ago
Attachment: | 0001-Fix-input_server-tablet-add-on-name-generation.-Mult.patch added |
---|
patch
comment:21 by , 10 years ago
patch: | 0 → 1 |
---|
comment:22 by , 10 years ago
patch: | 1 → 0 |
---|
Haiku did at one time have some support for touch screens. Have a look at ticket #7481. I did in fact get it working. I believe we lost the support sometime last summer when mmlr rewrote Haiku's USB HID software. Perhaps he just left off some drivers, or didn't have time to modify them.