You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Sway + Waybar and I have setup my brightness key bindings as follows:
bindsym XF86MonBrightnessDown exec "brightnessctl set 5%-" bindsym XF86MonBrightnessUp exec "brightnessctl set +5%"
The issue is when starting at a brightness level of 0% and going up it increases by 5% as expected. However, when going from 100% down, it initially goes down to 94% which not is not right as that it a decreased of 6%. What is weird is that after the first decrease it goes returns to normal decreasing by 5%.
So 100%, 94%??, 89% and so on....
The text was updated successfully, but these errors were encountered:
ZOulhadj
changed the title
Possible bug when decreasing brightness level by 5%
Possible bug when decreasing brightness level
Apr 19, 2021
This is an issue with waybar, not brightnessctl as far as I can see. On my machine the max brightness is 19393. 5% of that is 969.65, and when the backlight is on max brightness and I reduce it by 5% with brightnessctl, it rounds 969.65 to 970 (since it can't set fractions) and sets it to 18423. 18423 divided by 19393 is 0.94998195225081214871, which apparently waybar shows at 94%.
So the issue is that waybar truncates/rounds down the percentage fraction, instead of rounding it to the nearest whole number.
Can confirm that I see this issue with other programs such as PulseAudio. Does seem to look like a Waybar issue. I will open an issue with them. Thank you for confirming.
I am using Sway + Waybar and I have setup my brightness key bindings as follows:
bindsym XF86MonBrightnessDown exec "brightnessctl set 5%-"
bindsym XF86MonBrightnessUp exec "brightnessctl set +5%"
The issue is when starting at a brightness level of 0% and going up it increases by 5% as expected. However, when going from 100% down, it initially goes down to 94% which not is not right as that it a decreased of 6%. What is weird is that after the first decrease it goes returns to normal decreasing by 5%.
So 100%, 94%??, 89% and so on....
The text was updated successfully, but these errors were encountered: