Let user choose which backlight device is controlled by brightness slider
See original GitHub issueIs your feature request related to a problem? Please describe. My computer (an Apple MacBookPro16,1) has two backlight devices:
$ ls /sys/class/backlight/
acpi_video0 amdgpu_bl0
“acpi_video0” is the one that actually controls my display backlight, while “amdgpu_bl0” does nothing. When nwg-panel
calls light
, it selects the amd backlight by default, so the brightness slider in my panel’s controls menu doesn’t do anything.
Describe the solution you’d like
I would like some way to set the backlight device that is used so that I can set it to control the “acpi_video0” backlight. This could probably be done by adding a dropdown menu that lets you select from the outputs of
$ ls /sys/class/backlight`
acpi_video0
amdgpu_bl0
If a specific backlight is selected, -s sysfs/backlight/<SELECTED_BACKLIGHT>
could be added to light
’s arguments, or -d <SELECTED_BACKLIGHT>
to brightnessctl
This dropdown to select device could be located above “output switcher” and to the right of “Brightness” in this screenshot:
Describe alternatives you’ve considered Alternatively, the slider in the panel’s controls thing could be set up to change the brightness of all display backlights in the system.
Additional context
light
is called to set brightness here in the code https://github.com/nwg-piotr/nwg-panel/blob/97e2cc0ee8e5f050d92a74434978d6bd71496cd2/nwg_panel/tools.py#L432
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
Thanks! I expected something to be missed, as it was late in the night. I’ll add this.
It ends up setting the brightness correctly, but then it resets it to the brightness that the default backlight has, which I think is because device seems to not be set when get_brightness is called.
this change makes it work perfectly