Bug 310591 - 4.10 Beta1: Brightness slider in battery applet not working at alla
Summary: 4.10 Beta1: Brightness slider in battery applet not working at alla
Status: RESOLVED UPSTREAM
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: powermanagement (show other bugs)
Version: 4.10.5
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Dario Freddi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-24 02:40 UTC by Christian (Fuchs)
Modified: 2015-02-16 12:37 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian (Fuchs) 2012-11-24 02:40:32 UTC
The brightness slider in the battery popup is at the lowest level, sliding it makes the OSD appear, but the brightness doesn't change. 

Changing it via keyboard works, but that is not done in software. The slider used to work in previous (4.9.*) KDE versions, aside from some known bugs (brightness changes getting reset etc.) 

The combination here might be a bit of an issue: it is an IBM t410 thinkpad with thinkpad_acpi (which has its own thing, but provides a working /sys/class/backlight/acpi_video0/brightness) with an nvidia card and the most recent (310.19) nvidia driver, which provides (slightly broken) brightness setting via xrandr. 
As I don't have different hardware with 4.10 Beta at hand, I can't say whether it is not working in general or just for this setup. 

Reproducible: Always

Steps to Reproduce:
1. Use above mentioned hardware (yes, hard to reproduce) 
2. Open the battery applet popup 
3. Try to use slider to adjust brightnes
Actual Results:  
Slider does nothing

Expected Results:  
Slider works
Comment 1 Luca 2012-12-28 17:37:35 UTC
The same for me but I am using KDE 4.9.4.
When I click on the battery indicator applet and try to change the brightness moving the slider, immediately the OSD showing the brightness level appears.

Thank you.
Luca
Comment 2 Benjamin Xiao 2013-01-06 20:35:31 UTC
I have this issue as well. I am running a Lenovo W510 with Kubuntu 12.10. It has KDE 4.10 RC2 and Nvidia drivers 310.19.

