A user mode daemon for automatically changing brightness based on light sensor value designed for modern laptops. Not all devices might be supported.
Run from a terminal sudo watch cat /sys/bus/acpi/devices/ACPI0008\:00/iio\:device0/in_illuminance_raw
and check that number is changing (try close the sensor or add more light). If the number is still the same it means the sensor driver doesn't work. If you see file not found error try to find correct path for in_illuminance_raw
inside /sys/bus/acpi/devices/
.
For ZBook 15 G6, Framework laptops, and may be others, the sensor path is /sys/bus/iio/devices/iio:device0/in_illuminance_raw
. So try sudo watch cat /sys/bus/iio/devices/iio:device0/in_illuminance_raw
and change the config if it works for you.
Works on ASUS Zenbooks with built-in driver acpi-als:
Also works on Framework laptops:
On Dell Inspiron 13 7353, need to change driver path and brightness levels.
Some times works (base on responses)
(_SB.PCI1.LPCB.EC0.ALSC)
Doesn't work on Zenbooks because of driver issue:
Something wrong with Arch Linux may be related with syslog, a pull request is appreciated
Please fill a response form, it may helps other users
Keyboard back light is not adjust because my laptop doesn't have it. Want to help? Create an issue.
Finally I found time to create deb package
To install and start run next commands after download:
sudo dpkg -i ~/Download/illuminanced_1.0-0.deb
sudo systemctl enable illuminanced.service
sudo systemctl start illuminanced.service
You can check status by running systemctl status illuminanced.service
Please open an issue if it doesn't work.
curl https://sh.rustup.rs -sSf | sh
git clone https://github.com/mikhail-m1/illuminanced.git
cd illuminanced; cargo build --release
sudo ./install.sh
/usr/local/etc/illuminanced.toml
(Default)[general].light_steps
[light].points_count
illuminance_<n>
and light_<n> where
illuminance from in_illuminance_raw
(see below) and light in range [0..light_steps)
Reads illuminance from /sys/bus/acpi/devices/ACPI0008:00/iio:device0/in_illuminance_raw
, apply Kalman like filter, set back light value base on defined points.
Unfortunately I cannot find a way how get events from iio buffers, for acpi-als driver, so now it polls.
<Fn> + A
Switches three modes:
/usr/local/etc/illuminanced.toml
)Any feedback are welcome