You are not logged in.

#1 2021-12-23 16:17:55

LithoUser
Member
Registered: 2016-11-17
Posts: 154

Brightness: 0 is not dark

Hello,

My computer is a HP 14s-fq0098nf laptop. I can control the backlight with the appropriate keys, and it works fine (I've followed the wiki page, of course). My problem is that the minimal brightness seems to be set at a higher level than 0.

Here's what happens: I have only one interface at /sys/class/backlight/:

$ ls /sys/class/backlight/
amdgpu_bl0

$ ls /sys/class/backlight/amdgpu_bl0/
actual_brightness  brightness         max_brightness     subsystem/    uevent             
bl_power           device/            power/             type

I can set the brightness to 0:

$ sudo echo 0 > /sys/class/backlight/amdgpu_bl0/brightness
$ cat brightness
0
$ cat actual_brightness
0

However, my screen is not totally dark (I can read any webpage without any problem, so I'd say that the minimal brightness is actually between 5 and 10%). In order to be sure that I haven't done anything wrong, I've installed xbacklight; but I have the same result (screen not dark) with the following command:

$ xbacklight -set 0

Is there a way to properly set my brightness so that 0 gives me a completely dark screen? (or, at least, a nearly dark screen, since obviously fully dark is not very useful...)

I don't know if it matters, but I don't use any desktop environment; I use Openbox as a window manager.

Thank you very much for your help!

Last edited by LithoUser (2021-12-23 16:19:48)

Offline

#2 2021-12-23 20:30:58

bbus
Member
Registered: 2019-03-14
Posts: 49

Re: Brightness: 0 is not dark

As far as I can tell, limitations at that level are likely firmware/hardware limitations.

For example, on my 2020 XPS 15,
- the firmware only allows keyboard backlight brightness levels at 0%, 50%, or 100%, and in /sys/class/leds/dell::kbd_backlight/max_brightness shows 2, consistent with off, 50%, and 100%
- For screen brightness, the backlight will scale as expected between 400 to {max_brightness=120000}, but any number between 1 and 400 leaves the brightness equal to keeping 400 (which is still way too bright for many cases) in that file. If I set it to 0, then the backlight turns off.

On the contrary, my 2014 macbook pro:
- the keyboard backlight max_brightness=255, and I can scale from 0 to 255, the whole way the visual output is as expected, i.e. when I set it to 1, I can only tell they are on in a pitch-black room
- similarly with screen brightness, visual output scales from 0 to 1023 as expected
in other words, my macbook allows *very* granular control of brightness at low levels.

One more thing to note, leds have a physical parameter called a forward voltage, i.e. a minimum voltage that must be met for it to emit light. As I understand (the course I took was almost a decade ago) different things in circuit design and led manufacture design can be done to manipulate the forward voltage a little, but that takes extra effort, and possibly a lot more costly on the manufacture side.
I am no authority on this, just speculation, (and also not saying this as a fanboy of one manufacturer or another) but with Apple's traditional "attention to hardware detail" they possibly took the time to do what they could to make that as granular as possible, while Dell and HP possibly took shortcuts.
Again, just a guess.

Offline

#3 2021-12-23 21:18:42

seth
Member
Registered: 2012-09-03
Posts: 58,693

Re: Brightness: 0 is not dark

What is the actual problem you're trying to solve and is the solution called DPMS?

Offline

#4 2021-12-24 08:54:45

LithoUser
Member
Registered: 2016-11-17
Posts: 154

Re: Brightness: 0 is not dark

As explained, my problem is:

LithoUser wrote:

Is there a way to properly set my brightness so that 0 gives me a completely dark screen?

bbus> Thanx for the infos! Maybe you're right and it's a hardware problem?

Offline

#5 2021-12-24 08:57:36

seth
Member
Registered: 2012-09-03
Posts: 58,693

Re: Brightness: 0 is not dark

That's an xy-problem.
Why can't you use dpms to turn off the output? Why do you think lowering the backlight to 0 will behave differently?

Offline

#6 2021-12-24 09:27:22

LithoUser
Member
Registered: 2016-11-17
Posts: 154

Re: Brightness: 0 is not dark

No, it's not an xy-problem. My purpose is not to turn off the screen and has nothing to do with dpms. My purpose is to control the backlight more precisely, since even at the minimum (brightness set to 0) the screen is still too bright.

Offline

#7 2021-12-24 09:36:32

seth
Member
Registered: 2012-09-03
Posts: 58,693

Re: Brightness: 0 is not dark

So

Is there a way to properly set my brightness so that 0 gives me a completely dark screen? (or, at least, a nearly dark screen, since obviously fully dark is not very useful...)

You'll probably not be able to tune down the backlight (because that's down to the model acpi/wmi), but can use xrandr or xcalib to darken the output (or redshift) "in software", https://wiki.archlinux.org/title/Backli … ith_xrandr

Last edited by seth (2021-12-24 09:36:51)

Offline

#8 2021-12-24 11:28:58

LithoUser
Member
Registered: 2016-11-17
Posts: 154

Re: Brightness: 0 is not dark

Thanks for the rewording, but I honestly don't see what difference it makes; that's the proof that my English skills are not as good as I'd like; yet I do use an online dictionary and reread what I've written each time I post a new message...

Anyway, the xrandr solution seems interesting, but I'm not sure to understand how it works:

$ xrandr --output eDP --brightness 0.1

It does darken the screen for 1 or 2 seconds, but then it goes back to normal; same thing with "--brightness 2" (like in the archwiki page, only for testing purposes).

Last edited by LithoUser (2021-12-24 11:54:03)

Offline

#9 2021-12-24 12:19:46

Morn
Member
Registered: 2012-09-02
Posts: 886

Re: Brightness: 0 is not dark

LithoUser wrote:

T
It does darken the screen for 1 or 2 seconds, but then it goes back to normal; same thing with "--brightness 2" (like in the archwiki page, only for testing purposes).

That probably means you have other software running that uses xrandr. E.g. something that adjusts the color balance to warmer hues at night: Redshift or the KDE/Gnome built-in equivalents. So you would have to deactivate those first...

Offline

#10 2021-12-24 15:10:33

LithoUser
Member
Registered: 2016-11-17
Posts: 154

Re: Brightness: 0 is not dark

Of course, I forgot that I already use Redshift to set the screen temperature.

But then the problem is that when the brightness is set to 0 (sudo echo 0 > /sys/class/backlight/amdgpu_bl0/brightness) the screen is still really bright; so in order to darken it enough, I have to set the value to 0.3 or even 0.2 in redshift (brightness=0.2 in the redshift.conf file) or using xrandr (xrandr --output eDP --brightness 0.2). It's hard to describe what happens then, but the screen brightness doesn't seem "natural" at all: it's as if a dark veil would cover the screen, but it's not enjoyable at all for the eyes. I assume it's due to the fact that redshift or xrandr don't use real screen brightness (as explained in the wiki).

So I think there's simply no solution here... Or do you think kernel command-line options could be of any use? Is it worth testing it in my case?

Last edited by LithoUser (2021-12-24 15:17:14)

Offline

#11 2021-12-24 16:33:42

seth
Member
Registered: 2012-09-03
Posts: 58,693

Re: Brightness: 0 is not dark

it's as if a dark veil would cover the screen, but it's not enjoyable at all for the eyes.

It's a color transformation through the gamma ramps - everything turns more black so the output becomes darker… what's akin to lowering the brightness in the output OSD
I'm not sure what you're trying to achieve here - or quite frankly what you perceive to be the problem (yes, I know what you wrote - but it'd be good to be able to quantify your qualification of the status quo)

Are you basically looking for a different color scheme (dark mode, inverted colors, stuff like that) where text is nicely bright but the overall light emission is lower because most of the screen is now black?

Offline

#12 2024-06-03 04:28:55

selldirt
Member
Registered: 2024-06-02
Posts: 1

Re: Brightness: 0 is not dark

necroposting bc xrandr gamma and brightness flags are goated

xrandr --output eDP-1 --brightness 0.25 --gamma 1:.75:.5

Offline

#13 2024-06-03 07:42:42

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,402
Website

Re: Brightness: 0 is not dark

Mod note: closing this old topic.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB