Repository navigation
Conversation
acpi-als exposes scan_elements and a trigger, but the trigger never fires. iio_buffer_refill() then blocks forever and clightd stops answering Sensor.Capture, which freezes Clight automatic brightness on MacBookPro12,1. For acpi-als, use the poll path (in_illuminance_input), which returns valid values in milliseconds. Other ALS devices keep the buffer-first behaviour.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Use the poll path for
acpi-alsinstead of the IIO buffer path.Root cause
The ACPI ALS on MacBookPro12,1 (
iio:device0, nameacpi-als) exposesscan_elements/andtrigger/current_trigger, sovalidate_dev()selectsthe buffer implementation. The trigger never fires, so
iio_buffer_refill()blocks forever and clightd stops answeringSensor.Capture; Clight automatic brightness freezes.in_illuminance_inputcan be read reliably in the same setup.Reproduction
Before: hangs. After: returns 5 values in milliseconds.
Changes
capture(), if the device name isacpi-alsand a poll attribute isavailable, use
iio_poll_capture().Testing
MacBookPro12,1 / Fedora 45 / kernel 7.3.4;
Captured [5/5]at every15/30s Clight capture. No change for other IIO ALS devices tested.