TS.CONF(5)
π ts.conf π
TS.CONF(5) β straight out of the tslib manual, section 5, and bestie it's literally the file that makes your touchscreen behave. β¨
β¨ NAME β¨
ts.conf β the configuration file for tslib, the library that controls touch screens on embedded devices. π«Ά
πΈ DESCRIPTION πΈ
okay so the whole idea of tslib is: there's a core library that provides the standard services, and then a bunch of plugins that handle the conversion and filtering however you need it. that's the vibe. π¦
The plugins for a particular touchscreen get loaded automatically by the library, and the library does that under the control of one static configuration file: /etc/ts.conf. That file is what gives the library its basic configuration info. π
Each line specifies one module, plus the parameters for that module. The modules are loaded in order, and the first one processes the touchscreen data first. so order = priority, no cap. π₯
for example:
module_raw input
module variance delta=30
module dejitter delta=100
module linear
π ENVIRONMENT VARIABLES π
Latest versions of the Xorg tslib input driver use hal to configure the touchscreen within Xorg. Which means: env vars are only needed for the tslib commands. the rest of the time? not it. π
TSLIB_TSDEVICEβ if the default touchscreen device can't be found, set this environment variable to the touchscreen device you actually want to use. Default when usingts_setup(): we try to open/dev/input/ts,/dev/input/touchscreenand/dev/touchscreen/ucb1x00, and on Linux we then scan/dev/input/event*for the first device with propertyINPUT_PROP_DIRECT. πTSLIB_CONSOLEDEVICEβ the tslib default console device. Default:/dev/ttyTSLIB_CALIBFILEβ stores the calibration data you obtained usingts_calibrate. π― Default:/etc/pointercalTSLIB_CONFFILEβ set a different location for thets.confconfiguration file itself. Default:/etc/ts.conf.TSLIB_FBDEVICEβ framebuffer device to use for the touchscreen support. Default:/dev/fb0.TSLIB_PLUGINDIRβ plugin directory for tslib. Default:/usr/lib/$triplet/ts0/where triplet is the MultiArch path, e.g.arm-linux-gnueabi.
π MODULE PARAMETERS π
π§ dejitter
Removes jitter on the X and Y co-ordinates. it does this by applying a weighted smoothing filter. The latest samples have the most weight; earlier samples have less weight. This lets you achieve a 1:1 input->output rate. iconic behaviour honestly. π
deltaβ the squared distance between two samples ((X2-X1)^2 + (Y2-Y1)^2) that defines the quick motion threshold. If the pen moves quick, it's not feasible to smooth pen motion β plus quick motion isn't precise anyway β so if quick motion is detected the module just discards the backlog and simply copies input to output. π
π¦ linear
Linear scaling module, primarily used for conversion of touch screen co-ordinates to screen co-ordinates. the glow-up from touch space to screen space β¨
rotβ rotation of touch coordinates.0=no,1=CW,2=UD,3=CCW. Default: the screen-rotation that was used withts_calibrate(-roption).xyswapβ interchange the X and Y co-ordinates β no longer used or needed if the new linear calibration utilityts_calibrateis used. πpressure_offsetβ offset applied to the pressure value. Default:0.pressure_mulβ factor to multiply the pressure value with. Default:1.pressure_divβ value to divide the pressure value by. Default:1.
πΈ iir
Infinite impulse response filter. Similar to dejitter, this is a smoothing filter to remove low-level noise. There's a trade-off between noise removal (smoothing) and responsiveness. The parameters N and D specify the level of smoothing in the form of a fraction (N/D). βοΈ
Nβ numerator of the smoothing fraction. Default:0.Dβ denominator of the smoothing fraction. Default:1.
π pthres
Pressure threshold filter. Given a release is always pressure 0 and a press is always >= 1, this discards samples below / above the specified pressure threshold. gatekeeping, but make it pressure. πͺ
pminβ minimum pressure value for a sample to be valid. Default:1.pmaxβ maximum pressure value for a sample to be valid. Default:INT_MAX.
π crop
Ignore touch points outside of the framebuffer. that's it, that's the whole module. simple. clean. π§Ό
π debounce
Simple debounce mechanism that drops input events for the specified time after a touch gesture stopped.
drop_thresholdβ drop events up to this number of milliseconds after the last release event. Default:0.
β skip
Skip nhead samples after press and ntail samples before release. This should help if for the device the first or last samples are unreliable. π
nheadβ number of events to drop after pressure. Default:1.ntailβ number of events to drop before release. Default:1.
π median
Similar to what the variance filter does, the median filter suppresses spikes in the gesture. ππ«
depthβ number of samples to apply the median filter to. Default:3.
π₯ invert
Invert values in X and/or Y direction around a given value.
x0β X-axis (horizontal) value around which to invert. Default:0.y0β Y-axis (horizontal) value around which to invert. Default:0.
π lowpass
simple exponential averaging lowpass filter
factorβ floating point values between0and1. Default:0.4.thresholdβ x or y minimum distance between two samples to start applying the filter. Default:2.
π evthres
Number of samples needed from the device after considered a valid touch. This filter will drop a tapping when too little samples are between "down" and "up".
Nβ minimum number of events needed between"down"and"up". Default:5.
π variance
Tries to do it's best in order to filter out random noise coming from touchscreen ADCs. This is achieved by limiting the sample movement speed to some value (e.g. the pen is not supposed to move quicker than some threshold). ποΈπ¨
This is a greedy filter, e.g. it gives less samples on output than it receives on input. There is no multitouch support for this filter. π
deltaβ set the squared distance in touchscreen units between previous and current pen position (e.g.(X2-X1)^2 + (Y2-Y1)^2). This defines the criteria for determining whenever two samples are near or far to each other.
If the distance between previous and current sample is far, the sample is marked as potential noise. This doesn't mean yet that it will be discarded; if the next reading will be close to it, this will be considered just a regular quick motion event, and it will sneak to the next layer. Also, if the sample after the potential noise is far from both previously discussed samples, this is also considered a quick motion event and the sample sneaks into the output stream. π΅οΈ
π οΈ hardware support π οΈ
On Linux, use the module_raw input if you can. The other raw access modules are device specific userspace drivers. If you need one of those, enable it explicitly when building tslib. The list of modules enabled by default might shrink in the future. module_raw input supports multitouch (MT) too. π±β¨
okay bestie, back to the tea β β here's the full list of module_raw drivers, with every single deet, no skips, no cap π
input- supported devices: all with Linux evdev drivers
- interface:
any (driver) /dev/input/ - platforms: Linux, FreeBSD
- MT: yes
- how to enable: enabled by default
arctic2- supported devices: IBM Arctic II
- interface:
. - platforms: Linux, BSD, Hurd, Haiku
- MT: no
- how to enable:
--enable-arctic2
collie- supported devices: Sharp Zaurus SL-5000d/SL-5500
- interface:
. - platforms: Linux, BSD, Hurd, Haiku
- MT: no
- how to enable:
--enable-collie
corgi- supported devices: Sharp Zaurus SL-C700
- interface:
. - platforms: Linux, BSD, Hurd, Haiku
- MT: no
- how to enable:
--enable-corgi
dmc_dus3000- supported devices: DMC DUS Series (DUS3000, ...)
- interface: UART
- platforms: Linux
- MT: no
- how to enable:
--enable-dmc_dus3000
dmc- supported devices: DMC (others)
- interface:
. - platforms: Linux, BSD, Hurd, Haiku
- MT: no
- how to enable:
--enable-dmc
galax- supported devices: eGalax 100, 112, 210
- interface: any (driver)
- platforms: Linux, BSD
- MT: no
- how to enable:
--enable-galax
h3600- supported devices: Compaq IPAQ
- interface:
. - platforms: Linux, BSD, Hurd, Haiku
- MT: no
- how to enable:
--enable-h3600
mk712- supported devices: Hitachi Webpad
- interface:
. - platforms: Linux, BSD, Hurd, Haiku
- MT: no
- how to enable:
--enable-mk712
tatung- supported devices: Tatung Webpad
- interface:
. - platforms: Linux, BSD, Hurd, Haiku
- MT: no
- how to enable:
--enable-tatung
touchkit- supported devices: Touchkit SAT4000UR
- interface: RS232
- platforms: Linux, BSD, Hurd
- MT: no
- how to enable: enabled by default
ucb1x00- supported devices: UCB1x00 Touchscreens
- interface:
. - platforms: Linux, BSD, Hurd, Haiku
- MT: no
- how to enable:
--enable-ucb1x00
waveshare- supported devices: Waveshare Touchscreens
- interface:
/dev/hidrawX - platforms: Linux
- MT: no
- how to enable: enabled by default
cy8mrln_palmpre- supported devices: in Palm Pre/Pre Plus/Pre 2
- interface:
. - platforms: Linux
- MT: no
- how to enable:
--enable-cy8mrln-palmpre
one_wire_ts_input- supported devices: FriendlyARM one-wire touch screen
- interface:
. - platforms: Linux
- MT: no
- how to enable:
--enable-one-wire-ts-input
input_evdev- supported devices: Linux evdev drivers (libevdev)
- interface:
. - platforms: Linux
- MT: yes
- how to enable:
--enable-input-evdev
π SEE ALSO π
and that's a wrap on TS.CONF(5), bestie! π the footer just says TS.CONF(5) β no version/date drama, just the pure vibes. slay β¨π
π¦ where this page comes from
- alpine 3.24: tslib-doc 1.24-r0 Β· LGPL-2.0-or-later
- arch rolling: tslib 1.24-1 Β· LGPL-2.1-only
- epel 10: tslib 1.23-2.el10_2 Β· LGPL-2.1-only
- fedora 43: tslib 1.23-2.fc43 Β· LGPL-2.1-only
- fedora 43: tslib 1.23-2.fc43 Β· LGPL-2.1-only
- fedora 44: tslib 1.24-2.fc44 Β· LGPL-2.1-only
- fedora 44: tslib 1.24-2.fc44 Β· LGPL-2.1-only
- nixos 26.05: tslib 1.24
- nixpkgs unstable: tslib 1.24
- Copyright (c) 2017, Martin Kepplinger <martink@posteo.de>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms