Changes between Version 2 and Version 3 of Gen9A101TurboICSLinuxNotes

Timestamp:
09/14/13 16:31:44 (3 years ago)
Author:
comphuter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Gen9A101TurboICSLinuxNotes

    v2 v3  
    206 206 The A101 G9 Turbo was shipped with two different touchscreens. The kernel module ''pixcir_i2c_tsp'' or ''tr16c0-i2c'' is needed, respectively, for the system to recognize the specific touchscreen. 
    207 207  
    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 ==== 
    211 213  
    212 214 In case of a Touchplus TR16C0, you should find messages similar to this one in your ''dmesg'' output after loading the ''tr16c0-i2c'' module: 
    213 215  
    214   '''Note:''' There might also be some messages like ''tr16c0_i2c_tsp 4-005c: ping ?'' and ''tr16c0_i2c_tsp 4-005c: could not talk to tsp.)''. It is safe to ignore them as long as these last lines indicate that it detected an input-device. 
      216 '''Note:''' There might also be some messages like ''tr16c0_i2c_tsp 4-005c: ping ?'' and ''tr16c0_i2c_tsp 4-005c: could not talk to tsp.)''. It is safe to ignore them as long as these last lines indicate that ed an input-device. 
    215 217 {{{ 
    216 218 tr16c0_i2c_tsp 4-005c: trying v2 fw 
     
    256 258 }}} 
    257 259  
    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: 
    259 269  
    260 270 {{{ 
     
    262 272 }}} 
    263 273  
    264   This udev rule creates a symlink pointing from ''/dev/input/touchscreen'' to the respective ''eventX'' device. 
      274 This udev rule creates a symlink pointing from ''/dev/input/touchscreen'' to the respective ''eventX'' device. 
    265 275  
    266 276 You are now ready to use it with Xorg. 
     
    269 279  
    270 280 There are different input drivers available (these are just the one I tried): 
    271    * [http://cgit.freedesktop.org/xorg/driver/xf86-input-evdev/ xf86-input-evdev]: The well-known event device input driver usually found on every base system with Xorg. 
      281  * [http://cgit.freedesktop.org/xorg/driver/xf86-input-evdev/ xf86-input-evdev]: The well-known event device input driver usually found on every base system with Xorg. 
    272 282  * [http://gitorious.org/xf86-input-mtev/ xf86-input-mtev]: A multitouch event driver developed by MeeGo. It uses [http://bitmath.org/code/mtdev/ mtdev] for processing multitouch events. 
    273 283  * [http://bitmath.org/code/multitouch/ xf86-input-multitouch]: A multitouch touchpad driver. 
    274 284  
    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 ==== 
    276 306  
    277 307 ''xf86-input-mtev'' should work for TR16C0, by using the [https://build.pub.meego.com/package/show?package=xorg-x11-drv-mtev&project=Project%3AKDE%3AMer_Extras patches of the MeeGo community]. If these don't work there is also another [http://oe-lite.org/redmine/projects/xorg/repository/revisions/master/show/recipes/xorg-driver/xf86-input-mtev patchset on OE-lite]. 
    278 308  
      309  
      310  
    279 311 '''Note:''' The latter one worked in my case. Also, I still have to test whether xf86-input-mtev is aware of multitouch gestures.  
    280    
    281   ''xf86-input-multitouch'' usually out of the box without problems, though it is a '''touchpad''' driver and therefore your touchscreen will only be usable like a trackpad/touchpad (i.e. a relative pointer device). This should usually be your last choice, if no other driver works. 
    282    
    283   '''Note:''' xf86-input-multitouch supports multitouch gestures really well. In any case you might have interest to take a look into it. 
    284 312  
    285 313 Now, here is an example xorg-config snippet usable by xorg.conf.d-automagic configuration: 
     
    292 320     Option "CorePointer" "on" 
    293 321     Driver "mtev" 
    294       #Driver "evdev" 
    295       #Driver "multitouch" 
    296 322 EndSection 
    297 323 }}} 
    298 324  
    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 ==== 
    335 326  
    336 327 Now you can test your display by running ''xinput'' in a terminal. First you call ''xinput list'' to list all the available input devices, then you test it: 
     
    353 344 }}} 
    354 345  
    355   '''Note:''' Depending on the input driver, testing the device will spit out completely different lines. This test output was generated by simply touching the screen on one freely selected point, releasing it directly after (i.e. a finger-click). 
    356    
    357 346 Now you're done, your touchscreen is set up! 
    358 347