Bug 22993 - [945GM UMS] xrandr backlight control is bizarre on Macbook
Summary: [945GM UMS] xrandr backlight control is bizarre on Macbook
Status: RESOLVED WONTFIX
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: 7.4 (2008.09)
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: Carl Worth
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-27 22:11 UTC by Bryce Harrington
Modified: 2010-07-15 17:58 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
bug-367309-Xorg.0.log (365.77 KB, text/plain)
2009-07-27 22:11 UTC, Bryce Harrington
no flags Details

Description Bryce Harrington 2009-07-27 22:11:23 UTC
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 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]
Comment 1 Bryce Harrington 2009-07-27 22:11:52 UTC
Created attachment 28101 [details]
bug-367309-Xorg.0.log
Comment 2 Ivan Stepaniuk 2009-10-01 13:33:39 UTC
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. 
Comment 3 Jesse Barnes 2009-10-05 11:09:55 UTC
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)?
Comment 4 Jesse Barnes 2010-02-05 15:24:21 UTC
Just gave Yakui another Mac related backlight bug, maybe he has ideas.
Comment 5 ykzhao 2010-02-07 20:40:08 UTC
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
Comment 6 Jesse Barnes 2010-07-15 11:23:12 UTC
timeout
Comment 7 Gordon Jin 2010-07-15 17:58:20 UTC
Please reopen if it exists in KMS.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.