Linux Laptop Legacy

freefall — laptop accelerometer disk-protection helper

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.

What freefall is good for

Reality check: This is mostly for spinning disks (HDD). SSDs don’t have heads to park. Many modern laptops either don’t expose this interface or handle protection differently.

How it works (high level)

Warning: Don’t “test” by dropping a laptop. If you must test, simulate carefully and safely (some drivers provide test hooks; otherwise avoid physical tests).

Install / availability

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.

10 Practical Examples

1) Check if your system exposes the free-fall device

ls -l /dev/freefall

If you don’t see it, your hardware/driver may not support this interface.

2) Look for related kernel modules

lsmod | egrep 'hp_accel|lis3|dell|smo|accel'

Different laptops use different drivers; this just gives hints.

3) Inspect kernel messages for sensor/driver info

dmesg | egrep -i 'freefall|accel|hp_accel|lis3|smo'

Some drivers log registration of the device or sensor.

4) Build the freefall utility from kernel tools

cd /path/to/linux-source/tools/laptop/freefall
make

Produces a freefall binary (name may vary by tree/version).

5) Run freefall in the foreground (watch output)

sudo ./freefall

Foreground run is useful while verifying it can read the device and react to events.

6) Run freefall in the background (classic daemon style)

sudo nohup ./freefall >/var/log/freefall.log 2>&1 &

Use a log file so you can confirm it’s alive.

7) Confirm it has the device open

sudo lsof /dev/freefall

Verifies the process is monitoring the device.

8) Check whether your disk supports head-parking or protection

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.

9) Wrap it in a systemd service (simple)

# /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

10) Modern reality: what to use instead

# 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.

Notes & Gotchas