[i945GM] xrandr backlight control is bizarre on Macbook

Bug #367309 reported by Tim Allen
42
This bug affects 6 people
Affects Status Importance Assigned to Milestone
xf86-video-intel
Won't Fix
Low
linux (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: xserver-xorg-video-intel

I'm currently using Jaunty on a second-generation Macbook ("Macbook2,1" in Apple parlance) with an Intel 945GM graphics chip, and have reproduced this issue on Karmic Alpha 2.

I tried switching to each of the available BACKLIGHT_CONTROL methods with "xrandr --output LVDS --set BACKLIGHT_CONTROL $method", then checked the available range with "xrandr --prop" and tried a selection of brightness settings with "xrandr --output LVDS --set BACKLIGHT $value"

When I run "xrandr --prop" the default BACKLIGHT_CONTROL value is "native", whose range of backlight values is the unusual range 0..296. These numbers map to brightnesses as follows:

 - Even numbers from 0 to 40 turn off the backlight.
 - Even numbers from 42 to 296 uniformly increase the brightness to full strength.
 - Odd numbers from 1 to 253 uniformly decrease the brightness from full to very dim.
 - Odd numbers greater than or equal to 255 turn off the backlight.

The end result is that trying to change the brightness with F1 and F2 involves mashing one or the other until you get a brightness level you're willing to put up with and hope that nothing changes it.

The "legacy" BACKLIGHT_CONTROL method has a range of 0..255, where every value produces the same mid-level brightness.

The "combination" BACKLIGHT_CONTROL has a range of 0..148, half the range of the "native" method, and it behaves like half the "native" method too:
 - Numbers from 0 to 20 turn off the backlight.
 - Numbers from 21 to 148 uniformly increase the brightness from very dim to full strength.

The "kernel" BACKLIGHT_CONTROL has a range of 0..0. Setting the backlight value to '0' produces no obvious effect (if the backlight was on, it stays on; if the backlight was off it stays off)

I would be happy if the Intel driver defaulted to "combination" BACKLIGHT_CONTROL on my hardware, since at least that works in a predictable and useful fashion. However, certain patterns make me suspect there's some underlying problem to be fixed - like the fact that the total 'lit' range in 'combination' mode is 127 brightness levels, which seems a far more likely range than 148.

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 9.04
Package: xserver-xorg-video-intel 2:2.7.0-1ubuntu1~xup~1
ProcEnviron:
 PATH=(cuusernameom, user)
 LANG=en_AU.UTF-8
 SHELL=/bin/bash
ProcVersion: Linux version 2.6.28-11-generic (buildd@creusernameed) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #42-Ubuntu SMP Fri Apr 17 01:58:03 UTC 2009
SourcePackage: xserver-xorg-video-intel
Uname: Linux 2.6.28-11-generic x86_64
UnreportableReason: This is not a genuine Ubuntu package

[lspci]
00:00.0 Host bridge [0600]: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub [8086:27a0] (rev 03)
 Subsystem: Intel Corporation Device [8086:7270]
00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller [8086:27a2] (rev 03)
 Subsystem: Intel Corporation Device [8086:7270]

Revision history for this message
Tim Allen (screwtape) wrote :
Geir Ove Myhr (gomyhr)
description: updated
tags: added: 945gm backlight intel jaunty xorg
Geir Ove Myhr (gomyhr)
summary: - xrandr backlight control is bizarre on Macbook 945GM
+ [i945GM] xrandr backlight control is bizarre on Macbook
Bryce Harrington (bryce)
Changed in xserver-xorg-video-intel (Ubuntu):
status: New → Confirmed
Revision history for this message
Aldrin Martoq (amartoq) wrote :

Nice!

I confirm that running this command fixes the bug and the screen brightness works better:
$ xrandr --output LVDS --set BACKLIGHT_CONTROL combination

Maybe (all/some?) macbook models should have BACKLIGHT_CONTROL configured to "combination". However, there is a feature that works in MacOS X that I cannot replicate: If go decrease the brightness all the way down, the LCD light goes off...

I suggest marking this bug as a duplicate of bug #365191.

Revision history for this message
Bernhard (b.a.koenig) wrote :

Thanks Aldrin! That solved my problem as well. Maybe we should join all of those three bugs:

bug 356510
bug 365191
bug 367309

Revision history for this message
tangerine (2wtangerine) wrote :

I filed a new bug which could be related to this issue.
Bug #370773.

Revision history for this message
Drew Snellgrove (forkinme-deactivatedaccount) wrote :

I have a "Macbook2,1" with an Intel 945GM just like the original poster and have been experiencing precisely the same symptoms (all the way down to the behavior of each of the BACKLIGHT_CONTROL methods) as described in this bug since I started using Jaunty sometime in the alphas. I have just been using the "combination" method to get a usable backlight through the following command:

xrandr --output LVDS --set BACKLIGHT_CONTROL combination

Revision history for this message
Slick (slick666) wrote :

I have a Macbook 1,1 and the fix works for me

Revision history for this message
Richard Cavell (richardcavell) wrote :

Just confirming that on my Macbook2,1 the out-of-the-box behaviour of Ubuntu 9.04 is to give chaotic brightness changes when hitting F1/F2, and Aldrin's fix makes it work. This should be part of the installer. Well done Aldrin.

Richard

Revision history for this message
Samuli Seppänen (samuli-seppanen) wrote :

I also can verify this on Macbook 1,1. Also, the "xrandr" command above fixes this issue for me too.

Revision history for this message
Bryce Harrington (bryce) wrote :

[This is an automatic notification.]

A new major version of the -intel driver is now available in Karmic.

This version includes a major reworking of the acceleration
architecture, which resolves a huge number of issues. We do not know
whether it resolves the issue you reported.

Would you mind testing Karmic Alpha-2 and seeing if it is still a
problem? CD ISO images are available here:

  http://cdimages.ubuntu.com/releases/karmic/

If the issue can still be reproduced on karmic, please report here with
your findings, and attach a fresh Xorg.0.log from your test, and we will
be able to forward the bug upstream.

Otherwise, if the bug no longer exists in Karmic, let us know that as
well.

In the off chance you encounter different bugs while attempting to test
Karmic, please report those as new bug reports.

Changed in xserver-xorg-video-intel (Ubuntu):
status: Confirmed → New
status: New → Incomplete
Revision history for this message
Tim Allen (screwtape) wrote :

I burned the Karmic Koala Alpha 2 64-bit desktop image to a CD-RW, booted off it, and tried reproducing the problem using the steps in comment 0:

 - Brightness keys on the keyboard can now turn the backlight off, which was not previously possible.
 - Brightness keys now navigate a reasonably smooth gradient from full-bright to off.
 - xrandr's BACKLIGHT_CONTROL still defaults to 'native'
 - xrandr's BACKLIGHT property, under 'native' control, still exhibits all the
strange odd/even behaviour mentioned in the original comment.

I would say this bug has become less urgent, since my brightness keys now work properly without intervention, but the underlying problem is still present.

Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks for testing, and good news that some of the issues are resolved. Would you mind updating the description of this bug to just discuss the issues that still remain in Karmic? You can edit the description by going to https://bugs.edge.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/367309 and clicking the "Update description / tags" link. This will make it easier to forward the bug upstream for further investigation. Thanks ahead of time.

Revision history for this message
Tim Allen (screwtape) wrote :

I've deleted the references to the brightness-button problems I could not reproduce in Karmic.

description: updated
Bryce Harrington (bryce)
Changed in xserver-xorg-video-intel (Ubuntu):
status: Incomplete → Confirmed
Bryce Harrington (bryce)
tags: added: karmic
Revision history for this message
In , Bryce Harrington (bryce) wrote :
Download full text (3.5 KiB)

Forwarding this bug from Ubuntu reporter Tim Allen:
http://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/367309

[Problem]
"xrandr --prop" shows BACKLIGHT_CONTROL supports a range of values from 0..296, however they do not work as expected

 - Even numbers from 0 to 40 turn off the backlight.
 - Even numbers from 42 to 296 uniformly increase the brightness to full strength.
 - Odd numbers from 1 to 253 uniformly decrease the brightness from full to very dim.
 - Odd numbers greater than or equal to 255 turn off the backlight.

[Original Description]
I'm currently using Jaunty on a second-generation Macbook ("Macbook2,1" in Apple parlance) with an Intel 945GM graphics chip, and have reproduced this issue on Karmic Alpha 2.

I tried switching to each of the available BACKLIGHT_CONTROL methods with "xrandr --output LVDS --set BACKLIGHT_CONTROL $method", then checked the available range with "xrandr --prop" and tried a selection of brightness settings with "xrandr --output LVDS --set BACKLIGHT $value"

When I run "xrandr --prop" the default BACKLIGHT_CONTROL value is "native", whose range of backlight values is the unusual range 0..296. These numbers map to brightnesses as follows:

 - Even numbers from 0 to 40 turn off the backlight.
 - Even numbers from 42 to 296 uniformly increase the brightness to full strength.
 - Odd numbers from 1 to 253 uniformly decrease the brightness from full to very dim.
 - Odd numbers greater than or equal to 255 turn off the backlight.

The end result is that trying to change the brightness with F1 and F2 involves mashing one or the other until you get a brightness level you're willing to put up with and hope that nothing changes it.

The "legacy" BACKLIGHT_CONTROL method has a range of 0..255, where every value produces the same mid-level brightness.

The "combination" BACKLIGHT_CONTROL has a range of 0..148, half the range of the "native" method, and it behaves like half the "native" method too:
 - Numbers from 0 to 20 turn off the backlight.
 - Numbers from 21 to 148 uniformly increase the brightness from very dim to full strength.

The "kernel" BACKLIGHT_CONTROL has a range of 0..0. Setting the backlight value to '0' produces no obvious effect (if the backlight was on, it stays on; if the backlight was off it stays off)

I would be happy if the Intel driver defaulted to "combination" BACKLIGHT_CONTROL on my hardware, since at least that works in a predictable and useful fashion. However, certain patterns make me suspect there's some underlying problem to be fixed - like the fact that the total 'lit' range in 'combination' mode is 127 brightness levels, which seems a far more likely range than 148.

Architecture: amd64
DistroRelease: Ubuntu 9.04
Package: xserver-xorg-video-intel 2:2.7.0-1ubuntu1~xup~1
ProcEnviron:
 PATH=(cuusernameom, user)
 LANG=en_AU.UTF-8ProcVersion: Linux version 2.6.28-11-generic (buildd@creusernameed) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #42-Ubuntu SMP Fri Apr 17 01:58:03 UTC 2009
SourcePackage: xserver-xorg-video-intel
Uname: Linux 2.6.28-11-generic x86_64
UnreportableReason: This is not a genuine Ubuntu package

[lspci]
00:00.0 Host bridge [0600]: Intel Corporat...

Read more...

Revision history for this message
In , Bryce Harrington (bryce) wrote :

Created an attachment (id=28101)
bug-367309-Xorg.0.log

Bryce Harrington (bryce)
Changed in xserver-xorg-video-intel (Ubuntu):
importance: Undecided → Low
Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks Tim, I've forwarded your bug upstream to https://bugs.freedesktop.org/show_bug.cgi?id=22993 - please subscribe to this bug in case upstream needs further information or wishes you to test something. Thanks ahead of time!

Changed in xserver-xorg-video-intel (Ubuntu):
status: Confirmed → Triaged
Changed in xserver-xorg-video-intel:
status: Unknown → Confirmed
Revision history for this message
Richard Cavell (richardcavell) wrote :

Hi,

I'm on a Macbook2,1 with Intel GM945 chipset. I confirm that with Karmic alpha 3, the behaviour of the brightness controls is much better. I cannot, however, turn the backlight all the way off using the hotkeys as Tim claims to have done. This is a minor issue, however. In general, Karmic works *heaps* better with the Intel GMA945 than Jaunty.

Revision history for this message
In , Ivan-albafotonica (ivan-albafotonica) wrote :

I have the same problem on my macbook, made the same test with xrandr with the same results.

The gnome-power-manager brightness applet shows the same behavior, if you move the slider the bl flickers like crazy. AFAIK, it also uses libXrandr.

Revision history for this message
In , Jesse Barnes (jbarnes-virtuousgeek) wrote :

Sounds like the backlight is wired up in a funky way on these platforms. I wonder if there's an ACPI or platform driver available for these machines yet (that would be a kernel driver)?

Revision history for this message
Bryce Harrington (bryce) wrote :

According to upstream, this will need a kernel fix; refiling.

affects: xserver-xorg-video-intel (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
status: Triaged → New
tags: added: xorg-needs-kernel-fix
Revision history for this message
Bernhard (b.a.koenig) wrote :

I had this problem with the old kernel in jaunty, but it's fixed for me in karmic. So maybe we can set to "Fix committed"?

Revision history for this message
Matti Viljanen (direc85) wrote :

Berbhard, what hardware do you have? Also, I think we should have separate bugs for separate releases (what's the usual policy in those cases, anyway?)

I know, I don't have Macbook, but GM965... xserver-xorg-video-intel updated to 2.9.0 today (yesterday?) and the problem is fixed for me now. Bryce Harrington, could you update Karmic and post the results? I'm NOT marking as worksforme, because this is originally Macbook-releated bug.

Revision history for this message
Bernhard (b.a.koenig) wrote :

Yes, I have GM965 but not a Mac. Sorry, I always thought that these symptoms were all one bug, but maybe they are not.

So please some feedback from Mac users!

Revision history for this message
Drew Snellgrove (forkinme-deactivatedaccount) wrote :

I've been using Karmic on my Macbook 2,1 since beta but cannot confirm whether this bug is fixed for me since Karmic can't find a backlight device _at all_. There discussion in the kernel mailing lists about a possible fix for this new issue which is macbook specific. I'll update this bug once I'm done having my eyes burned out.

Changed in linux (Ubuntu):
status: New → Triaged
Revision history for this message
Kevin (campbell-kc) wrote :

I've been using Karmic since Alpha 5, on my Macbook 2,1, and my backlight is not adjustable at all either. The keyboard keys do nothing, and the panel applet reports "Cannot get laptop panel brightness"... Not sure whether this has to do with the kernel/xorg or the new devicekit-power stuff.

Revision history for this message
Drew Snellgrove (forkinme-deactivatedaccount) wrote :

https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/397617 seems to be the bug for the missing backlight. If you could chime in there with your specs and thoughts it might help. The missing backlight is holding up testing of the wonky backlight =)

Changed in xserver-xorg-video-intel:
status: Confirmed → In Progress
Revision history for this message
In , Jesse Barnes (jbarnes-virtuousgeek) wrote :

Just gave Yakui another Mac related backlight bug, maybe he has ideas.

Changed in xserver-xorg-video-intel:
status: In Progress → Confirmed
Revision history for this message
In , yakuizhao (yakui-zhao) wrote :

Hi,
   Now the UMS is not supported again.
   Will you please try the latest xf86 video intel driver and see whether it can work?

   Will you please also attach the output of acpidump, vbios.dump on your box?
   The vbios.dump can be obtained by using the following command:
    1. echo 1 > /sys/devices/pci0000:00/0000:00:02.0/rom
    2. cat /sys/devices/pci0000:00/0000:00:02.0/rom >vbios.dump
    3. echo 0 > /sys/devices/pci0000:00/0000:00:02.0/rom

    the acpidump can be obtained by using the latest acpidump tool, which can be downloaded from(pmtools-20071116):
   >http://www.lesswatts.org/projects/acpi/utilities.php

Thanks.
    Yakui

Changed in xserver-xorg-video-intel:
status: Confirmed → In Progress
Revision history for this message
Bruno Santos (bsantos) wrote :

2.6.32-19-generic seems to have fixed backlight control on my Macbook2,1.

Drew, are you on Lucid to try this out?

Revision history for this message
Drew Snellgrove (forkinme-deactivatedaccount) wrote :

Yes, this is entirely fixed for my Macbook 2,1 using the latest Lucid liveCD! Brightness goes all the way from fully bright to pleasantly off on the lowest notch natively.

I noticed that the highly related bug https://bugs.launchpad.net/bugs/397617 was just marked Fix Released. I believe that fix took care of both bugs.

Revision history for this message
In , Jesse Barnes (jbarnes-virtuousgeek) wrote :

timeout

Revision history for this message
In , Gordon Jin (gordon-jin) wrote :

Please reopen if it exists in KMS.

Bryce Harrington (bryce)
Changed in linux (Ubuntu):
status: Triaged → Fix Released
Changed in xserver-xorg-video-intel:
importance: Unknown → Low
status: In Progress → Won't Fix
Changed in xserver-xorg-video-intel:
importance: Low → Unknown
Changed in xserver-xorg-video-intel:
importance: Unknown → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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