freefall is a small userspace utility (often built from the Linux kernel
source tree) that monitors a laptop’s free-fall sensor (usually exposed as
/dev/freefall) and triggers hard-drive protection actions (parking heads)
when a sudden drop is detected.
/dev/freefall is working on hardware that provides it/dev/freefall on some HP/Dell laptops)
There is no single universal “freefall” package across distros. On many systems it is built from kernel sources under
tools/laptop/freefall/. If your system provides /dev/freefall but you don’t have the tool,
building from kernel sources is the most direct path.
# If you have kernel source available: cd linux-source*/tools/laptop/freefall make
If you don’t have kernel sources, install your distro’s kernel-source / linux-source package first.
ls -l /dev/freefall
If you don’t see it, your hardware/driver may not support this interface.
lsmod | egrep 'hp_accel|lis3|dell|smo|accel'
Different laptops use different drivers; this just gives hints.
dmesg | egrep -i 'freefall|accel|hp_accel|lis3|smo'
Some drivers log registration of the device or sensor.
cd /path/to/linux-source/tools/laptop/freefall make
Produces a freefall binary (name may vary by tree/version).
sudo ./freefall
Foreground run is useful while verifying it can read the device and react to events.
sudo nohup ./freefall >/var/log/freefall.log 2>&1 &
Use a log file so you can confirm it’s alive.
sudo lsof /dev/freefall
Verifies the process is monitoring the device.
lsblk -d -o NAME,ROTA,MODEL,SIZE sudo smartctl -i /dev/sdX
ROTA=1 indicates a spinning disk; SSDs (ROTA=0) won’t benefit from head parking.
# /etc/systemd/system/freefall.service [Unit] Description=Freefall disk protection helper After=multi-user.target [Service] ExecStart=/usr/local/sbin/freefall Restart=on-failure [Install] WantedBy=multi-user.target
Then enable it:
sudo systemctl daemon-reload sudo systemctl enable --now freefall
# For power/perf tuning on modern systems: powertop turbostat # For disk health/protection concepts: smartctl hdparm
Most modern systems don’t use /dev/freefall tooling day-to-day, but the idea is still educational.
tools/laptop/freefall/.