UATP(4)

πŸ“¦ version 11.0, in nixpkgs unstable

πŸŽ€ UATP(4): USB Apple trackpad driver πŸŽ€

okay so bestie, this is the UATP(4) page from the Kernel Interfaces Manual, with the manual name folded right in up top instead of doing that boring header-line copy situation. It’s the USB Apple trackpad driver tea, and it’s lowkey iconic. πŸ’…

πŸ’– NAME πŸ’–

uatp β€” USB Apple trackpad driver ✨

✨ SYNOPSIS ✨

uatp* at uhidev? reportid ?
wsmouse* at uatp? mux 0

🌸 DESCRIPTION 🌸

The uatp driver provides support for the USB trackpads found in Apple laptops since 2005, exposed through wsmouse(4). Some USB Apple trackpads are standard USB HID mice supported by ums(4), but uatp supports more features. πŸ¦‹

The following sysctl(8) variables control behavior of USB Apple trackpads β€” these knobs are literally the main character energy of this whole page:

  • hw.uatpN.two_finger_buttons β€” Bit mask of buttons to emulate when two fingers are on the trackpad while the button is pressed. 🫢
  • hw.uatpN.three_finger_buttons β€” Bit mask of buttons to emulate when three fingers are on the trackpad while the button is pressed. πŸ’–
  • hw.uatpN.multifinger_track β€” What to do when multiple fingers are moved on the trackpad. If set to 0, ignore the input. If set to 1, move as if a single finger were at the mean position of the fingers. If set to 2, scroll. Note that scrolling is currently broken. 😭
  • hw.uatpN.x_sensors β€” Number of sensor columns detecting the x positions of fingers on the trackpad. The driver should detect this based on the model of hardware, so you should not have to set this, and likewise for the x ratio and y sensors and ratio. 🧚
  • hw.uatpN.x_ratio β€” Ratio of the number of sensor columns in the trackpad to the number of distinct cursor x positions. ✨
  • hw.uatpN.y_sensors β€” Number of sensor rows detecting the y positions of fingers on the trackpad. 🌸
  • hw.uatpN.y_ratio β€” Ratio of the number of sensor rows in the trackpad to the number of distinct cursor y positions. πŸ¦‹
  • hw.uatpN.sensor_threshold β€” Nonnegative integer giving a lower bound on the β€œpressure” a sensor must report for the driver to recognize input from it. πŸ”₯
  • hw.uatpN.sensor_normalizer β€” Nonnegative integer to subtract from the β€œpressure” reported by a sensor when averaging them to estimate the pressure of a single finger. πŸŽ€
  • hw.uatpN.palm_width β€” If zero, palm detection is disabled. Otherwise, a positive integer giving the number of consecutive sensors wide or high that will be interpreted as a palm instead of a finger and therefore ignored. πŸ™ˆ
  • hw.uatpN.old_raw_weight, hw.uatpN.old_smoothed_weight, hw.uatpN.new_raw_weight β€” When a finger moves on the trackpad, the new smoothed (cursor) position is computed as a positive linear combination of the old raw (trackpad) position, the old smoothed position, and the new raw position. The weights of the linear combination are given by these sysctl knobs. 🌈
  • hw.uatpN.motion_threshold β€” Threshold below which a difference in smoothed position will not be reported as an input event to userland. πŸ’œ
  • hw.uatpN.motion_multiplier β€” Positive integer by which a difference in smoothed position will be multiplied before passing it as an input event to userland. πŸ’…
  • hw.uatpN.motion_divisor β€” Positive integer by which a difference in smoothed position will be divided, after multiplying it by the motion multiplier, before passing it as an input event to userland. ✨
  • hw.uatpN.fast_motion_threshold β€” Threshold above which to use the fast motion factors below. ⭐
  • hw.uatpN.fast_motion_multiplier β€” Positive integer by which to multiply a large difference in smoothed position. πŸ”₯
  • hw.uatpN.fast_motion_divisor β€” Positive integer by which to divide a large difference in smoothed position, after multiplying it by the fast motion multiplier. πŸ¦‹
  • hw.uatpN.motion_delay β€” Number of input packets before uatp reports motion to userland. πŸŽ€
  • hw.uatpN.tap_limit_msec β€” Positive integer giving the number of milliseconds of a finger’s contact with the trackpad before it will not be considered a tap. 🌸
  • hw.uatpN.double_tap_limit_msec β€” Positive integer giving the maximum number of milliseconds after a tap before a second tap will keep the button down. πŸ’–
  • hw.uatpN.one_finger_tap_buttons β€” Bit mask of buttons that a one-finger tap will press. 🫢
  • hw.uatpN.two_finger_tap_buttons β€” Bit mask of buttons that a two-finger tap will press. πŸŽ€
  • hw.uatpN.three_finger_tap_buttons β€” Bit mask of buttons that a three-finger tap will press. ✨
  • hw.uatpN.tap_track_distance_limit β€” Maximum distance in smoothed position that will be interpreted as a tap instead of motion. 🌈

πŸ¦‹ SEE ALSO πŸ¦‹

Go give these pages some love, bestie:

⭐ HISTORY ⭐

The uatp driver first appeared in NetBSD 7.0. Periodt. ✨

πŸ‘‘ AUTHORS πŸ‘‘

The uatp driver was originally written by Taylor R. Campbell <riastradh@NetBSD.org>. πŸ‘‘πŸ’–

πŸ’€ BUGS πŸ’€

Okay bestie, the not-so-cute parts:

  • Sometimes, particularly when X starts up, the driver gets wedged in an interrupt storm and does not reset the device. Setting hw.uatpN.sensor_threshold to a large number, say 1000, and then back to its original value, can fix this. 😭
  • Palm detection is not very robust. πŸ™ˆ
  • Multi-touch scrolling is currently broken. πŸ’€
  • Pinch-to-zoom and other fancy multi-touch input is not implemented. 😭
  • On suspending and resuming, uatp detaches and reattaches, and loses all sysctl settings in the process. πŸ’€
⚠️ Do not submerge your uatp devices in water: USB adenosine triphosphate is unstable in water, and will hydrolyze to USB adenosine diphosphate and phosphate, which is a lower energy state that makes your mouse narcoleptic in X. πŸ’€

πŸ’Œ cute little sign-off: the footer source/version is Debian, the date is August 4, 2012, and the manual page is UATP(4). mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from