You are not logged in.

#1 2021-04-28 10:56:55

cazuza
Member
Registered: 2014-05-04
Posts: 26

[SOLVED] How to set a minimum screen brightness on gnome ?

Hello,
I'm trying to set a minimum screen brightness on my laptop because it is very bright.
I'm on gnome 40 on X11, using mostly intel integrated GPU (when I use NVIDIA it is to play on steam or for video editing and I set a hight brightness value).

I can manually set the brightness below the gnome minimal value with :

 # echo 200 > /sys/class/backlight/intel_backlight/brightness 

(The default minimum value is 862 when I use the gnome key bindings)

I can see there is a maximum value (/sys/class/backlight/intel_backlight/max_brightness) but I would like to set a minimum value too.

Also I could set a value with xrandr, but I would really like to be able to use the gnome keyboard shortcut to adjust my screen brightness between 50 an the max_brightness (I don't always work with the minimum value).

Do you have any idea on how I could do that ?
Thank you !

Last edited by cazuza (2021-04-29 19:30:14)

Offline

#2 2021-04-28 13:46:39

ooo
Member
Registered: 2013-04-10
Posts: 1,637

Re: [SOLVED] How to set a minimum screen brightness on gnome ?

The minimum brightness in GNOME should be 1% of the max_brightness value, and I don't think there's way to change this other than patching gsd-backlight.c in gnome-settings-daemon.

Offline

#3 2021-04-28 17:33:45

cazuza
Member
Registered: 2014-05-04
Posts: 26

Re: [SOLVED] How to set a minimum screen brightness on gnome ?

ooo wrote:

The minimum brightness in GNOME should be 1% of the max_brightness value, and I don't think there's way to change this other than patching gsd-backlight.c in gnome-settings-daemon.

The minimum brightness is actualy 10% of the max_brightness, is that what you meant ?

Offline

#4 2021-04-29 03:43:54

ooo
Member
Registered: 2013-04-10
Posts: 1,637

Re: [SOLVED] How to set a minimum screen brightness on gnome ?

cazuza wrote:

The minimum brightness is actualy 10% of the max_brightness, is that what you meant ?

No, it should be 1%: https://gitlab.gnome.org/GNOME/gnome-se … ght.c#L233

I can also confirm that when GNOME's brightness slider is at far left, /sys/class/backlight/intel_backlight/brightness is 1% of /sys/class/backlight/intel_backlight/max_brightness on my system.

Offline

#5 2021-04-29 19:04:49

cazuza
Member
Registered: 2014-05-04
Posts: 26

Re: [SOLVED] How to set a minimum screen brightness on gnome ?

My /sys/class/backlight/intel_backlight/max_brightness is 4882
My /sys/class/backlight/intel_backlight/brightness is 862 (I don't remember if it was the case yesterday of if I screwed up the division XD)

Do you have any idea why is that ?

Offline

#6 2021-04-29 19:22:53

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: [SOLVED] How to set a minimum screen brightness on gnome ?

Do you have multiple backlight interfaces in /sys/class/backlight/?
Maybe gnome chooses another interface that has worse backlight resolution:
https://gitlab.gnome.org/GNOME/gnome-se … ght.c#L129

Last edited by progandy (2021-04-29 19:23:31)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#7 2021-04-29 19:28:26

cazuza
Member
Registered: 2014-05-04
Posts: 26

Re: [SOLVED] How to set a minimum screen brightness on gnome ?

Thank you two for your answers !
Yes I had multiples interfaces in /sys/class/backlight/ : intel_backlight, acpi_video0 and acpi_video1
I solved it by passing acpi_backlight=none to the kernel in /etc/default/grub, as found here.
It's been a long time I wanted to solve this and didn't take the time smile

Last edited by cazuza (2021-04-29 19:30:01)

Offline

Board footer

Powered by FluxBB