This project aims to improve palm rejection functionality for those running t2linux on their macbooks.
Grabs the physical trackpad, filters palm-shaped contacts, and forwards accepted contacts through a virtual multitouch touchpad so libinput keeps handling pointer acceleration, two-finger scrolling, clicking, and gestures.
Currently tested on:
- Hardware: 2020 Intel MacBook Air (A2179)
- Distro: arch
- Desktop Envio: Hyprland
- Input Stack: evdev, uinput, and libinput
- Service Manager: systemd
PalmReject exclusively grabs the real trackpad while it is running. If the virtual touchpad fails, pointer input can appear to stop.
Stop palmreject:
sudo systemctl stop palmreject.serviceRemove it completely:
sudo ./uninstall.shInstall standard Arch build tools and libinput utilities:
sudo pacman -S --needed base-devel libinputbrightnessctl is optional. When present and the tested keyboard-backlight
device is detected, the installer can restore the keyboard backlight after
resume.
Extract the archive and enter the directory:
tar -xzf T2_PalmReject-v1.0.0.tar.gz
cd T2_PalmReject-v1.0.0First run a non-destructive check:
./install.sh --dry-runThen install:
sudo ./install.shThe installer:
- Builds
palmrejectfrom source - Detects the Apple internal trackpad using stable
/dev/input/by-idor/dev/input/by-pathlinks - Writes
/etc/palmreject.conf - Installs
/usr/local/bin/palmreject - Installs and enables
palmreject.service - Installs a suspend/resume hook that stops the service before sleep and restarts it after wake
- Loads
uinputand configures it to load at boot
To choose the device manually:
sudo ./install.sh --device /dev/input/by-id/YOUR-TRACKPAD-event-mouseTo skip keyboard-backlight restoration:
sudo ./install.sh --no-backlightsystemctl status palmreject.service
sudo systemctl restart palmreject.service
sudo systemctl stop palmreject.service
journalctl -u palmreject.service -bFrom the source directory:
sudo ./uninstall.shPreserve /etc/palmreject.conf while removing everything else:
sudo ./uninstall.sh --keep-configmake
sudo ./palmreject /dev/input/by-id/YOUR-TRACKPAD-event-mouseStop the manual process with Ctrl+C before starting the systemd service.
.
├── include/
│ └── virtual_touchpad.h
├── scripts/
│ └── detect-trackpad.sh
├── src/
│ ├── main.c
│ └── virtual_touchpad.c
├── systemd/
│ ├── palmreject.service
│ └── palmreject-sleep
├── install.sh
├── uninstall.sh
├── Makefile
├── VERSION
├── LICENSE
└── README.md
- coordinate ranges and palm thresholds are hardcoded for the tested Apple trackpad
- limited support for thumbing
- pinch zooming is a little buggy
Physical Apple trackpad
|
| EVIOCGRAB
v
T2 PalmReject classifier
|
| fingers forwarded; palms globally blocked
v
Virtual multitouch touchpad
|
v
libinput -> compositor/desktop
T2 PalmReject is licensed under the GNU General Public License v3.0 only.
See LICENSE for the complete terms.
Copyright (C) 2026 Ryan C.
Developed by Ryan C. with assistance from ChatGPT during prototyping and packaging.