illuminanced
illuminanced copied to clipboard
Default config does not work on Framework 16 and documentation is too lacking to help
Hi, I just want to mention that the default config does not work on the Framework 16 because the backlight files are incorrect. While the info page provides the correct sensor to look for, I feel like some extra documentation would be appreciated by many.
I have made a thread on Framework forums about the correct config to be used with the 16 and potentially the AMD FW13 (cannot verify though as I do not own a 13).
The configuration needed for customization is also very vague and would need more clarification since as of right now, the only way to customize it is to do alot of trial and error. But that has already been mentionned I think in #12.
Hi, I am not sure how I can help, I don't have any Framework laptop, and cannot create config for it. But would glad to add the config to the repository if someone created it.
Hi, I am not sure how I can help, I don't have any Framework laptop, and cannot create config for it. But would glad to add the config to the repository if someone created it.
I have created a working config for the Framework 16. This configuration might also work with machines equipped with AMD iGPUs:
### Lines changed in /etc/illuminanced.toml: max_backlight_file = "/sys/class/backlight/amdgpu_bl2/max_brightness" backlight_file = "/sys/class/backlight/amdgpu_bl2/brightness" illuminance_file = "/sys/bus/iio/devices/iio:device0/in_illuminance_raw"
This config might work with the Framework 13 (AMD) since it shares the same light sensor but I have no way to test for sure.
I have the Framework 13 AMD version. Tested and running with slightly different paths to the backlight files.
max_backlight_file = "/sys/class/backlight/amdgpu_bl1/max_brightness"
backlight_file = "/sys/class/backlight/amdgpu_bl1/brightness"
illuminance_file = "/sys/bus/iio/devices/iio:device0/in_illuminance_raw"
The way it "does not work" is… the binary just exits with a failure code without any hints or explanations.
the only solution I can think of is to write a scrip which will check all known paths for the sensor and create config, I will try to find time to implement it, but if someone want to do it that would be great.
IMHO some predefined configs for known laptop models would do for now. That plus some error reporting to systemd journal instead of having to debug the logs (isn't that as easy as just printing to stdout/stderr?)
Hi, I just want to mention that the default config does not work on the Framework 16 because the backlight files are incorrect. While the info page provides the correct sensor to look for, I feel like some extra documentation would be appreciated by many.
I have made a thread on Framework forums about the correct config to be used with the 16 and potentially the AMD FW13 (cannot verify though as I do not own a 13).
The configuration needed for customization is also very vague and would need more clarification since as of right now, the only way to customize it is to do alot of trial and error. But that has already been mentionned I think in #12.
If you want I made a small guide here: https://github.com/WAPEETY/Arch-Framework16?tab=readme-ov-file#3-ambient-light-sensor I don't know if the config is completely correct but seems to work
I cant get this to start. I have tried several configs that I found online and it refuses to start with systemctl. The journalctl logs are worthless.
journalctl -xeu illuminanced.service
░░ The job identifier is 7602 and the job result is failed.
Jan 01 15:48:51 zerker-fw16 systemd[1]: illuminanced.service: Scheduled restart job, restart counter is at 5.
░░ Subject: Automatic restarting of a unit has been scheduled
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ Automatic restarting of the unit illuminanced.service has been scheduled, as the result for
░░ the configured Restart= setting for the unit.
Jan 01 15:48:51 zerker-fw16 systemd[1]: illuminanced.service: Start request repeated too quickly.
Jan 01 15:48:51 zerker-fw16 systemd[1]: illuminanced.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The unit illuminanced.service has entered the 'failed' state with result 'exit-code'.
Jan 01 15:48:51 zerker-fw16 systemd[1]: Failed to start Ambient light monitoring Service.
░░ Subject: A start job for unit illuminanced.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit illuminanced.service has finished with a failure.
░░
░░ The job identifier is 7731 and the job result is failed.
Looks like even with the edits to the illuminacned.toml file it is still looking for intel.
Looks like even with the edits to the illuminacned.toml file it is still looking for intel.
Did you correctly change the lines in the config ? Sounds to me like the lines are still incorrect. In the Framework forum thread I've made, you can see an example config of what the stock config looks like versus what it should look like for it to work on Framework 16. If it really doesn't work for you, I've even included my own illuminanced.toml config file in that thread that you can paste in.
Looks like even with the edits to the illuminacned.toml file it is still looking for intel.
Did you correctly change the lines in the config ? Sounds to me like the lines are still incorrect. In the Framework forum thread I've made, you can see an example config of what the stock config looks like versus what it should look like for it to work on Framework 16. If it really doesn't work for you, I've even included my own illuminanced.toml config file in that thread that you can paste in.
I was going off of it and I might have fat fingered something. I moved your config over it and it started right up. Thanks!
I'm running into a similar problem here on my Framework 13 AMD laptop... Based on the forum thread I went through and added those details to my /usr/local/etc/illuminanced.toml file
[daemonize]
# log_to = "syslog" or /file/path
log_to = "syslog"
pid_file = "/run/illuminanced.pid"
# log_level = "OFF", "ERROR", "WARN", "INFO", "DEBUG", "TRACE"
log_level = "ERROR"
[general]
check_period_in_seconds = 1
light_steps = 10
min_backlight = 70
step_barrier = 0.1
max_backlight_file = "/sys/class/backlight/amdgpu_bl2/max_brightness"
backlight_file = "/sys/class/backlight/amdgpu_bl2/brightness"
illuminance_file = "/sys/bus/iio/devices/iio:device0/in_illuminance_raw"
event_device_mask = "/dev/input/event*"
event_device_name = "Asus WMI hotkeys"
enable_max_brightness_mode = true
filename_for_sensor_activation = ""
[kalman]
q = 1
r = 20
covariance = 10
[light]
points_count = 6
illuminance_0 = 0
light_0 = 0
illuminance_1 = 20
light_1 = 1
illuminance_2 = 300
light_2 = 3
illuminance_3 = 700
light_3 = 4
illuminance_4 = 1100
light_4 = 5
illuminance_5 = 7100
light_5 = 10
I've tried copying over your .toml file as well with no luck. What else can I provide to assist with this?
I've tried copying over your .toml file as well with no luck. What else can I provide to assist with this?
On the FW13 AMD, the max_backlight, backlight and illuminance paths are not the same as the FW16.
These are the correct paths for the 13 AMD:
max_backlight_file = "/sys/class/backlight/amdgpu_bl1/max_brightness"
backlight_file = "/sys/class/backlight/amdgpu_bl1/brightness"
illuminance_file = "/sys/bus/iio/devices/iio:device0/in_illuminance_raw"
Still failing, though I did verify that the paths were correct that you gave, so at least that's one problem out of the way.
sudo systemctl restart illuminanced.service
Job for illuminanced.service failed because the control process exited with error code.
See "systemctl status illuminanced.service" and "journalctl -xeu illuminanced.service" for details.
sudo systemctl status illuminanced.service
× illuminanced.service - Ambient light monitoring Service
Loaded: loaded (/usr/lib/systemd/system/illuminanced.service; enabled; preset: disabled)
Active: failed (Result: exit-code) since Tue 2025-02-25 20:10:03 EST; 6s ago
Invocation: 2c0290e3f78b4c238f9ea352e58858a3
Docs: https://github.com/mikhail-m1/illuminanced
Process: 15897 ExecStart=/usr/bin/illuminanced (code=exited, status=5)
Updated .toml
[daemonize]
# log_to = "syslog" or /file/path
log_to = "/var/log/illuminanced.log"
pid_file = "/run/illuminanced.pid"
# log_level = "OFF", "ERROR", "WARN", "INFO", "DEBUG", "TRACE"
log_level = "ERROR"
[general]
check_period_in_seconds = 0.1
light_steps = 100
min_backlight = 20
step_barrier = 0.1
max_backlight_file = "/sys/class/backlight/amdgpu_bl1/max_brightness"
backlight_file = "/sys/class/backlight/amdgpu_bl1/brightness"
illuminance_file = "/sys/bus/iio/devices/iio:device0/in_illuminance_raw"
event_device_mask = "/dev/input/event*"
event_device_name = "Asus WMI hotkeys"
enable_max_brightness_mode = true
filename_for_sensor_activation = ""
[kalman]
q = 1
r = 20
covariance = 10
[light]
points_count = 6
illuminance_0 = 0
light_0 = 0
illuminance_1 = 20
light_1 = 35
illuminance_2 = 70
light_2 = 50
illuminance_3 = 120
light_3 = 65
illuminance_4 = 200
light_4 = 75
illuminance_5 = 255
light_5 = 100
Doing some poking around, I see the following in the log...
cat /var/log/illuminanced.log
01:19:18 [ERROR] Cannot read file `/sys/class/backlight/intel_backlight/max_brightness`: No such file or directory (os error 2)
01:19:18 [ERROR] Cannot read file `/sys/class/backlight/intel_backlight/max_brightness`: No such file or directory (os error 2)
01:19:18 [ERROR] Cannot read file `/sys/class/backlight/intel_backlight/max_brightness`: No such file or directory (os error 2)
01:19:19 [ERROR] Cannot read file `/sys/class/backlight/intel_backlight/max_brightness`: No such file or directory (os error 2)
01:19:19 [ERROR] Cannot read file `/sys/class/backlight/intel_backlight/max_brightness`: No such file or directory (os error 2)
@curtmgray I noticed that you're putting your toml file in /usr/local/etc/illuminanced.toml, I tried that too, but turns out that file was actually at /etc/illuminanced.toml. Now everything is working on my AMD Framework 13.
On the FW13 AMD, the max_backlight, backlight and illuminance paths are not the same as the FW16. These are the correct paths for the 13 AMD:
Turns out, on my Framework Laptop 16 (iGPU only), I also need to use bl1 in the paths and not bl2. I don't know why this could be the case, but after checking out what actually exists on /sys/class/backlight/, I only get amdgpu_bl1.