TS.CONF(5)

πŸ“¦
version 1.24 Β· 2 versions
, in alpine 3.24, arch rolling, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

πŸ’… 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 using ts_setup(): we try to open /dev/input/ts, /dev/input/touchscreen and /dev/touchscreen/ucb1x00, and on Linux we then scan /dev/input/event* for the first device with property INPUT_PROP_DIRECT. πŸ”
  • TSLIB_CONSOLEDEVICE β€” the tslib default console device. Default: /dev/tty
  • TSLIB_CALIBFILE β€” stores the calibration data you obtained using ts_calibrate. 🎯 Default: /etc/pointercal
  • TSLIB_CONFFILE β€” set a different location for the ts.conf configuration 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 with ts_calibrate (-r option).
  • xyswap β€” interchange the X and Y co-ordinates β€” no longer used or needed if the new linear calibration utility ts_calibrate is 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 between 0 and 1. 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