Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-06-09 22:46:02

dln_
Member
Registered: 2019-06-09
Posts: 5

How to stop Power Manager from completely turning off backlight?

First post here, sorry if I make any mistakes.

So I got a Lenovo Thinkpad and installed Zorin OS Lite 12.4 on it (basically just xubuntu with fancy themeing).

Now my problem is that the brightness controlled by the function keys doesn't seem to be properly divided leading to a behaviour like this:

https://www.youtube.com/watch?v=KSMer6O-BmU

Notice how the backlight completely turns off at the lowest brightness setting and catting /sys/class/backlight/intel_backlight/brightness actually returned 0.

Now if I increase the brightness it goes up at even steps like 0, 85, 170 until it gets to 850.
That's when the brightness slider leaves a small gap between current state and 100%. When it gets to 100% catting the brightness returns 852.

And if I then reduce it back again it goes the same even steps but +2, and I'm able to achieve very low brightness as I mostly want.

This all does NOT occur if I manually use the brighness slider in the system tray, but I'd rather use the function keys for that purpose.

Also this did not occur in GNOME or Unity, and I've even tried installing the gnome power management, without any luck unfortunately. I want to stick with Xfce.

Now I have the following question:

How do I prevent xfce4-power-manager from setting the brightness to absolute zero, causing the backlight to turn off and make the screen completely unreadable?

Can I somehow offset the value it writes to /sys/class/*/brightness? Or maybe make the scale go from 2 to 852 instead of 0 to 852?

I appreciate any help in advance. Thanks!

Offline

#2 2019-06-10 00:58:33

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

Re: How to stop Power Manager from completely turning off backlight?

Hello and welcome.

What version of xfce4-power-manager are you running?

xfce4-power-manager -V

Can you post back your current power manager settings?

xfconf-query -c xfce4-power-manager -lv

And finally, can you try the following:

  1. Quit the power manager:

    xfce4-power-manager -q
  2. Try the function keys now. Does the brightness change?

  3. Run the power manager in debug mode:

    xfce4-power-manager --no-daemon --debug

    ...and press the brightness down then brightness up keys and post back the debug statements that are displayed in the terminal window.

Edit: Sorry one more:

ls /sys/class/backlight

Last edited by ToZ (2019-06-10 01:03:15)


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 2019-06-10 08:45:23

dln_
Member
Registered: 2019-06-09
Posts: 5

Re: How to stop Power Manager from completely turning off backlight?

xfce4-power-manager -V returned

Xfce Power Manager 1.4.4

Part of the Xfce Goodies Project
http://goodies.xfce.org

Licensed under the GNU GPL.

xfconf-query -c xfce4-power-manager -lv said

/xfce4-power-manager/blank-on-ac                        15
/xfce4-power-manager/blank-on-battery                   10
/xfce4-power-manager/brightness-level-on-battery        41
/xfce4-power-manager/brightness-switch                  0
/xfce4-power-manager/brightness-switch-restore-on-exit  -1
/xfce4-power-manager/dpms-enabled                       true
/xfce4-power-manager/dpms-on-ac-off                     60
/xfce4-power-manager/dpms-on-ac-sleep                   20
/xfce4-power-manager/dpms-on-battery-off                30
/xfce4-power-manager/dpms-on-battery-sleep              15
/xfce4-power-manager/general-notification               true
/xfce4-power-manager/handle-brightness-keys             true
/xfce4-power-manager/lock-screen-suspend-hibernate      true
/xfce4-power-manager/logind-handle-lid-switch           false
/xfce4-power-manager/power-button-action                3
/xfce4-power-manager/show-tray-icon                     1

xfce4-power-manager --no-daemon --debug +pressing Brightness down and up:

TRACE[xfpm-button.c:118] xfpm_button_filter_x_events(): Key press: ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_DOWN)
TRACE[xfpm-backlight.c:188] xfpm_backlight_show(): Level 682
TRACE[xfpm-manager.c:368] xfpm_manager_button_pressed_cb(): Received button press event: ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_DOWN)
TRACE[xfpm-button.c:118] xfpm_button_filter_x_events(): Key press: ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP)
TRACE[xfpm-backlight.c:188] xfpm_backlight_show(): Level 767
TRACE[xfpm-manager.c:368] xfpm_manager_button_pressed_cb(): Received button press event: ((XfpmButtonKey) BUTTON_MON_BRIGHTNESS_UP)

(When going all the way up and down it showed the same values as catting the sys class like before)

finally ls /sys/class/backlight:

intel_backlight

Hope this helps.

Offline

#4 2019-06-10 10:58:19

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

Re: How to stop Power Manager from completely turning off backlight?

That's an old version of xfce4-power-manager.

Did the brightness keys work when xfce4-power-manager wasn't working (right after "xfce4-power-manager -q")?

Make sure that the power manager is working again (maybe log out and back in again) then issue this command:

xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/handle-brightness-keys -s false

... and try the brightness keys again. They should not work.

Then try:

xbacklight -inc 10

...and:

xbacklight -dec 10

...repeatedly to see if the actual screen rightness changes. Take it to the extremes and see if works better.


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 2019-06-10 11:44:03

dln_
Member
Registered: 2019-06-09
Posts: 5

Re: How to stop Power Manager from completely turning off backlight?

The brightness keys do not work after quitting xfce4-power-manager.


xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/handle-brightness-keys -s false

disabled the brightness keys. Now when I press them, the same brightness notification is showing, but the brightness does not change.

Any xbacklight command, including yours returns

No outputs have backlight property

And about the old version, how can I upgrade it? Do I use backports or can I build it from source? I've got a Ubuntu 16.04 based distro.

Offline

#6 2019-06-10 12:53:10

dln_
Member
Registered: 2019-06-09
Posts: 5

Re: How to stop Power Manager from completely turning off backlight?

Small update:

I've built xfce4-power-manager from source and I'm now using version 1.6.2. Unfortunately the problem still persists.

Offline

#7 2019-06-10 20:14:06

dln_
Member
Registered: 2019-06-09
Posts: 5

Re: How to stop Power Manager from completely turning off backlight?

So, after a lot of googling I've discovered a workaround that works for me.

I've followed https://bugzilla.xfce.org/show_bug.cgi?id=12062 and patched a git version from around May 2018 with a patch to enable control of brightness steps and exponential brightness.

Why is this not in the master branch? The patch is around since 2017 and I think it's a very useful feature to have.

Anyway, thanks for the help. I consider this solved.

Offline

#8 2019-06-10 23:01:23

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

Re: How to stop Power Manager from completely turning off backlight?

Perhaps post a comment in the bug report to keep it active. Glad it works for you.


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.009 seconds, 7 queries executed - Memory usage: 558.97 KiB (Peak: 575.81 KiB) ]