Skip to content

Backlight slider doesn't work #462

Closed

Description

@maderios

Hi
I recently use backlight widget. I discovered slider is stuck on 10%, it doesn't work at all

widget "backlight.widget" {
    step = 5;
    max_brightness = 50;
    min_brightness = 5;
  }

Activity

  1. LBCrion commented on Apr 16, 2026

    @LBCrion
    Owner
  2. maderios commented on Apr 16, 2026

    @maderios
    Author

    Yes, it seems to be same issue, mouse scroll wheel on widget works for me too.
    But i can't get backlight 5%

  3. LBCrion commented on Apr 16, 2026

    @LBCrion
    Owner
  4. telychko commented on May 17, 2026

    @telychko

    Same problem here. After the look around, I noticed that math actual_brightness / max_brightness is not working for me. actual_brightness is really differ from the truth. I've tried to replace actual_brightness to brightness in the backlight.source, and things started working. Probably actual_brightness is very hardware specific.

    Environment:
    Linux 6.18.20-1-lts


    More things to fix:
    backlight.widget has wrong bar calculation.
    PS: yes, I've applied fix from the #457

    Suggested fix:

    --- a/backlight.widget	2026-05-13 22:35:16.000000000 -0700
    +++ b/backlight.widget	2026-05-16 22:10:15.538322368 -0700
    @@ -28,7 +28,7 @@
         </svg>'
    
       export button "backlight" {
    -    value = Replace(BacklightTmpl, "@BRIGHTNESS@", Str(BacklightPct*492));
    +    value = Replace(BacklightTmpl, "@BRIGHTNESS@", Str(BacklightPct*4.92));
         style = if(BacklightPresent, "backlight", "hidden");
         class = "module";
         tooltip = "Backlight: " + Str(BacklightPct) + "%";
  5. telychko commented on May 18, 2026

    @telychko

    What I've found in the kernel doc:

    /sys/class/backlight/<backlight>/actual_brightness
    Show the actual brightness by querying the hardware. Due to implementation differences in hardware this may not match the value in ‘brightness’. For example some hardware may treat blanking differently or have custom power saving features. Userspace should generally use the values in ‘brightness’ to make decisions.

  6. LBCrion commented on May 18, 2026

    @LBCrion
    Owner

    @telychko, thank you! I applied both changes to the current git.

  7. maderios commented on May 18, 2026

    @maderios
    Author

    There is a 10% on backlight seeing to prevent accidentally seeing it to
    zero and losing visibility. Would be easy to make the lower limit
    configurable.
    …

    How to configure a lower limit ? (5% for me)

  8. LBCrion commented on May 18, 2026

    @LBCrion
    Owner
  9. maderios commented on May 18, 2026

    @maderios
    Author

    I already use 'min_brightness = 5;' but it doesn't work

  10. telychko commented on May 18, 2026

    @telychko

    min_brightness = 5 doesn't work on my side too. Looks like the minimum brightness is set somewhere in system (kernel level, etc, i dont know). I've tried other utilities like light, but it still doesn't work. When I set brightness below 10% with this tool, it shows less than 10%, but visually I see no changes.

    Why exactly the brightness below 10% doesn't work in sfwbar? I guess, it's because the setting value happened via DBus call, but reading the value via /sysfs/.../brightness. I've checked, the sfwbar sends brightness values below 10% to the DBus correctly (1%,2%,3%, etc), but in doesn't affect.

  11. LBCrion commented on May 19, 2026

    @LBCrion
    Owner
  12. maderios commented on May 19, 2026

    @maderios
    Author

    Me and other people use every day 'brightnessctl s 61' (launched with custom in Hyprland), so I don't think any accidental blanking could happen with 5% backlight

    brightnessctl s 61
    Updated device 'intel_backlight':
    Device 'intel_backlight' of class 'backlight':
    	Current brightness: 61 (7%)
    	Max brightness: 937
    
    
  13. LBCrion commented on May 19, 2026

    @LBCrion
    Owner
  14. maderios commented on May 20, 2026

    @maderios
    Author
  15. LBCrion commented on Nov 18, 2026

    @LBCrion
    Owner

    I'll close this, as it seems to be resolved. Please feel free to re-open if anything still isn't working as expected.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions