brightness changes twice when using hotkeys

Bug #257827 reported by Juan Pablo Salazar Bertín
130
This bug affects 15 people
Affects Status Importance Assigned to Milestone
Linux
Fix Released
High
Xfce4 Power Manager
Fix Released
High
gnome-power
Unknown
Medium
linux (Ubuntu)
Won't Fix
Medium
Ayan George
Nominated for Lucid by Pavol Klačanský
Intrepid
Fix Released
Medium
Unassigned

Bug Description

When using hotkeys to change screen brightness, it's changed twice. That is, I have 4 different brightness levels, but I should have 8.
When the acpi video module is blacklisted, brightness is changed as expected (I get the 8 levels).

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 8.10
Package: linux-image-2.6.26-5-generic 2.6.26-5.15 [modified: lib/modules/2.6.26-5-generic/modules.pcimap lib/modules/2.6.26-5-generic/modules.dep lib/modules/2.6.26-5-generic/modules.ieee1394map lib/modules/2.6.26-5-generic/modules.usbmap lib/modules/2.6.26-5-generic/modules.isapnpmap lib/modules/2.6.26-5-generic/modules.inputmap lib/modules/2.6.26-5-generic/modules.seriomap lib/modules/2.6.26-5-generic/modules.alias lib/modules/2.6.26-5-generic/modules.symbols]
ProcCmdLine: root=UUID=fba89e7a-4820-478a-881d-e247b5e8fbfc ro quiet
ProcEnviron:
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.26-5.15-generic
SourcePackage: linux

Related branches

Revision history for this message
Juan Pablo Salazar Bertín (snifer) wrote :
Revision history for this message
Juan Pablo Salazar Bertín (snifer) wrote :
Revision history for this message
Nick Ellery (nick.ellery) wrote :

I receive the exact same issue on a Dell Inspiron 1521.

Revision history for this message
Juan Pablo Salazar Bertín (snifer) wrote :
Revision history for this message
Juan Pablo Salazar Bertín (snifer) wrote :

hald verbose output when pressing "brightness down" hotkey:

[8173]: 02:26:17.688 [D] addon-acpi.c:195: event is 'video LCD 00000087 00000000
'
[8173]: 02:26:17.746 [D] addon-acpi.c:195: event is 'video LCD 00000087 00000000
'

Revision history for this message
Juan Pablo Salazar Bertín (snifer) wrote :

Killing gnome-power-manager or stopping hal has no effect in this bug.

Revision history for this message
Juan Pablo Salazar Bertín (snifer) wrote :

It's probably related to this bug upstream: http://bugzilla.kernel.org/show_bug.cgi?id=9614

Changed in linux:
status: Unknown → Confirmed
Changed in linux:
status: Confirmed → Fix Released
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Revision history for this message
Juan Pablo Salazar Bertín (snifer) wrote :

The issue remains.

snifer@snifer-laptop:~$ dpkg -l | grep linux-image-2.6.27-
ii linux-image-2.6.27-1-generic 2.6.27-1.2 Linux kernel image for version 2.6.27 on x86

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

I confirm that I have this problem on Ubuntu Hardy with a DELL XPS M1330 (shipped with Ubuntu).

