Skip to content

Support for all devices under /sys/class/backlight #2

Description

@bugabinga

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.

$ kira 44 <device_name>

The device name is fuzzily matched.
No match or an ambiguous match results in an error.

Assuming a machine with 3 backlight devices:

  1. /sys/class/backlight/intel_backlight/
  2. /sys/class/backlight/acpi_backlight/
  3. /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?

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

    enhancementNew feature or requestquestionFurther information is requested

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions