brightnessctl icon indicating copy to clipboard operation
brightnessctl copied to clipboard

--min-value prevents all value changes

Open SavageMessiah opened this issue 3 years ago • 5 comments
trafficstars

I'm trying to use --min-value in order to keep something like brightnessctl set 5%- from turning my screen off. However it seems that setting --min-value is preventing ANY change from happening, even if it is above the minimum specified.

~
❯ brightnessctl set 10000
Updated device 'intel_backlight':
Device 'intel_backlight' of class 'backlight':
	Current brightness: 10000 (10%)
	Max brightness: 96000


~
❯ brightnessctl --min-value 5000 set 7000
Device 'intel_backlight' of class 'backlight':
	Current brightness: 10000 (10%)
	Max brightness: 96000


~
❯ brightnessctl --min-value 5000 set 1%-
Device 'intel_backlight' of class 'backlight':
	Current brightness: 10000 (10%)
	Max brightness: 96000


~
❯ brightnessctl --min-value 5000 set 1%+
Device 'intel_backlight' of class 'backlight':
	Current brightness: 10000 (10%)
	Max brightness: 96000


~
❯ brightnessctl --min-value 5000 set 11000
Device 'intel_backlight' of class 'backlight':
	Current brightness: 10000 (10%)
	Max brightness: 96000

SavageMessiah avatar Oct 31 '22 02:10 SavageMessiah

not a fix, but i got around this by having an external script that clamps the set value between min and max. dirty but it works.

rodericasm avatar Nov 25 '22 06:11 rodericasm

I'm also experiencing this issue, it seems that the --min-value option is broken.

jrollins avatar Aug 23 '23 03:08 jrollins

yep. --min-value not work.

neuromagus avatar Aug 24 '23 18:08 neuromagus

I think I have a work around. I haven't looked at the code, but I think the problem is related to the argument parsing. I seem to have gotten it to work if I use the long form of the option, and I specify the minimum value in absolute units instead of as a percent. So this command seems to be doing the correct thing for me:

brightnessctl set --min-value=150 1%-

With that command it does actually bottom out at a brightness level of 150.

jrollins avatar Aug 24 '23 19:08 jrollins

thanks.

neuromagus avatar Aug 24 '23 20:08 neuromagus