! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
don't set the brightness if the platform already does it by itself
Status:
RESOLVED: FIXED
Product:
Xfce4-power-manager
Component:
General

Comments

Description Yves-Alexis Perez editbugs 2011-04-27 12:53:11 CEST
This is a regression in 1.0 so setting the severity to major.

In the (hal based) 0.8 branch, when on a platform which handles the brightness itself (wether in the EC or in the kernel), xfpm was only showing the notification. It did the brightness change itself only in case nothing else could do that.

In 1.0, this is not the case anymore. In my case, (a Dell latitude E4300 and I guess a ThinkPad T61 which both have an Intel GMA965 video card) the brightness is handled by the ACPI video driver, directly with the card. There's no need for a userland application to set it itself. But xfpm still tries (and suceeds) to do it, so each time I press the brightness up key, the brightness level is upped twice. Same goes for brightness down.

I'm not too sure how you did manage to detect if the brightness was already handled in xfpm 0.8, maybe it was hal providing the information, but it'd be nice to have that back.

Regards,
Comment 1 Evgeni Golov 2011-04-27 13:20:24 CEST
Same here on a Thinkpad X201s (Debian Sid) but not on a ASUS eeePC 1008HA (Fedora 14).
Comment 2 Ali Abdallah editbugs 2011-05-05 14:14:51 CEST
Very bad, HAL had an info about that, it seems now there is no easy way of doing it, unless i export the HAL code that does that to xfpm... i think it is the only one solution available.
Comment 3 Yves-Alexis Perez editbugs 2011-05-05 21:35:02 CEST
(In reply to comment #2)
> Very bad, HAL had an info about that, it seems now there is no easy way of
> doing it, unless i export the HAL code that does that to xfpm... i think it is
> the only one solution available.

Hmhm, do you know how gnome-power-manager does it? That's something worth adding to upower anyway.
Comment 4 Ali Abdallah editbugs 2011-05-12 11:34:13 CEST
(In reply to comment #3)
> (In reply to comment #2)
> > Very bad, HAL had an info about that, it seems now there is no easy way of
> > doing it, unless i export the HAL code that does that to xfpm... i think it is
> > the only one solution available.
> 
> Hmhm, do you know how gnome-power-manager does it? That's something worth
> adding to upower anyway.

I think gnome-power-manager has the same problem, they will no add it to upower, since they are refusing to add any code related to brightness to upower, but what is funny is that recent versions of upower has KbdBacklight interface, i suggest that you (distributions) start putting pressure on upower developers so they can re-add brightness interface, when i was pushing for this i was the only one complaining...
Comment 5 Yves-Alexis Perez editbugs 2011-05-12 12:23:02 CEST
Ok, will report a bug against upower in Debian.
Comment 6 Yves-Alexis Perez editbugs 2011-05-12 21:03:09 CEST
In the meantime, adding a checkbox in the settings so the user can chose could be a good idea.
Comment 7 Konstantin Lavrov 2011-05-18 08:48:44 CEST
(In reply to comment #4)

> I think gnome-power-manager has the same problem, they will no add it to
> upower, since they are refusing to add any code related to brightness to
> upower, but what is funny is that recent versions of upower has KbdBacklight
> interface, i suggest that you (distributions) start putting pressure on upower
> developers so they can re-add brightness interface, when i was pushing for this
> i was the only one complaining...

In fact gnome-power-manager has it, and not only this issue. But patched gnome-power-manager (https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/527157) solves everething with brightness for my LG X110(MSI WIND clone).

That patch add /apps/gnome-power-manager/backlight/brightness_in_hardware key.

(In reply to comment #6)
> In the meantime, adding a checkbox in the settings so the user can chose could
> be a good idea.

Indeed
Comment 8 Hypnos 2011-06-11 17:21:41 CEST
On my Lenovo X301 (Gentoo kernel 2.6.38 w/ thinkpad_acpi, xfpm 1.0.10), I get the following behaviors:

1) 16 levels in text console using the brightness keys
2) 16 levels in the brightness panel applet using the scroll widget
3) 6 (=0th + (16-mod(16,3))/3) levels using the brightness keys in X

Now, if I set video.brightness_switch_enabled=0 in my kernel params:

1) No brightness adjustment in text console
2) Panel applet still gives 16 levels
3) The brightness keys give 9 levels (=0th + 16/2) in X

So before the backlight adjustment was getting tripled, now it is doubled.  One was ACPI, another is xfpm, what is the third which is still active?  Setting brightness_enable=0 for the thinkpad_acpi modules does not affect anything ...
Comment 9 Hypnos 2011-06-11 17:40:40 CEST
OK, after blacklisting the thinkpad_acpi module I now get 16 levels with the brightness keys in X via xfpm.

However, now in addition to not being able to adjust brightness in a text console, I cannot turn off my bluetooth radio.

It seems that the kernel ACPI handles things properly, which is why I got the correct behavior in text console with my stock setup.  However, for some reason in under X, brightness adjustments are being invoked in both ACPI video and thinkpad_acpi if they are enabled.  I recall that with the old xfpm in XFCE 4.6 I had only 8 brightness levels in the OSD.

