Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-01-05 21:28:52

sonycdr
Member
Registered: 2009-01-30
Posts: 130

[SOLVED] Brightness control does not display actual percentage

Basically title.

Also, noticed that brightness also gets changed when using mouse's scroller in the battery icon (this is a laptop). Problem is, if I set brightness to 0, screen goes all black and can no longer see anything. Lucky I had the mouse pointer in exactly the same point to increase brightness back.

Why doesn't it display actual % level?
What can I do if I accidentally set brightness to 0 and moved mouse pointer?
Does anyone remember XFCE's default brightness level as in a just installed system?

Thanks.

Last edited by sonycdr (2023-08-19 18:01:35)

Offline

#2 2023-01-05 22:34:37

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: [SOLVED] Brightness control does not display actual percentage

sonycdr wrote:

Problem is, if I set brightness to 0, screen goes all black and can no longer see anything. Lucky I had the mouse pointer in exactly the same point to increase brightness back.

You can set a minimum brightness level:

xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/brightness-slider-min-level -s 5

Why doesn't it display actual % level?

See: https://gitlab.xfce.org/xfce/xfce4-powe … issues/116.

What can I do if I accidentally set brightness to 0 and moved mouse pointer?

Setting a minimum brightness level as noted above should work.

Does anyone remember XFCE's default brightness level as in a just installed system?

Had a look at the code and couldn't find out. My guess is that it uses the current system brightness level as the default.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2023-01-06 15:51:23

sonycdr
Member
Registered: 2009-01-30
Posts: 130

Re: [SOLVED] Brightness control does not display actual percentage

ToZ wrote:

You can set a minimum brightness level:

xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/brightness-slider-min-level -s 5

I get this:

Property "/xfce4-power-manager/brightness-slider-min-level" does not exist on channel "xfce4-power-manager"
ToZ wrote:

>>What can I do if I accidentally set brightness to 0 and moved mouse pointer?
Setting a minimum brightness level as noted above should work.

Sorry, but how should I do that if I can no longer see anything?

Last edited by sonycdr (2023-01-06 15:51:48)

Offline

#4 2023-01-06 15:57:23

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: [SOLVED] Brightness control does not display actual percentage

If it doesn't exist you would need to create the setting:

xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/brightness-slider-min-level -t int -s 5 --create

Once you have set a lower minimum, the screen should never go blank. You may need to adjust the value "5" to a system-specific value that allows you to still see the screen.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2023-01-06 16:56:06

sonycdr
Member
Registered: 2009-01-30
Posts: 130

Re: [SOLVED] Brightness control does not display actual percentage

ToZ wrote:

If it doesn't exist you would need to create the setting:

xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/brightness-slider-min-level -t int -s 5 --create

Once you have set a lower minimum, the screen should never go blank. You may need to adjust the value "5" to a system-specific value that allows you to still see the screen.

Tried that.
Then had a second thought and preferred this:

xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/brightness-slider-min-level -s 10

Even after rebooting, screen goes all black if lowering all the brightness, so it's not working at all...
Ran everything as regular user, never as root.

Also, I think this point is still missing:
>>What can I do if I accidentally set brightness to 0 and moved mouse pointer?

Offline

#6 2023-01-07 01:08:23

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: [SOLVED] Brightness control does not display actual percentage

You may need to adjust the value to match with your backlight interface. For example, on my system, I have one directory under /sys/class/backlight and it is intel_backlight. Within that directory is a max_brightness file. My value in that file is 937. So if I run the command above and set the minimum brightness level to 150, it prevents the screen from going blank. What directories do you have under /sys/class/backlight?

Also, I think this point is still missing:
>>What can I do if I accidentally set brightness to 0 and moved mouse pointer?

You could assign a keyboard shortcut to manually adjust the value of /sys/class/backlight/INTERFACE/brightness (note: you will need to somehow grant access to your user account first to that file before it will work).


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2023-01-07 04:16:52

sonycdr
Member
Registered: 2009-01-30
Posts: 130

Re: [SOLVED] Brightness control does not display actual percentage

I tested on 2 different rigs; with the very same interface name as yours, just different max_brightness values. One of 4650, other -more recent model- of 18000.

Are you implying that the "brightness-slider-min-level" actually sets values based on the file's own scale, and not a percentage scale?

If so, shouldn't that be explicitly explained in the XFCE docs?

Offline

#8 2023-01-07 12:41:08

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: [SOLVED] Brightness control does not display actual percentage

If you can confirm this on your system, I can update the docs. Does setting the minimum value to say 2500 on the first system prevent the screen from turning black?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#9 2023-01-07 18:28:22

sonycdr
Member
Registered: 2009-01-30
Posts: 130

Re: [SOLVED] Brightness control does not display actual percentage

On the aforementioned rigs, I tested with values of 465 and 1800 respectively; this is, 10% of their max brightness, which I also double-checked beforehand -and also how it "looked"- by manually testing it before trying to set minimum value.

And yes, finally worked.

This would support that, certainly, "brightness-slider-min-level" actually sets values based on the file's own scale instead of percentage scale.

Offline

#10 2023-01-07 18:48:45

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: [SOLVED] Brightness control does not display actual percentage

Thanks for confirming. I'll update the docs.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.015 seconds, 7 queries executed - Memory usage: 564.95 KiB (Peak: 582.23 KiB) ]