I only have 3 brightness levels... I blacklisted video as suggested in this thread (http://ge.ubuntuforums.com/showpost.php?s=d308ad71f7d328052c8f6e0b31dd1f6c&p=5569887&postcount=2) and it now works as expected (I have 8 brightness levels).

Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
DSHR (s-heuer) wrote :

I can confirm this on fully updated 8.10 Beta with lenovo Thinkpad X60s

Revision history for this message
DSHR (s-heuer) wrote :

My situation with Brightness Up:

$ lshal -m

Start monitoring devicelist:
-------------------------------------------------
14:27:36.724: computer_logicaldev_input_5 condition ButtonPressed = brightness-up
^C
$ acpi_listen
ibm/hotkey HKEY 00000080 00001010
video LCD0 00000086 00000000

$ xev
KeyPress event, serial 70, synthetic NO, window 0x3e00001,
    root 0x7d, subw 0x0, time 1609093, (753,714), root:(761,762),
    state 0x0, keycode 212 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

Is there anything I can do?
KeyRelease event, serial 70, synthetic NO, window 0x3e00001,
    root 0x7d, subw 0x0, time 1609093, (753,714), root:(761,762),
    state 0x0, keycode 212 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

X11 keyboard is set to xev

root@x60:~# showkey
kb mode was RAW
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
keycode 225 press
keycode 225 release
^Ccaught signal 2, cleaning up...
root@x60:~# showkey -s
kb mode was RAW
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
0xe0 0x54 0xe0 0xd4

Revision history for this message
findepi (piotr-findeisen) wrote :

I can confirm it on Hardy, running kernel 2.6.24-19-generic on Inspiron 1520.

I found that the problem is kernel related:
When pressing Fn+Up/Down once, `cat /proc/apci/event' gives every event twice. (Catting /proc/apci/event is possible only after killing acpid.)

Monitoring key presses with xev or showkey is of no use. I inspected acpid source code and it works like this:
- acpi event is generated by kernel
- acpid reads /proc/acpi/event and for every event read it runs a script (e.g. /etc/acpi/video_brightnessup.sh)
- this scripts runs acpi_fakekey with some argument that passes a synthetic key press to the X server
- X, KDE or Gnome (whatever takes the responsibility) runs an action bound to the key press

So, if the event is generated twice by kernel for one Fn+Up/Down key press, KDE's or Gnome's action is run twice.

What more information can I provide?

Revision history for this message
findepi (piotr-findeisen) wrote :
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Hi Juan,

A patch recently went into the Intrepid kernel as post release update:

commit 8948ecffc8c56009c4580e684d6e385b2bad96df
Author: Matthew Garrett <email address hidden>
Date: Fri Aug 15 13:54:51 2008 -0400

    Input: atkbd - expand Latitude's force release quirk to other Dells

    Bug: #284066

    Dell laptops fail to send key up events for several of their special
    keys. There's an existing quirk in the kernel to handle this, but it's
    limited to the Latitude range. This patch extends it to cover all
    portable Dells.

I'm curious if it might also resolve this issue you have. The kernel with this patch is still making it's way into the intrepid-proposed repository. However, it would be great though if you could test -proposed once it's there - https://wiki.ubuntu.com/Testing/EnableProposed .

Revision history for this message
DSHR (s-heuer) wrote :

I have a couple of problems with my Lenovo X60 special keys - which is an up-to-date intrepid, but was upgraded thru various alphas. I freshly installed 8.10 on a spare lenovo T61 - all works great there. So I'm going to reinstall my X60 as soon as possible and will report here then.

Revision history for this message
Juan Pablo Salazar Bertín (snifer) wrote :

I'm sorry, my laptop has been stolen so I can't test this anymore.

Andy Whitcroft (apw)
Changed in linux:
assignee: ubuntu-kernel-team → apw
status: Triaged → In Progress
Revision history for this message
Andy Whitcroft (apw) wrote :

This looks to have been finally fixed in the upstream commits rooted at as below, which is part of the v2.6.28-rc5 rollup:

    22c13f9d8179f4c9caecfcb60a95214562b9addc

so for Jaunty this should be fixed in the alpha2 snapshot which should contain this kernel.

For intrepid these patches do appear to apply cleanly to our kernel. So we may be able to backport them to that release. In order to do that we would need to get the functionality tested. To that end I have compiled them up and uploaded some test kernels. Could anyone who has hardware affected by the double increase/decrease in brightness retest with kernels from the URL below. Please ensure any testing is without any of the workarounds.

    http://people.ubuntu.com/~apw/lp257827/

Tim Gardner (timg-tpi)
Changed in linux:
assignee: nobody → apw
milestone: none → intrepid-updates
status: New → In Progress
importance: Undecided → Low
Revision history for this message
Andy Whitcroft (apw) wrote :

Following the latest -proposed release of 2.6.27-10.20 I have rebuilt these test kernels based on that snapshot. Replacement .deb's are available at the URL above. Look for the 2.6.27-10.20lp257827apw1 images.

Revision history for this message
Andy Whitcroft (apw) wrote :

SRU Justification:

Impact: Bad brightness handling on a wide range of laptops, plus boot crashes on a number of Samsung laptop.

Fix Description: direct backport of a group of ACPI changes which sort out backlight handling plus prevent non-existant display devices being detected as real.

Patch:
    http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-intrepid.git;a=commit;h=6620210fc1da8a39db88281290a0271d46e57283
    http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-intrepid.git;a=commit;h=ff8ad74bf82886a50cdc6b5ca0671dbe63e7f435
    http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-intrepid.git;a=commit;h=7279cb0e60d00b9fe0ca4292aacd6372f83c495e
    http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-intrepid.git;a=commit;h=2871e0ac9a33e81e9b4c68dd7e10c01ec452360f
    http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-intrepid.git;a=commit;h=971f09bdfb75a9923c61d99af3db1e006a8bc354
    http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-intrepid.git;a=commit;h=78da909520bf8169b7aa57729f5daade4daf76ef
    http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-intrepid.git;a=commit;h=56b51fa2eaf86599058dc905139d810fd847ea58
    http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-intrepid.git;a=commit;h=e525a3ca3b31b63144f177470dcf823bca381327
    http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-intrepid.git;a=commit;h=926f8037764bb44f52005f7ab7f946a62b005c91
    http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-intrepid.git;a=commit;h=4d7a929d3df4589ccb3c23f5ffb2774112c80a82

Risks: testing by a number of affected users has demonstrated successful boot and improvements in brightness handling.

TEST CASE: see bug report.

Revision history for this message
Andy Whitcroft (apw) wrote :

Based on testing on other bugs this fix has been pushed into the Intrepid tree.

Changed in linux:
status: In Progress → Fix Committed
importance: Low → Medium
Revision history for this message
Andy Whitcroft (apw) wrote :

We believe that the fixes indicated on this bug are already applied in Jaunty.

Changed in linux:
status: In Progress → Invalid
Revision history for this message
DSHR (s-heuer) wrote :

Works now correctly for intrepid-proposed with Lenovo X60s. Thanks a lot!

Revision history for this message
Steve Langasek (vorlon) wrote :

Accepted into intrepid-proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Jon Oberheide (jon-oberheide-deactivatedaccount) wrote :

I believe this update broke LCD brightness controls on a number of ThinkPad models (R61i, T61, X300).

See: http://ubuntuforums.org/showthread.php?p=6426872

Revision history for this message
arno_b (arno.b) wrote :

Since the update I have another problem, see: bug 311716

Revision history for this message
Andy Whitcroft (apw) wrote :

@Jon Oberheide -- there is also a gnome brightness appplet update in -proposed which was supposed to fix brighness control on a number of machines. Was your testing there with just the -11 kernel or all of proposed.

Revision history for this message
Steve Beattie (sbeattie) wrote :

@Andy Whitcroft, the -11 kernel broke brightness settings on my t61 as well, I reported it in bug 314119. I am running all of proposed but don't use the gnome-applet; setting it through gnome-power-manager did not work but does work with the -10.20 kernel. Manually echoing values into /proc/acpi/video/VID/LCD0/brightness also doesn't work, which didn't work in -10.20 either, but echoing values in /proc/acpi/video/VID1/LCD0/brightness (note VID1 vs VID) did work in -10.20 to change the screen's brightness, but the /proc/acpi/video/VID1/ path does not exist when the -11.22 kernel is rebooted,

Revision history for this message
Steve Beattie (sbeattie) wrote :

@apw: per our discussion, I tried both separately blacklisting the video module and adding the brightness_enable=1 option to the thinkpad_acpi module.

Blacklisting the video module had no effect; adjusting brightness was broken entirely and even worse, the brightness was set at the lowest setting. g-p-m locked up entirely when trying to adjust the screen brightness.

Adding the brightness_enable=1 option to the thinkpad_acpi module options caused brightness settings to start working; g-p-m was able to adjust the brightness settings. Also, with that option, the directory /sys/devices/virtual/backlight/thinkpad_screen/ showed up, and writing values to the brightness file in that directory changed the display brightness.

Writing values to /sys/devices/virtual/backlight/acpi_video0/brightness had no effect in any of the kernels I booted (with the video module blacklisted, that path did not exist). When the -10.20 kernel is booted, there's also a /sys/devices/virtual/backlight/acpi_video1/ directory; writing values to the brightness file in that directory also adjusted the screen's brightness.

Revision history for this message
Michael Rooney (mrooney) wrote :

It was fixed for awhile after installing proposed updates, but yesterday I installed proposed, I think 2.6.27.11-14, and the double changing is back, which is funny since the changelog specifically mentioned FIXING backlight quirks. Is there an easy way to go back?

Revision history for this message
Guglielmo Cola (guglielmocola) wrote :

I can confirm what Michael Rooney said.
Proposed update solved it, but latest proposed update made the problem reappear. :(

Revision history for this message
Andy Whitcroft (apw) wrote :

@Michael Rooney, Guglielmo Cola -- what machines do you have specifically?

Revision history for this message
Andy Whitcroft (apw) wrote :

We are trying to sort out how this can be fixed properly for Jaunty. As a first step in that I have pulled down the latest modifications to the ACPI brightness support and applied them to the latest Jaunty kernel. If anyone who has had issues, whether they are fixed or not in the Intrepid -proposed kernels, could test these kernels and report back here that would help us evaluate these upstream fixes. Kernels can be found at the URL below:

    http://people.ubuntu.com/~apw/lp257827-jaunty/

Revision history for this message
Guglielmo Cola (guglielmocola) wrote :

Dell Inspiron 1520
running Intrepid Ibex with last proposed updates installed

Revision history for this message
Michael Rooney (mrooney) wrote : Re: [Bug 257827] Re: brightness changes twice when using hotkeys

On Mon, Jan 19, 2009 at 11:32 AM, Andy Whitcroft wrote:

> @Michael Rooney, Guglielmo Cola -- what machines do you have
> specifically?
>

I am on a Dell XPS M1330 with the Nvidia 8400.

Revision history for this message
Martin Pitt (pitti) wrote :

The regression (bug 311716) has been fixed in the current -proposed upload (-11.24):

linux (2.6.27-11.24) intrepid-proposed; urgency=low

  [ Stefan Bader ]

  * Revert "SAUCE: don't use buggy _BCL/_BCM/_BQC for backlight control"
    - LP: #311716
  * SAUCE: acpi: Hack to enable video and vendor backlight implementations
    - LP: #311716
  * SAUCE: Force vendor backlight control on ThinkPad T61
    - LP: #311716

  [ Upstream Kernel Changes ]

  * Revert "thinkpad_acpi: fingers off backlight if video.ko is serving
    this functionality"
    - LP: #311716

Thus this should reintroduce the original bug reported here for many people. It seems we cannot properly fix this without causing regressions for other people. However, with the current -proposed kernel, you can now install local modalias rules to fix your system. (See above). Thus setting back to verification-needed.

Revision history for this message
Michael Rooney (mrooney) wrote :

Hi Martin! I am not familiar with modaliases, which may be why I don't see anything above that could help me. Is there any more explicit fix for users such as myself as Guglielmo? Is it anticipated that all users in our situation will have to discover and address this issue ourselves, or is a fix for us planned as well? I'll try Jaunty and report my findings. Would we be better off creating a new bug report? Sorry for all the questions :)

Revision history for this message
Guglielmo Cola (guglielmocola) wrote :

I've the same questions as Michael. :)

Revision history for this message
Stefan Bader (smb) wrote :

Hi Michael, Guglielmo,

if you use the latest Intrepid kernel from -proposed, could you try adding either

acpi_backlight=video
or
acpi_backlight=vendor

to your kernel parameters, when you boot? In theory one or the other should work for you.

Revision history for this message
Michael Rooney (mrooney) wrote :

Thanks Stefan, acpi_backlight=vendor did the trick for me! Are there any
plans to handle this automatically in any way and/or should Jaunty fix the
issue? I tried myself with Alpha 3 but amd64 installed fine though failed to
boot, and x86 froze on installing.

Changed in linux:
status: Fix Committed → Fix Released
Changed in linux (Ubuntu):
status: Invalid → Incomplete
Rolf Leggewie (r0lf)
tags: added: lucid
Fail2Ban (failtoban)
tags: added: i386
tags: added: verification-done
removed: verification-needed
Steve Langasek (vorlon)
tags: removed: i386
Mitch Towner (kermiac)
tags: added: verification-needed
removed: verification-done
Andy Whitcroft (apw)
Changed in linux (Ubuntu):
assignee: Andy Whitcroft (apw) → nobody
Changed in linux (Ubuntu Intrepid):
assignee: Andy Whitcroft (apw) → nobody
Changed in gnome-power:
status: Unknown → New
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Changed in gnome-power:
importance: Unknown → Medium
tags: added: maverick
38 comments hidden view all 118 comments
Revision history for this message
mlx (myxal-mxl) wrote :

#78> Which one? The only patch I see in your comment #73 are for gnome-power-manager. Not a whole lot useful to a Kubuntu user ;)

Revision history for this message
DΛRK ΘVΞRLΘΛD (dark-overload) wrote :

I can confirm that executing "echo -n N | sudo
tee /sys/module/video/parameters/brightness_switch_enabled" corrects the issue within a logged in X session, but leaves the TTYs and GDM unable to control the screen brightness.

Revision history for this message
Pavol Klačanský (pavolzetor-deactivatedaccount) wrote :

yes, with my patch it works in GNOME and also TTY, KDE may use same system of fixing

Revision history for this message
Brian Rogers (brian-rogers) wrote :

I have put Pavol's patch in a PPA here: https://launchpad.net/~brian-rogers/+archive/power

Just run
sudo add-apt-repository ppa:brian-rogers/power

And then update your system to try it out. It also contains a patch to provide battery life estimates on laptops that don't normally get them.

Revision history for this message
DΛRK ΘVΞRLΘΛD (dark-overload) wrote :

The patch didn't help with the double increment in my case. Still happens.

Revision history for this message
DΛRK ΘVΞRLΘΛD (dark-overload) wrote :

In an effort to track down the bug, I commented out all the code within the gpm_brightness_foreach_resource function and that still did not correct the issue. Killing all gnome-power-manager stops the doubling, so the issue lies within g-p-m. Interestingly enough, the brightness OSD still shows when I use the hot-keys even without g-p-m running. I will continue testing but if anyone has any ideas please share them.

Revision history for this message
Pavol Klačanský (pavolzetor-deactivatedaccount) wrote :

what? I cannot imagine how NotifyOSD can work without gpm running, I think, it is impossible, have you tried gpm with my patch and run it (I have compiled it e.g. to home/stage/gpm)

Revision history for this message
DΛRK ΘVΞRLΘΛD (dark-overload) wrote :

That's the first thing I did. Anyways I think I fixed the issue now but its a very ugly quick-fix. I commented out the calls to change inc/decrement the brightness values when the keys are pressed. I also had to always distrust the cached brightness value (like I said, ugly) to get the OSD to follow the changes in brightness that the kernel makes. As for the OSD still showing with no g-p-m, that was a strange issue, it hasn't happened again. My mangling of the cache trust system seems to have caused no serious bugs, but I've noticed only a couple little things that may or may not have already existed. None of the tiny bugs are as bad as the doubling up on the brightness control though so I can live with it until one of us makes a real patch or the Ubuntu team comes up with a better idea. If you want, I'll email you my changes, but I just don't want to put it online because of how ugly it is.

Revision history for this message
Pavol Klačanský (pavolzetor-deactivatedaccount) wrote :

Yes, it is quite simple to comment it, but there is serious problem, because of there are laptops with correctly working brightness steps, so your patch disables regulation on them

My patch is simple, it watches changes in file in sys and compare it with cached value, so if kernel has changed it, gpm doesn't make another step

Changed in linux:
importance: Unknown → High
13 comments hidden view all 118 comments
Revision history for this message
In , Yves-Alexis Perez (corsac) wrote :

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,

Revision history for this message
In , Evgeni Golov (evgeni) wrote :

Same here on a Thinkpad X201s (Debian Sid) but not on a ASUS eeePC 1008HA (Fedora 14).

Revision history for this message
In , Aliov (aliov) wrote :

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.

Revision history for this message
In , Yves-Alexis Perez (corsac) wrote :

(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.

Revision history for this message
In , Aliov (aliov) wrote :

(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...

Revision history for this message
In , Yves-Alexis Perez (corsac) wrote :

Ok, will report a bug against upower in Debian.

Revision history for this message
In , Yves-Alexis Perez (corsac) wrote :

In the meantime, adding a checkbox in the settings so the user can chose could be a good idea.

Revision history for this message
In , Konstantin Lavrov (lacosta) wrote :

(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

Revision history for this message
In , Hypnos75 (hypnos75) wrote :

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 ...

Revision history for this message
In , Hypnos75 (hypnos75) wrote :

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.

21 comments hidden view all 118 comments
Revision history for this message
Brad Figg (brad-figg) wrote : Unsupported series, setting status to "Won't Fix".

This bug was filed against a series that is no longer supported and so is being marked as Won't Fix. If this issue still exists in a supported series, please file a new bug.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: Confirmed → Won't Fix
22 comments hidden view all 118 comments
Revision history for this message
In , Yves-Alexis Perez (corsac) wrote :

(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...

Revision history for this message
In , Yves-Alexis Perez (corsac) wrote :

(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.

Revision history for this message
In , ChriS (christophe-troestler) wrote :

(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

Revision history for this message
In , Yves-Alexis Perez (corsac) wrote :

(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

Revision history for this message
In , Hypnos75 (hypnos75) wrote :

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.

Revision history for this message
In , Yves-Alexis Perez (corsac) wrote :

(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)

26 comments hidden view all 118 comments
Revision history for this message
DΛRK ΘVΞRLΘΛD (dark-overload) wrote :

Yes this issue still exists, and when it was filed, this series was still supported. In fact, isn't 10.04 a LTS release??? I will not re-file my bug report because nobody on the dev team seems to care... This issue exists all the way up to Ubuntu 11.04. Because of this, I have switched to Fedora (which does not have the bug).

Revision history for this message
Pavol Klačanský (pavolzetor-deactivatedaccount) wrote :

I hate that nobody cares in ubuntu team

Ayan George (ayan)
Changed in linux (Ubuntu):
assignee: nobody → Ayan George (ayan)
Revision history for this message
P Liu (lpc921) wrote :

I have the problem in Ubuntu, Kubuntu, Lubuntu and Mint 11.10 with ThinkPad T520.
Defual 6 steps.
After "echo -n N | sudo tee /sys/module/video/parameters/brightness_switch_enabled"
increased to 9 Steps
In tty with brightness_switch_enabled=Y 16 steps
In tty with brightness_switch_enabled=N not working

xbacklight works flawlessly though.

Revision history for this message
Pavol Klačanský (pavolzetor-deactivatedaccount) wrote :

still here, please add condition into gnome-power-manager to change it only if kernel didn't change it.

Revision history for this message
P Liu (lpc921) wrote :

Does Xfce and KDE also use gnome-power-manager? I'm experience the same problem in Lubuntu and Kubuntu. Brightness change 3 steps at a time.
I found a workaround is to push {Home} and {End} together. That only increases the brightness by 1 step.

Revision history for this message
Pavol Klačanský (pavolzetor-deactivatedaccount) wrote : Re: [Bug 257827] Re: brightness changes twice when using hotkeys

On Ubuntu just kill power manager and it should change only by one steps, but some devices do not support changing brightness without gpm. Easiest fix is just to add some checking to gpm if kernel already changed brightness or not. Gnome guys seem not keen in fixing it.

P Liu <email address hidden> wrote:

>Does Xfce and KDE also use gnome-power-manager? I'm experience the same problem in Lubuntu and Kubuntu. Brightness change 3 steps at a time.
>I found a workaround is to push {Home} and {End} together. That only increases the brightness by 1 step.
>
>--
>You received this bug notification because you are subscribed to the bug
>report.
>https://bugs.launchpad.net/bugs/257827
>
>Title:
> brightness changes twice when using hotkeys
>
>To manage notifications about this bug go to:
>https://bugs.launchpad.net/gnome-power/+bug/257827/+subscriptions

Changed in gnome-power:
status: New → Unknown
Revision history for this message
Alex Wolfson (awolfson) wrote :

There is another bug that looks very similar
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/959106

Revision history for this message
AceLan Kao (acelankao) wrote :

Hi, I noticed this issue from bug 959106, thank Alex Wolfson.
We know this issue and this is not only a issue in userpsace but in kernel, so it's not easy to fix it soon.
We need the code ready in userspace(such as gnome-settings-daemon in gnome) and then we will fix the code in kernel.
But the maintainer of the gnome-settings-daemon didn't accept the patch yet, see bug 959106

Anyway, there is an workaround to fix this, just do
   echo 1 | sudo tee /sys/module/video/parameters/brightness_switch_enabled

Revision history for this message
AceLan Kao (acelankao) wrote :

sorry, it should be
   echo 0 | sudo tee /sys/module/video/parameters/brightness_switch_enabled

Revision history for this message
DΛRK ΘVΞRLΘΛD (dark-overload) wrote :

I have an ugly patch (see earlier comment) somewhere buried in a backup amongst a couple of terabytes of other stuff. I will post it here in a few days, digging it up isn't as simple as typing it in the windows search box, and to be honest I have other things higher on my list of priorities. I want to take the time to learn how to make it into a PPA anyway, because I DO remember that I made a proper modification.

Also keep in mind that I made this patch on my HP G62, for my HP G62, and it is unlikely that it will work like it does on my HP G62 on any other machine.

Revision history for this message
Florian Stoll (flostoll) wrote :

Same problem on Ubuntu 12.04 (3.2.0-26-generic) and Thinkpad T500

echo 0 | sudo tee /sys/module/video/parameters/brightness_switch_enabled

or

echo 4 > /proc/acpi/ibm/cmos
echo 5 > /proc/acpi/ibm/cmos

works -> ~9 brightness steps instead of ~5 steps

dmesg: thinkpad_acpi: detected a 8-level brightness capable ThinkPad

Revision history for this message
Florian Stoll (flostoll) wrote :

xev-tool reports two key events:

MappingNotify event, serial 145, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

MappingNotify event, serial 145, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

MappingNotify event, serial 147, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

MappingNotify event, serial 147, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

16 comments hidden view all 118 comments
Revision history for this message
In , ari (arian-sanusi) wrote :

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.

Revision history for this message
In , Harald Judt (hjudt) wrote :

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.

Changed in xfce4-power-manager:
importance: Unknown → High
status: Unknown → Fix Released
Displaying first 40 and last 40 comments. View all 118 comments or add a comment.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.