So it seems that the situation is not as simple as ACPI and RandR making the same adjustments.
Comment 10 Yves-Alexis Perez editbugs 2011-07-30 23:55:54 CEST
(In reply to comment #6)
> In the meantime, adding a checkbox in the settings so the user can chose could
> be a good idea.

Any news on this? It's quite annoying right now...
Comment 11 Yves-Alexis Perez editbugs 2011-07-31 00:11:23 CEST
(In reply to comment #10)
> (In reply to comment #6)
> > In the meantime, adding a checkbox in the settings so the user can chose could
> > be a good idea.
> 
> Any news on this? It's quite annoying right now...

Replying to myself: it seems that there's an xfconf key change-brightness-on-key-events which one can set to false in order to prevent xfpm to touch the brightness. Problem is that the notification seems a bit confused by that, but at least it brings the 16 levels back.
Comment 12 ChriS 2011-07-31 00:50:35 CEST
(In reply to comment #11)
>
> Replying to myself: it seems that there's an xfconf key
> change-brightness-on-key-events which one can set to false in order to prevent
> xfpm to touch the brightness. Problem is that the notification seems a bit
> confused by that, but at least it brings the 16 levels back.

Could you say where we can find this key?
$ xfconf-query -c xfce4-power-manager -l
/xfce4-power-manager/brightness-level-on-battery
/xfce4-power-manager/brightness-on-ac
/xfce4-power-manager/brightness-on-battery
/xfce4-power-manager/critical-power-action
/xfce4-power-manager/critical-power-level
/xfce4-power-manager/dpms-enabled
/xfce4-power-manager/dpms-on-battery-off
/xfce4-power-manager/dpms-on-battery-sleep
/xfce4-power-manager/enable-cpu-freq-control
/xfce4-power-manager/general-notification
/xfce4-power-manager/inactivity-on-ac
/xfce4-power-manager/inactivity-on-battery
/xfce4-power-manager/lid-action-on-ac
/xfce4-power-manager/lid-action-on-battery
/xfce4-power-manager/power-button-action
/xfce4-power-manager/show-tray-icon
/xfce4-power-manager/sleep-button-action
/xfce4-power-manager/spin-down-on-battery
Comment 13 Yves-Alexis Perez editbugs 2011-07-31 00:55:51 CEST
(In reply to comment #12)
> (In reply to comment #11)
> >
> > Replying to myself: it seems that there's an xfconf key
> > change-brightness-on-key-events which one can set to false in order to prevent
> > xfpm to touch the brightness. Problem is that the notification seems a bit
> > confused by that, but at least it brings the 16 levels back.
> 
> Could you say where we can find this key?
> $ xfconf-query -c xfce4-power-manager -l
> /xfce4-power-manager/brightness-level-on-battery
> /xfce4-power-manager/brightness-on-ac
> /xfce4-power-manager/brightness-on-battery
> /xfce4-power-manager/critical-power-action
> /xfce4-power-manager/critical-power-level
> /xfce4-power-manager/dpms-enabled
> /xfce4-power-manager/dpms-on-battery-off
> /xfce4-power-manager/dpms-on-battery-sleep
> /xfce4-power-manager/enable-cpu-freq-control
> /xfce4-power-manager/general-notification
> /xfce4-power-manager/inactivity-on-ac
> /xfce4-power-manager/inactivity-on-battery
> /xfce4-power-manager/lid-action-on-ac
> /xfce4-power-manager/lid-action-on-battery
> /xfce4-power-manager/power-button-action
> /xfce4-power-manager/show-tray-icon
> /xfce4-power-manager/sleep-button-action
> /xfce4-power-manager/spin-down-on-battery

It doesn't exist by default, you have to create it:


xfconf-query -c xfce4-power-manager -n -t bool -p /xfce4-power-manager/change-brightness-on-key-events -s false
Comment 14 Hypnos 2011-07-31 04:52:42 CEST
Yves-Alexis,

Thank you so much for researching this solution.  I can confirm that it works on my Thinkpad X301, giving 16 brightness levels, provided that the ACPI brightness switch is enabled.

And, the progress bar on the brightness OSD is blank (i.e., shows zero level), which is probably what you were referring to.
Comment 15 Yves-Alexis Perez editbugs 2011-07-31 09:21:01 CEST
(In reply to comment #14)
> Yves-Alexis,
> 
> Thank you so much for researching this solution.  I can confirm that it works
> on my Thinkpad X301, giving 16 brightness levels, provided that the ACPI
> brightness switch is enabled.
> 
> And, the progress bar on the brightness OSD is blank (i.e., shows zero level),
> which is probably what you were referring to.

Exactly, there's another hidden xfconf key you might want to tune: /xfce4-power-manager/show-brightness-popup (it disable completely the notifications)
Comment 16 arian 2012-08-31 12:22:56 CEST
It was already proposed to add a checkbox for wether xfpm should control display brightness. That was over a year ago but it did not appear - developers could you please add this, along with a short description what problem it fixes? It's bad enough that display brightness setting cannot work with all computers correctly - having to dig into bug reports to correct this is inacceptable when there are actually that two xfconf settings that you can use to correct behaviour.
Comment 17 Harald Judt 2014-08-14 13:32:41 CEST
Please update to 1.3.1 or git HEAD, this should be fixed. There is a new option for handling brightness keys, try this. If not, reopen.

Bug #7541

Reported by:
Yves-Alexis Perez
Reported on: 2011-04-27
Last modified on: 2014-08-14

People

Assignee:
Ali Abdallah
CC List:
9 users

Version

Version:
1.0.10

Attachments

Additional information