In previous versions of KDE, I was able to get the KDE brightness controls working by adding the Xorg option "RegistryDwords" "EnableBrightnessControl=1", but it seems like that does not work anymore.
Comment 3 Christian (Fuchs) 2013-01-06 20:38:56 UTC
(In reply to comment #2)
> I have this issue as well. I am running a Lenovo W510 with Kubuntu 12.10. It
> has KDE 4.10 RC2 and Nvidia drivers 310.19.

The problem here is that nvidia recently enabled XRandR brightness control in their drivers, which, however, doesn't work for all cards, and mainly not for ones in thinkpads, which use their own interface. 

As a workaround I "patched" powerdevil to fall back to the brightness helper even when XRandR support is available. This works here on my thinkpad T410. 

It would be nice to have a way to force powerdevil to do that at runtime, being it a hidden config option or whatnot. Obviously it is not powerdevils fault if graphic card manufacturers mess up the drivers, but for the end user it would be nice to have a workaround. 

Please do report this to nvidia as well, hopefully they will either fix their drivers or give us an Xorg.conf option to disable XRandR brightness support, so powerdevil will fall back to other means.
Comment 4 Lukas Schneiderbauer 2013-02-09 11:29:34 UTC
Same issue here with a thinkpad w510.

(In reply to comment #3)
> As a workaround I "patched" powerdevil to fall back to the brightness helper
> even when XRandR support is available. This works here on my thinkpad T410.
Please, can you provide this patch or give instructions how to workaround it? :)
Comment 5 Christian (Fuchs) 2013-02-09 17:54:07 UTC
I'd rather see a real solution either in the nvidia drivers (that would be best), e.g. the possibility to disable this feature, or in powerdevil as in "having a (hidden) config option to force a given backlight helper". 

If you want to work around it (please note that this is a very ugly workaround): 
Edit powerdevil/daemon/backends/upower/
It has two times a 

 if (m_brightnessControl->isSupported()) {

which is close to lines 184 and 213. There you have an else condition, which is the fallback to the brightness helper. Either remove the if/else condition and the block in the if, so that always the code in the else block is executed, or make sure that always the else path is chosen. 

As said, a real solution either from nvidia (preferred) or on powerdevil (would have the nice side effect that people could enforce whatever backlight system they prefer) would be preferred.
Comment 6 Lukas Schneiderbauer 2013-02-09 19:50:54 UTC
Thanks for this. Actually this does not "fix" the _whole_ issue here. Now the slider and the fn-keys (controlling the brightness) are working but only independently!. The fn-keys do not change the slider state as it used to be.
Maybe it is worth mentioning that I'm using the nvidia-driver 313.18.
Comment 7 Alex Fiestas 2013-03-03 17:47:46 UTC
This happens with the latest 4.10 release, right?
Comment 8 Christian (Fuchs) 2013-03-03 17:56:44 UTC
(In reply to comment #7)
> This happens with the latest 4.10 release, right?

Yes.
Comment 9 Ukyoi 2013-05-14 03:58:51 UTC
I think this is caused by a kernel update because it works on my Arch LTS kernel and I remember it worked before.

On my Thinkpad X200, I can change the brightness by Fn Keys and Powerdevil. But the HUD won't appear when I use keys and Powerdevil doesn't know the brightness has changed.
Comment 10 Lukas Schneiderbauer 2013-05-14 10:29:50 UTC
(In reply to comment #9)
> I think this is caused by a kernel update because it works on my Arch LTS
> kernel and I remember it worked before.
So which kernel version (official version, not distro version) is working, which is not?

> On my Thinkpad X200, I can change the brightness by Fn Keys and Powerdevil.
> But the HUD won't appear when I use keys and Powerdevil doesn't know the
> brightness has changed.
I'm confused. Is this your definition of "working" or "not working"?
I mean.. in the previous sentence you tell that it's working for you and in this sentence you basically say, it's not working.. ?
Comment 11 Ukyoi 2013-05-14 15:32:49 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > I think this is caused by a kernel update because it works on my Arch LTS
> > kernel and I remember it worked before.
> So which kernel version (official version, not distro version) is working,
> which is not?
> 
> > On my Thinkpad X200, I can change the brightness by Fn Keys and Powerdevil.
> > But the HUD won't appear when I use keys and Powerdevil doesn't know the
> > brightness has changed.
> I'm confused. Is this your definition of "working" or "not working"?
> I mean.. in the previous sentence you tell that it's working for you and in
> this sentence you basically say, it's not working.. ?

Excuse my poor English. Actually the behavior is different with the bug description in my environment.

It's works pretty well with kernel 3.0.

In the newest kernel (3.9), Fn keys can adjust the brightness level. But it seems powermanagement cannot *catch* the operation and show the OSD notification.

This issue firstly comes out with a kernel upgrade and I can't remember the exact kernel version. But I'm sure it can be repeated on version 3.9.
Comment 12 Lukas Schneiderbauer 2013-05-19 12:42:29 UTC
(In reply to comment #11)
> It's works pretty well with kernel 3.0.
I can't confirm this with kernel 3.0.78. Same for me as with kernel 3.9.1. (nvidia-drivers-319.17)

> In the newest kernel (3.9), Fn keys can adjust the brightness level. But it
> seems powermanagement cannot *catch* the operation and show the OSD
> notification.
Same here.
Comment 13 Lukas Schneiderbauer 2013-06-10 17:35:28 UTC
I just notice the status is "NEEDSINFO WAITINGFORINFO".
So what info do you need?
Comment 14 Christoph Feck 2013-06-24 09:29:33 UTC
The information that was requested has been provided with comment #8.
Comment 15 Christian (Fuchs) 2013-06-30 15:55:52 UTC
Well, unfortunately (or fortunately?) I switched hardware, and it works for me with my t430 in 4.11. So if somebody with a old t410 could comment ... else this can probably be marked as fixed in 4.11. 

Thanks :)
Comment 16 Lukas Schneiderbauer 2013-07-30 19:31:19 UTC
Sorry, but this bug is not fixed for me (a thinkpad w510) !
Comment 17 Alex Fiestas 2013-07-30 22:31:19 UTC
Lukas, do you have KDE 4.10.5 or 4.11? if not, can you grab a liveusb/cd and test it?
Comment 18 Lukas Schneiderbauer 2013-07-31 11:05:55 UTC
(In reply to comment #17)
> Lukas, do you have KDE 4.10.5 or 4.11? 
Yes, I do use 4.10.5.

> if not, can you grab a liveusb/cd and
> test it?
I tried Kubuntu 13.10 Alpha 2 to test the 4.11 RC but the live cd uses the nouveau driver and I don't know how to change that (if it's possible at all).
Comment 19 Christoph Feck 2013-08-10 13:49:24 UTC
Reopen based on comment #18.
Comment 20 Jekyll Wu 2013-08-10 23:42:48 UTC
Christoph forgot to reopen the report in comment #19 ...
Comment 21 Marc Schiffbauer 2013-08-14 23:51:55 UTC
For me it stopped working in KDE 4.11 and it worked fine in KDE 4.10.5
x11-drivers/nvidia-drivers 325.15

I cannot even see the brightness slider..
Comment 22 Lukas Schneiderbauer 2013-08-17 10:01:55 UTC
I'm also on kde sc 4.11 now and the issue still persists. No difference symptomwise.
Comment 23 Lukas Schneiderbauer 2013-09-26 13:47:09 UTC
I think I got one step further to explain this weird behaviour.

KDE is recognizing the Fn-Up key press and does the right thing: it increases the monitor brightness by a few percent (and shows the OSD).

but KDE is _not_ recognizing the Fn-Down key press as such! The monitor brightness is changed though (through another mechanismn I don't know/understand).

The result is that KDE still thinks your monitor is at 100% brightness-level although your monitor may actually be at 20% brightness-level (because you lowered it with the fn-down key) and when you press the Fn-Up key afterwards KDE recognizes this button and sets the brightness-level again to 100% of course.

Why do I think KDE doesn't recognize the Fn-Down key button? If I go to "Global Keyboard Shortcuts"-settings and try to select a custom shortcut for an arbitrary action the Fn-Down key is not recognized while Fn-Up key is recognized as "Monitor Brightness Up".

So it's not a failure in kde's powermanagement system but in the key-mapping.
Any thoughts how to solve this?
Comment 24 Marc Schiffbauer 2013-09-26 14:06:04 UTC
For me the problem is, that it *finally* worked find with KDE 4.10.5 (Not 100% sure about the version where it last worked...) and now under 4.11 (latest branch) is not working anymore AT ALL.

When it was NOT working before I saw a brightness slieder which did not work and now there is no brightness slider visible.

Maybe we are talking about different problems. For it seems that the applet does not recognize that my screen brighness can be set...

I tried global shortcuts as well: For me *both* keys are recognized when I choose a custom shortcut somewhere. ANd it told me about a conflict because the shortcut is in use somewhere else.
Comment 25 Lukas Schneiderbauer 2013-09-26 14:57:13 UTC
(In reply to comment #24)
> Maybe we are talking about different problems.
I agree with you.


btw: I got it working playing around with the thinkpad_acpi module.
Comment 26 Kai Uwe Broulik 2015-02-16 12:37:05 UTC
Most likely a hardware/driver issue.