ATP(4)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

✨ NAME ✨

atp β€” the Apple touchpad driver, bestie πŸ’… (this is the atp(4) page, for the record πŸŽ€)


πŸ¦‹ SYNOPSIS πŸ¦‹

Okay so if you wanna bake this driver into your kernel, you gotta drop these lines into your kernel configuration file:

device atp
device hid
device usb

Or β€” if you'd rather load it as a module at boot time (honestly relatable, lowkey less commitment), just put this line in loader.conf(5):

atp_load="YES"

πŸ’– DESCRIPTION πŸ’–

So the atp driver is the whole reason your Apple Internal Trackpad device β€” the one living inside many Apple laptops β€” actually works. And the gag is: both the older families (Fountain/Geyser) and the newer ones (Wellspring) are supported through one unified driver. Iconic behaviour, no notes. πŸ‘‘

The driver simulates a three-button mouse using multi-finger tap detection, and the mapping is chef's kiss:

  • Single finger tap β†’ generates a left-button click
  • Two-finger tap β†’ maps to the middle button
  • Three-finger tap β†’ gets treated as a right button click

There's also support for 2-finger horizontal scrolling, which translates to page-back/forward events (iykyk 🌈), and vertical multi-finger scrolling emulates the mouse wheel.

A double-tap followed by a drag is treated as a selection gesture β€” a virtual left-button click is assumed for the lifespan of the drag. Drag = selection, periodt.

atp supports dynamic reconfiguration using sysctl(8), through nodes under hw.usb.atp.. Pointer sensitivity can be controlled using the sysctl tunable hw.usb.atp.scale_factor β€” and heads up, smaller values of scale_factor result in faster movement (yes, backwards from what you'd guess, we don't make the rules πŸ™ˆ). A simple high-pass filter is used to reduce contributions from small movements; the threshold for this filter may be controlled by hw.usb.atp.small_movement. The maximum tolerable duration of a touch gesture is controlled by hw.usb.atp.touch_timeout (in microseconds); beyond this period, touches are considered to be slides. (This conversion also happens when a finger stroke accumulates at least hw.usb.atp.slide_min_movement movement (in mickeys). The maximum time (in microseconds) to allow an association between a double-tap and drag gesture may be controlled by hw.usb.atp.double_tap_threshold.

And should one want to disable tap detection and rely only upon physical button presses, set the following sysctl to a value of 2: hw.usb.atp.tap_minimum. Boom. Physical buttons only era. 🫢


πŸ”₯ HARDWARE πŸ”₯

The atp driver provides support for the following Product IDs β€” brace yourself, this list is long and it ate:

  • PowerBooks, iBooks (IDs: 0x020e, 0x020f, 0x0210, 0x0214, 0x0215, 0x0216)
  • Core Duo MacBook & MacBook Pro (IDs: 0x0217, 0x0218, 0x0219)
  • Core2 Duo MacBook & MacBook Pro (IDs: 0x021a, 0x021b, 0x021c)
  • Core2 Duo MacBook3,1 (IDs: 0x0229, 0x022a, 0x022b)
  • 12 inch PowerBook and iBook (IDs: 0x030a, 0x030b)
  • 15 inch PowerBook (IDs: 0x020e, 0x020f, 0x0215)
  • 17 inch PowerBook (ID: 0x020d)
  • Almost all recent Macbook-Pros and Airs (IDs: 0x0223, 0x0223, 0x0224, 0x0224, 0x0225, 0x0225, 0x0230, 0x0230, 0x0231, 0x0231, 0x0232, 0x0232, 0x0236, 0x0236, 0x0237, 0x0237, 0x0238, 0x0238, 0x023f, 0x023f, 0x0240, 0x0241, 0x0242, 0x0243, 0x0244, 0x0245, 0x0246, 0x0247, 0x0249, 0x024a, 0x024b, 0x024c, 0x024d, 0x024e, 0x0252, 0x0252, 0x0253, 0x0253, 0x0254, 0x0254, 0x0259, 0x025a, 0x025b, 0x0262, 0x0262, 0x0263, 0x0264, 0x0290, 0x0291, 0x0292)

Wanna discover the product-id of your touchpad? Bestie, search for 'Trackpad' in the output of lshal(1) and look up the property usb_device.product_id. That's the whole trick. πŸ•΅οΈβ€β™€οΈ


πŸŽ€ FILES πŸŽ€

atp creates a blocking pseudo-device file, /dev/atp0, which presents the mouse as a sysmouse or mousesystems type device β€” see moused(8) for an explanation of these mouse types. Go read it, it's giving essential lore. πŸ“–


🌸 SEE ALSO 🌸

sysmouse(4), usb(4), loader.conf(5), xorg.conf(5) (ports/x11/xorg), moused(8), sysctl(8)


πŸ‘‘ AUTHORS πŸ‘‘

The atp driver was written by Rohit Grover <rgrover1@gmail.com>. Respect the icon, fr fr πŸ«‘πŸ’œ


Okay that's the whole page bestie, you're officially an atp expert πŸ’…βœ¨ β€” this drop came from Debian, dated February 24, 2014, and that's the vibe check complete πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from