Skip to content

[omarchy] Adopt ALS brightness daemon #75

Description

@stevederico

Pick one ALS auto-brightness daemon for Omarchy Mac and ship it. Kernel ALS is already in this tree. This is userspace policy: read lux, write apple-panel-bl (and maybe kbd_backlight) without fighting Hyprland's OSD.

The original tracker named asahi-brightnessd vs asahi-brightness. Those exact project names were not found as public repos or packages in this audit (2026-09-03). Do not pretend they are. Evaluate the daemons that actually exist, then adopt one.

Current state

Kernel, this tree:

  • CONFIG_IIO_AOP_SENSOR_ALS=m and CONFIG_IIO_AOP_SENSOR_LAS=m in arch/arm64/configs/asahi.config.
  • Driver: drivers/iio/common/aop_sensors/ (IIO_AOP_SENSOR_ALS).
  • Calibration firmware apple/aop-als-cal.bin is extracted from macOS (Asahi installer / m1n1). Without it, lux reads 0 and the daemon is useless. Asahi 7.0 progress report: installer can refresh firmware; missing cal was the webcam-class footgun.
  • Internal panel backlight is apple-panel-bl (dcp_backlight.c). Keyboard backlight is the kbd_backlight LED (PWM, see T8132 board files; M1/M2 have the same).

Daemons that exist (evaluate these):

Project What it does Desktop
juicecultus/asahi-auto-brightness IIO sysfs lux → KDE ScreenBrightness D-Bus (SuppressIndicator). VD6286, tested J415 M2 Air. KDE Plasma 6
omarchy-mac#303 User service: IIO illuminance → kbd_backlight LED (on in the dark, off in bright rooms). ExecCondition if hardware missing. Verified M2 Max apple,j414c. Keyboard only, not the panel. Omarchy / systemd
max-baz/wluma Wayland; ALS + screen contents. IIO or a socket. Generic Wayland
KDE powerdevil ALS Built-in, historically weak on Asahi (reason juicecultus exists). KDE

Omarchy Mac is Hyprland + Quickshell, not KDE. A KDE-D-Bus daemon will not drive the panel there. That eliminates asahi-auto-brightness as a drop-in unless someone writes a Hyprland/brightnessctl backend.

Omarchy already has manual brightness keys. Collision with a daemon must be designed (manual override / hysteresis), or users will fight the slider.

Gap

  1. Confirm ALS node: /sys/bus/iio/devices/iio:deviceN/in_illuminance_raw (name varies). Confirm aop-als-cal.bin is present on Omarchy Mac installs.
  2. Choose one:
    • Extend omarchy-mac#303 to also write apple-panel-bl (smallest, already in the distro's style).
    • Package wluma with an IIO ALS source and Hyprland.
    • Write a 50-line systemd service: read IIO, brightnessctl --device=apple-panel-bl. Mark // yagni if it stays that small.
  3. Do not ship two daemons.
  4. Do not dim the Touch Bar (228600000.dsi.0). Same trap as [display] Brightness into Omarchy stack #71/Cannot seem to assign static IP AsahiLinux/linux#31.
  5. If the original asahi-brightnessd/asahi-brightness repos turn up, re-evaluate; they were not locatable here.

Hardware

Needs an M1/M2 laptop with AOP ALS, after #69/AsahiLinux#30. No measurements on this fork.

Quick probe (when a machine exists):

ls /sys/bus/iio/devices/*/in_illuminance*
ls /lib/firmware/apple/aop-als-cal.bin
ls /sys/class/backlight/

Cover the webcam/ALS; lux should drop. If it stays 0, calibration is missing, not the daemon.

First steps

  1. On an Omarchy Mac laptop, run the probe above. Attach paths.
  2. Read omarchy-mac#303 and HDMI output doesn't seem to work, Macbook Pro M1 AsahiLinux/linux#219. Reuse their unit style.
  3. Prototype panel control with brightnessctl --device=apple-panel-bl driven from a lux script. If that feels like macOS, package it. If not, try wluma.
  4. Document the calibration-firmware step in Omarchy (re-run Asahi installer from macOS if lux is stuck at 0).

Done when

  • One daemon is in the Omarchy Mac image, enabled only when IIO illuminance and apple-panel-bl exist.
  • Manual brightness keys still win until the next large lux change (or a documented policy).
  • Keyboard backlight policy is either that same daemon or HDMI port fails to output display signal after a resume AsahiLinux/linux#303, not a third service.
  • This issue names the chosen project and the package name.

External WIP

Related

Sources

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    external-WIPSomeone in the field is the active worker. Reach out. Do not duplicate.omarchy

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions