208 |
|
'''Note:''' Because my A101 G9 has a Touchplus TR16C0, I can only provide information for devices using the tr16c0-i2c driver. However, both of them support the following events: ''EV_SYN, EV_KEY, ABS_MT_SLOT, ABS_MT_POSITION_X, ABS_MT_POSITION_Y'' and ''ABS_MT_TRACKING_ID''. Additionally, pixcir based devices provide the events ''ABS_MT_TOUCH_MAJOR'' and ''ABS_MT_WIDTH_MAJOR'' (and possibly also ''ABS_MT_TOUCH_MINOR''). This information was extracted from the tr16c0/pixcir kernel code. |
209 |
|
|
210 |
|
=== Getting the touchscreen to work: Kernel driver === |
|
208 |
'''Note:''' Because my A101 G9 has a Touchplus TR16C0, I can only provide information for devices using the tr16c0-i2c driver. However, both of them support the following events: ''EV_SYN, EV_KEY, ABS_MT_SLOT, ABS_MT_POSITION_X, ABS_MT_POSITION_Y'' and ''ABS_MT_TRACKING_ID''. I could provide an additional ABS_X/Y for the pixcir touchscreen like I provided for tr16c0, but I can't test it. |
|
209 |
|
|
210 |
=== Getting the touchscreen to work: Kernel driver (TR16C0) === |
|
211 |
|
|
212 |
==== Basic setup ==== |
258 |
|
Now there is just one issue left to address: Depending on whether you plugged in some other USB devices (e.g. a USB keyboard, or a USB hub with some other input devices) that also create event interfaces, your device might not be called ''/dev/input/event6'' all the time, though you might have some scripts that rely on it). You might want to create a symlink (in case of a static /dev, or via init-scripts) or let udev create a symlink (in case of a devtmpfs with udev). Usually, modern linux distributions use udev, so you just have to create a new file in ''/etc/udev/rules.d/'', containing something like this: |
|
260 |
==== Optional: Patch the driver for xf86-input-evdev compatibility ==== |
|
261 |
|
|
262 |
Because the ''tr16c0-i2c'' driver does not report any (single-touch) ABS_X/Y events to the system, but only (multi-touch) ABS_MT_* events, it is necessary to patch the kernel driver for the [http://cgit.freedesktop.org/xorg/driver/xf86-input-evdev/ xf86-input-evdev] xorg driver to work, as it expects ABS_X/Y events for backwards compatibility reasons (older single-touch screens). Also, though that does not apply to the tr16c0 driver because it just populates all processed touch signals as finger touch events, ABS_X/Y is used for pen inputs, while the multitouch resources are used for finger touch input (TODO?) |
|
263 |
|
|
264 |
The following [http://4s0.de/~compi/archos-dev/patches/tr16c0-generate-abs-events.patch patch] addresses this issue. |
|
265 |
|
|
266 |
==== Optional: Setting up a symlink to the input device via udev ==== |
|
267 |
|
|
268 |
Depending on whether you plugged in some other USB devices (e.g. a USB keyboard, or a USB hub with some other input devices) that also create event interfaces, your device might not be called ''/dev/input/event6'' all the time, though you might have some scripts that rely on it). You might want to create a symlink (in case of a static /dev, or via init-scripts) or let udev create a symlink (in case of a devtmpfs with udev). Usually, modern linux distributions use udev, so you just have to create a new file in ''/etc/udev/rules.d/'', containing something like this: |
275 |
|
''xf86-input-evdev'' will crash for both touchscreens, because none of them export ''ABS_X/Y'' events, but evdev assumes that there is a normal axis for every multitouch axis. This is not the case for Pixcir and TR16C0 touchscreens, as they only export ''ABS_MT_*'' axes, no ''ABS_*'' axes. Therefore it will crash at the moment you touch the sreen after starting X. |
|
285 |
==== xf86-input-evdev ==== |
|
286 |
|
|
287 |
'''Note:''' ''xf86-input-evdev'' will not work unless you patch your kernel driver. |
|
288 |
|
|
289 |
xf86-input-evdev is one of the default Xorg input drivers. The main advantage is that most utilities work together with it, like touchegg (and therefore kde multitouch gestures, which is just a fork of touchegg), because ist just reports the plain events to the userland. |
|
290 |
|
|
291 |
Put the following code into a file in ''/etc/X11/xorg.conf.d/'': |
|
292 |
|
|
293 |
{{{ |
|
294 |
Section "InputClass" |
|
295 |
Identifier "Archos Touchscreen" |
|
296 |
MatchProduct "tr16c0_i2c_tsp" |
|
297 |
Option "Ignore" "off" |
|
298 |
Option "CorePointer" "on" |
|
299 |
Driver "evdev" |
|
300 |
EndSection |
|
301 |
}}} |
|
302 |
|
|
303 |
It should work right out of the box. Enjoy! |
|
304 |
|
|
305 |
==== xf86-input-mtev ==== |
299 |
|
'''Note:''' Depending on your choice and the problems you drive into, you might want change the driver line. |
300 |
|
|
301 |
|
If everything is done right, the relevant part in your ''/var/log/Xorg.0.log'' should look similar to this: |
302 |
|
|
303 |
|
{{{ |
304 |
|
[ 4938.429] (II) config/udev: Adding input device tr16c0_i2c_tsp (/dev/input/event6) |
305 |
|
[ 4938.429] (**) tr16c0_i2c_tsp: Applying InputClass "Archos Touchscreen" |
306 |
|
[ 4938.429] (II) LoadModule: "mtev" |
307 |
|
[ 4938.430] (II) Loading /usr/lib/xorg/modules/input/mtev_drv.so |
308 |
|
[ 4938.430] (II) Module mtev: vendor="Nokia" |
309 |
|
[ 4938.430] compiled for 1.12.3, module version = 0.1.12 |
310 |
|
[ 4938.430] Module class: X.Org XInput Driver |
311 |
|
[ 4938.430] ABI class: X.Org XInput driver, version 16.0 |
312 |
|
[ 4938.430] (II) Using input driver 'mtev' for 'tr16c0_i2c_tsp' |
313 |
|
[ 4938.430] (**) Option "CorePointer" "on" |
314 |
|
[ 4938.430] (**) tr16c0_i2c_tsp: always reports core events |
315 |
|
[ 4938.430] (**) tr16c0_i2c_tsp: always reports core events |
316 |
|
[ 4938.430] (**) Option "config_info" "udev:/sys/devices/virtual/input/input9/event6" |
317 |
|
[ 4938.431] (II) XINPUT: Adding extended input device "tr16c0_i2c_tsp" (type: TOUCHSCREEN, id 8) |
318 |
|
[ 4938.431] (II) device control: init |
319 |
|
[ 4938.431] (**) Option "Device" "/dev/input/event6" |
320 |
|
[ 4938.431] (II) mtev: caps: mtdata tracking_id position_x position_y |
321 |
|
[ 4938.431] (II) mtev: tracking_id: 0 65535 |
322 |
|
[ 4938.431] (II) mtev: position_x: 0 1280 |
323 |
|
[ 4938.431] (II) mtev: position_y: 0 800 |
324 |
|
[ 4938.657] (II) pointer_control |
325 |
|
[ 4938.657] (**) tr16c0_i2c_tsp: (accel) keeping acceleration scheme 1 |
326 |
|
[ 4938.657] (II) pointer_property |
327 |
|
[ 4938.658] (II) pointer_property |
328 |
|
[ 4938.658] (**) tr16c0_i2c_tsp: (accel) acceleration profile 0 |
329 |
|
[ 4938.658] (II) pointer_property |
330 |
|
[ 4938.658] (II) pointer_property |
331 |
|
[ 4938.658] (**) tr16c0_i2c_tsp: (accel) acceleration factor: 2.000 |
332 |
|
[ 4938.658] (**) tr16c0_i2c_tsp: (accel) acceleration threshold: 4 |
333 |
|
[ 4938.658] (II) device control: on |
334 |
|
}}} |
|
325 |
==== Testing your input driver ==== |