If I understand the sysfs backlight API correctly, the various drivers expose their functionality under /sys/class/backlight/<device_name>/ {brightness,max_brightness}.
There are more files, but only brightness and max_brightness are relevant for kira.
kira should enumerate all devices into a vector.
If a human specifies a device, use that one, otherwise pick the first in the vector.
Devices can be specified by giving their name after the brightness value.
The device name is fuzzily matched.
No match or an ambiguous match results in an error.
Assuming a machine with 3 backlight devices:
/sys/class/backlight/intel_backlight/
/sys/class/backlight/acpi_backlight/
/sys/class/backlight/acpi_super_backlight/
kira 33 intel uses 1.
kira 33 acpi is an error.
kira 33 acpi_b uses 2.
kira 33 ab uses 2.
kira 33 abs uses 3.
Questions
- Are the value ranges (min,max) consistent between drivers?
- What does it mean when there are multiple devices under
/sys/class/backlight?
- Why have I never seen this functionality on desktops? Laptops only?
If I understand the sysfs backlight API correctly, the various drivers expose their functionality under
/sys/class/backlight/<device_name>/ {brightness,max_brightness}.kirashould enumerate all devices into a vector.If a human specifies a device, use that one, otherwise pick the first in the vector.
Devices can be specified by giving their name after the brightness value.
The device name is fuzzily matched.
No match or an ambiguous match results in an error.
Assuming a machine with 3 backlight devices:
/sys/class/backlight/intel_backlight//sys/class/backlight/acpi_backlight//sys/class/backlight/acpi_super_backlight/kira 33 inteluses 1.kira 33 acpiis an error.kira 33 acpi_buses 2.kira 33 abuses 2.kira 33 absuses 3.Questions
/sys/class/backlight?