-
-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Description
ALS Support on M2 MacBook Air (J415)
We've got the VD6286 ambient light sensor fully working on the M2 MacBook Air 15" running Asahi Fedora 42 with the fairydust kernel. Sharing the setup for the community.
What was needed
- Kernel: Fairydust branch with
CONFIG_IIO_AOP_SENSOR_ALS=m(already enabled in the default config) - Calibration firmware: The ALS requires factory calibration data extracted from macOS. Without it, the sensor reports 0 lux.
- Kernel patch (PR #457): Makes calibration optional so the driver probes even without the firmware file — AsahiLinux/linux#457
Extracting calibration from macOS
# On macOS:
ioreg -l -a > ioreg-full.xml
# On Linux:
python3 extract-als-cal.py ioreg-full.xml
sudo cp aop-als-cal.bin /lib/firmware/apple/aop-als-cal.bin
sudo dracut --force --kver $(uname -r)
# rebootThe extraction tool parses the CalibrationData blob from the AppleSPUVD6286 node in the ioreg XML dump.
Auto-brightness daemon
Since KDE Plasma's powerdevil 6.6.0 doesn't have built-in ALS support on Asahi, we wrote a lightweight daemon that:
- Reads lux from
iio-sensor-proxyvia D-Bus - Smoothly ramps display brightness via KDE's
ScreenBrightnessD-Bus API - Uses rolling average + hysteresis to prevent flicker
Resources
- Auto-brightness daemon + calibration extraction tool: https://github.com/juicecultus/asahi-auto-brightness
- Kernel patch (optional calibration): iio: aop_sensors: aop_als: make calibration firmware optional linux#457
Tested hardware
- MacBook Air 15" M2 (J415), VD6286 sensor
- Asahi Fedora 42, KDE Plasma 6.6.0
- Kernel 6.18.10-402.asahi.fairydust.fc42.aarch64+16k
Should also work on other M2 machines with VD6286 (MacBook Air 13", MacBook Pro 13").
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels