1TS.CONF(5) tslib TS.CONF(5)
2
3
4
6 ts.conf - Configuration file for tslib, controlling touch screens for
7 embedded devices.
8
10 The idea of tslib is to have a core library that provides standard ser‐
11 vices, and a set of plugins to manage the conversion and filtering as
12 needed.
13
14 The plugins for a particular touchscreen are loaded automatically by
15 the library under the control of a static configuration file,
16 /etc/ts.conf. /etc/ts.conf gives the library basic configuration
17 information. Each line specifies one module, and the parameters for
18 that module. The modules are loaded in order, with the first one pro‐
19 cessing the touchscreen data first. For example:
20
21 module_raw input
22 module variance delta=30
23 module dejitter delta=100
24 module linear
25
26
28 Latest versions of the Xorg tslib input driver use hal to configure the
29 touchscreen within Xorg. Environment variables are only needed for the
30 tslib commands.
31
32 TSLIB_TSDEVICE
33 If the default touchscreen device cannot be found, set the
34 TSLIB_TSDEVICE environment variable to the touchscreen device to
35 use.
36
37 Default when using ts_setup(): We try to open /dev/input/ts,
38 /dev/input/touchscreen and /dev/touchscreen/ucb1x00 and on Linux,
39 we then scan /dev/input/event* for the first device with property
40 INPUT_PROP_DIRECT.
41
42 TSLIB_CONSOLEDEVICE
43 Tslib default console device.
44
45 Default: /dev/tty
46
47 TSLIB_CALIBFILE
48 Stores calibration data obtained using ts_calibrate.
49
50 Default: /etc/pointercal
51
52 TSLIB_CONFFILE
53 Set a different location for the ts.conf configuration file itself.
54
55 Default; /etc/ts.conf.
56
57 TSLIB_FBDEVICE
58 Framebuffer device to use for the touchscreen support.
59
60 Default: /dev/fb0.
61
62 TSLIB_PLUGINDIR
63 Plugin directory for tslib.
64
65 Default: /usr/lib/$triplet/ts0/ where triplet is the MultiArch
66 path, e.g. arm-linux-gnueabi.
67
69 dejitter
70 Removes jitter on the X and Y co-ordinates. This is achieved by
71 applying a weighted smoothing filter. The latest samples have most
72 weight; earlier samples have less weight. This allows one to
73 achieve 1:1 input->output rate.
74
75 · delta
76
77 Squared distance between two samples ((X2-X1)^2 + (Y2-Y1)^2)
78 that defines the quick motion threshold. If the pen moves
79 quick, it is not feasible to smooth pen motion, besides quick
80 motion is not precise anyway; so if quick motion is detected
81 the module just discards the backlog and simply copies input to
82 output.
83
84 linear
85 Linear scaling module, primarily used for conversion of touch
86 screen co-ordinates to screen co-ordinates.
87
88 · xyswap
89
90 Interchange the X and Y co-ordinates -- no longer used or
91 needed if the new linear calibration utility ts_calibrate is
92 used.
93
94 · pressure_offset
95
96 Offset applied to the pressure value. Default: 0.
97
98 · pressure_mul
99
100 Factor to multiply the pressure value with. Default: 1.
101
102 · pressure_div
103
104 Value to divide the pressure value by. Default: 1.
105
106
107 iir
108 Infinite impulse response filter. Similar to dejitter, this is a
109 smoothing filter to remove low-level noise. There is a trade-off
110 between noise removal (smoothing) and responsiveness. The parame‐
111 ters N and D specify the level of smoothing in the form of a frac‐
112 tion (N/D).
113
114 · N
115
116 numerator of the smoothing fraction. Default: 0.
117
118 · D
119
120 denominator of the smoothing fraction. Default: 1.
121
122 pthres
123 Pressure threshold filter. Given a release is always pressure 0 and
124 a press is always >= 1, this discards samples below / above the
125 specified pressure threshold.
126
127 · pmin
128
129 Minimum pressure value for a sample to be valid. Default: 1.
130
131 · pmax
132
133 Maximum pressure value for a sample to be valid. Default:
134 INT_MAX.
135
136
137 debounce
138 Simple debounce mechanism that drops input events for the specified
139 time after a touch gesture stopped.
140
141 · drop_threshold
142
143 drop events up to this number of milliseconds after the last
144 release event. Default: 0.
145
146
147 skip
148 Skip nhead samples after press and ntail samples before release.
149 This should help if for the device the first or last samples are
150 unreliable.
151
152 · nhead
153
154 Number of events to drop after pressure. Default: 1.
155
156 · ntail
157
158 Number of events to drop before release. Default: 1.
159
160
161 median
162 Similar to what the variance filter does, the median filter sup‐
163 presses spikes in the gesture.
164
165 · depth
166
167 Number of samples to apply the median filter to. Default: 3.
168
169
170 invert
171 Invert values in X and/or Y direction around a given value.
172
173 · x0
174
175 X-axis (horizontal) value around which to invert. Default: 0.
176
177 · y0
178
179 Y-axis (horizontal) value around which to invert. Default: 0.
180
181
182 lowpass
183 simple exponential averaging lowpass filter
184
185 · factor
186
187 floating point values betwenn 0 and 1. Default: 0.4.
188
189 · threshold
190
191 x or y minimum distance between two samples to start applying
192 the filter. Default: 2.
193
194
195 variance
196 Tries to do it's best in order to filter out random noise coming
197 from touchscreen ADCs. This is achieved by limiting the sample
198 movement speed to some value (e.g. the pen is not supposed to move
199 quicker than some threshold).
200
201 This is a greedy filter, e.g. it gives less samples on output than
202 receives on input. There is no multitouch support for this filter.
203
204 · delta
205
206 Set the squared distance in touchscreen units between previous
207 and current pen position (e.g. (X2-X1)^2 + (Y2-Y1)^2). This
208 defines the criteria for determining whenever two samples are
209 near or far to each other.
210
211 If the distance between previous and current sample is far, the
212 sample is marked as potential noise. This doesn't mean yet that
213 it will be discarded; if the next reading will be close to it,
214 this will be considered just a regular quick motion event, and
215 it will sneak to the next layer. Also, if the sample after the
216 potential noise is far from both previously discussed samples,
217 this is also considered a quick motion event and the sample
218 sneaks into the output stream.
219
220 hardware support
221
222 On Linux, use the module_raw input if you can. The other raw access
223 modules are device specific userspace drivers. If you need one of
224 those, enable it explicitly when building tslib. The list of modules
225 enabled by default might shrink in the future. module_raw input sup‐
226 ports multitouch (MT) too.
227
228
229 ┌──────────────────┬───────────────────────────────────┬──────────────────────────┬─────────────────────────┬─────┬────────────────────────────┐
230 │module_raw │ supported devices │ interface │ platforms │ MT │ how to enable │
231 ├──────────────────┼───────────────────────────────────┼──────────────────────────┼─────────────────────────┼─────┼────────────────────────────┤
232 │input │ all with Linux evdev drivers │ any (driver) /dev/input/ │ Linux, FreeBSD │ yes │ enabled by default │
233 ├──────────────────┼───────────────────────────────────┼──────────────────────────┼─────────────────────────┼─────┼────────────────────────────┤
234 │arctic2 │ IBM Arctic II │ . │ Linux, BSD, Hurd, Haiku │ no │ --enable-arctic2 │
235 ├──────────────────┼───────────────────────────────────┼──────────────────────────┼─────────────────────────┼─────┼────────────────────────────┤
236 │collie │ Sharp Zaurus SL-5000d/SL-5500 │ . │ Linux, BSD, Hurd, Haiku │ no │ --enable-collie │
237 ├──────────────────┼───────────────────────────────────┼──────────────────────────┼─────────────────────────┼─────┼────────────────────────────┤
238 │corgi │ Sharp Zaurus SL-C700 │ . │ Linux, BSD, Hurd, Haiku │ no │ --enable-corgi │
239 ├──────────────────┼───────────────────────────────────┼──────────────────────────┼─────────────────────────┼─────┼────────────────────────────┤
240 │dmc_dus3000 │ DMC DUS Series (DUS3000, ...) │ UART │ Linux │ no │ --enable-dmc_dus3000 │
241 ├──────────────────┼───────────────────────────────────┼──────────────────────────┼─────────────────────────┼─────┼────────────────────────────┤
242 │dmc │ DMC (others) │ . │ Linux, BSD, Hurd, Haiku │ no │ --enable-dmc │
243 ├──────────────────┼───────────────────────────────────┼──────────────────────────┼─────────────────────────┼─────┼────────────────────────────┤
244 │galax │ eGalax 100, 112, 210 │ any (driver) │ Linux, BSD │ no │ --enable-galax │
245 ├──────────────────┼───────────────────────────────────┼──────────────────────────┼─────────────────────────┼─────┼────────────────────────────┤
246 │h3600 │ Compaq IPAQ │ . │ Linux, BSD, Hurd, Haiku │ no │ --enable-h3600 │
247 ├──────────────────┼───────────────────────────────────┼──────────────────────────┼─────────────────────────┼─────┼────────────────────────────┤
248 │mk712 │ Hitachi Webpad │ . │ Linux, BSD, Hurd, Haiku │ no │ --enable-mk712 │
249 ├──────────────────┼───────────────────────────────────┼──────────────────────────┼─────────────────────────┼─────┼────────────────────────────┤
250 │tatung │ Tatung Webpad │ . │ Linux, BSD, Hurd, Haiku │ no │ --enable-tatung │
251 ├──────────────────┼───────────────────────────────────┼──────────────────────────┼─────────────────────────┼─────┼────────────────────────────┤
252 │touchkit │ Touchkit SAT4000UR │ RS232 │ Linux, BSD, Hurd │ no │ enabled by default │
253 ├──────────────────┼───────────────────────────────────┼──────────────────────────┼─────────────────────────┼─────┼────────────────────────────┤
254 │ucb1x00 │ UCB1x00 Touchscreens │ . │ Linux, BSD, Hurd, Haiku │ no │ --enable-ucb1x00 │
255 ├──────────────────┼───────────────────────────────────┼──────────────────────────┼─────────────────────────┼─────┼────────────────────────────┤
256 │waveshare │ Waveshare Touchscreens │ /dev/hidrawX │ Linux │ no │ enabled by default │
257 ├──────────────────┼───────────────────────────────────┼──────────────────────────┼─────────────────────────┼─────┼────────────────────────────┤
258 │cy8mrln_palm‐ │ in Palm Pre/Pre Plus/Pre 2 │ . │ Linux │ no │ --enable-cy8mrln-palmpre │
259 │pre │ │ │ │ │ │
260 ├──────────────────┼───────────────────────────────────┼──────────────────────────┼─────────────────────────┼─────┼────────────────────────────┤
261 │one_wire_ts_input │ FriendlyARM one-wire touch screen │ . │ Linux │ no │ --enable-one-wire-ts-input │
262 └──────────────────┴───────────────────────────────────┴──────────────────────────┴─────────────────────────┴─────┴────────────────────────────┘
264 ts_calibrate(1), ts_test(1), ts_test_mt(1)
265
266
267
268 TS.CONF(5)