GitHub - olvvier/apple-silicon-accelerometer: reading the undocumented mems accelerometer on apple silicon macbooks via iokit hid

Hacker News
February 20, 2026
AI-Generated Deep Dive Summary
A new GitHub project has uncovered a way to access an undocumented MEMS accelerometer embedded in Apple Silicon MacBooks, including M1, M2, and M3 chips. This sensor, managed by the Sensor Processing Unit (SPU), is not officially exposed through public APIs, making it a challenging target for developers. The project leverages iokit HID callbacks to read raw acceleration data at a high rate of 800Hz, significantly faster than what is typically available through standard frameworks. The accelerometer resides under AppleSPUHIDDevice in the iokit registry and uses vendor-specific HID reports. By utilizing IOHIDDeviceCreate and registering an asynchronous input report callback, the project captures 22-byte reports containing X/Y/Z axis acceleration values as little-endian int32s. These raw values are then scaled by dividing with 65536 to convert them into gravitational units (g). The approach has been tested on MacBook Pro M3 models running macOS 15.6.1, though compatibility with other Apple Silicon devices remains uncertain. The project provides a Python-based framework for accessing this sensor, requiring administrative privileges due to the nature of HID device interaction under macOS. Key components include spu_sensor
Verticals
techstartups
Originally published on Hacker News on 2/20/2026