Backlight control does not work on MacBook Pro 3.1

Bug #226894 reported by Alexander Jones
44
This bug affects 4 people
Affects Status Importance Assigned to Milestone
HAL
Fix Released
Medium
hal (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Intrepid by Alexander Jones
linux (Ubuntu)
Incomplete
Medium
Unassigned
Nominated for Intrepid by Alexander Jones

Bug Description

1) The Linux module mbp_nvidia_bl needs to be autoloaded to provide the backlight device for the NVidia card in 3.1 and 4.1. The fix for this is detailed here, and this should be carried by us as it currently does not work. http://lkml.org/lkml/2008/9/16/284

Workaround: load the module by other means, either on-demand with modprobe or by adding the line to /etc/modules

2) G-P-M gets confused by the phoney MacBook Laptop Panel HAL device (that is actually dead since the addon providing its services doesn't work for NVidia). Upstream HAL received this fix to only spawn this for the relevant models. http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=95bd4f1bf9a62f1551461841d64f6f1cdea6a92e

Workaround: comment out the <spawn> element for the laptop panel in the file.

Revision history for this message
Alexander Jones (alex-weej) wrote :
Revision history for this message
Alexander Jones (alex-weej) wrote :

I found this pommed commit that is probably what hal is missing:

http://lists.alioth.debian.org/pipermail/pommed-commits/2007-July/000090.html

description: updated
Revision history for this message
In , Martin Pitt (pitti) wrote :

(From Ubuntu bug report:)

From HAL debug output when starting up:
[14434]: 14:13:54.913 [D] addon-macbookpro-backlight.c:535: Failed to detect ATI X1600, aborting...

My card is an NVidia...

On pressing a brightness-up or -down button:

14:14:15.824 [D] hald_dbus.c:3153: udi=/org/freedesktop/Hal/devices/usb_device_5ac_21b_noserial_if0_logicaldev_input

From gnome-power-manager --verbose --debug power:

[hal_device_condition_cb] gpm-button.c:391 (14:19:23): condition=ButtonPressed, details=brightness-up
[emit_button_pressed] gpm-button.c:335 (14:19:23): emitting button-pressed : brightness-up
[button_pressed_cb] gpm-manager.c:996 (14:19:23): Button press event type=brightness-up
[button_pressed_cb] gpm-srv-screensaver.c:167 (14:19:23): Button press event type=brightness-up
[button_pressed_cb] gpm-backlight.c:561 (14:19:23): Button press event type=brightness-up
[gpm_brightness_lcd_get_hw] gpm-brightness-lcd.c:108 (14:19:23): ERROR: Method "GetBrightness" with signature "" on interface "org.freedesktop.Hal.Device.LaptopPanel" doesn't exist

*** WARNING ***
[gpm_brightness_lcd_get_hw] gpm-brightness-lcd.c:113 (14:19:23): GetBrightness failed!
[gpm_brightness_lcd_set_hw] gpm-brightness-lcd.c:155 (14:19:23): Setting 11 of 228
[gpm_brightness_lcd_set_hw] gpm-brightness-lcd.c:165 (14:19:23): ERROR: Method "SetBrightness" with signature "i" on interface "org.freedesktop.Hal.Device.LaptopPanel" doesn't exist

*** WARNING ***
[gpm_brightness_lcd_set_hw] gpm-brightness-lcd.c:170 (14:19:23): SetBrightness failed!
[gpm_brightness_lcd_up] gpm-brightness-lcd.c:362 (14:19:23): emitting brightness-changed (0)
[brightness_changed_cb] gpm-backlight.c:736 (14:19:23): Need to display backlight feedback value 0
[gpm_feedback_display_value] gpm-feedback-widget.c:144 (14:19:23): Displaying 0.000000 on feedback widget
[gpm_refcount_add] gpm-refcount.c:100 (14:19:23): refcount now: 1
[gpm_refcount_add] gpm-refcount.c:101 (14:19:23): non zero, so sending REFCOUNT_ADDED
[brightness_changed_cb] gpm-backlight.c:740 (14:19:23): emitting brightness-changed : 0
[button_pressed_cb] gpm-srv-brightness-kbd.c:139 (14:19:23): Button press event type=brightness-up
[button_pressed_cb] gpm-info.c:698 (14:19:23): Button press event type=brightness-up
[gpm_refcount_auto_decrement] gpm-refcount.c:74 (14:19:25): zero, so sending REFCOUNT_ZERO
[gpm_feedback_close_window] gpm-feedback-widget.c:134 (14:19:25): Closing feedback widget

The pommed project [1] apparently had the same problem. They recently added support for nvidia cards [2], so maybe this could be ported to hal, too?

[1] http://www.technologeek.org/projects/pommed/index.html
[2] http://lists.alioth.debian.org/pipermail/pommed-commits/2007-July/000090.html

Martin Pitt (pitti)
Changed in hal:
status: New → Confirmed
Changed in hal:
status: Unknown → Confirmed
Revision history for this message
Nicolas Rougier (rougier) wrote :

Exact same problem with same output from gnome-power-manager while pommed works perfectly.

Nicolas

Revision history for this message
Alexander Jones (alex-weej) wrote :

xbacklight does not work, and now Pommed and G-P-M don't even detect the key-presses.

Revision history for this message
Luke Yelavich (themuso) wrote :

As of kernel 2.6.27-3-generic, and latest hal in intrepid, with my new MacBook Pro Penryn 4.1, I am able to adjust display brightness with fn + F1/F2, with the mbp_nvidia_bl module loaded. This module enables the controlling of the backlight from userspace, thereby allowing hal to control the brightness just like any other panel.

Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 226894] Re: Backlight control does not work on MacBook Pro 3.1

Further reading of the fdi file for MacBook Pros, I see that machies that are MacBookPro3,1 or earlier will still not work with the new backlight functionality that I have working. The fdi file needs to be rewritten to only add custom backlight keys for those MacBook pro generations that need it, i.e ones that don't have an NVIDIA chip.

Revision history for this message
Alexander Jones (alex-weej) wrote : Re: [Bug 226894] Re: Backlight control does not work on MacBook Pro 3.1

3.1 has NVidia. I am pretty sure that the ATI chip prior to that works...

Revision history for this message
In , Alexander Jones (alex-weej) wrote :
Revision history for this message
Alexander Jones (alex-weej) wrote :

OK, two small fixes to make this work.

description: updated
Changed in hal:
status: Confirmed → Fix Released
Revision history for this message
Henrik Rydberg (rydberg) wrote :

A question regarding addon-macbookpro-backlight, from someone unfamiliar with the hal framework:

Why is the macbookpro-backlight addon reading the chip directly, instead of using the applesmc module?

Revision history for this message
Krzysztof Janowicz (janowicz) wrote :

i just upgraded to intrepid and both F1/F2 screen brightness and F8-F10 keyboard light stopped working. i am running a santa rosa macbook pro.

Revision history for this message
Henrik Rydberg (rydberg) wrote :

The current hal configuration is wrong. The culprit is the hald-addon-macbookpro-backlight, which assumes the ATI graphics card, which MBP3,1 does not have. A similar problem exists for MBP4,1. The MBA1,1 is not even listed.

I have managed to make it work on my MBA by creating a new addon, hald-addon-applesmc, which simply uses the sysfs devices created by applesmc to control the backlight. The same procedure should work for both MBP3,1 and MBP4,1, so I will carry this patch upstream and hope for the best.

If you are interested, I can publish the fdi configuration change and a i386 and/or amd64 binary here for further testing.

Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 226894] Re: Backlight control does not work on MacBook Pro 3.1

As far as I am aware, for MacBook Pro 3,1 and 4,1, the mbp_nvidia_bl module is what is needed to make the backlight usable. I have a 4,1, and with latest hal, my backlight control is broken when I have that module loaded.

I will have a dig in the hal package to see what has been c hanged.

Luke

Revision history for this message
Henrik Rydberg (rydberg) wrote :

Perhaps you can try the new hald-addon-generic-backlight, which is available in the latest HAL upstream. With it, one can configure an fdi file to use a specific sysfs device path.

Revision history for this message
Luke Yelavich (themuso) wrote :

On Thu, Oct 09, 2008 at 09:45:17AM EST, rydberg wrote:
> Perhaps you can try the new hald-addon-generic-backlight, which is
> available in the latest HAL upstream. With it, one can configure an fdi
> file to use a specific sysfs device path.

I would if the controls still didn't work, however my backlight controls started working again all of a sudden. I don't know what was changed, or whether my system needed a reboot at the time, but all seems ok again.

Revision history for this message
Krzysztof Janowicz (janowicz) wrote :

are there any news or workarounds for this bug? the backlight, sound and keybord-light keys still don't work.

Revision history for this message
Alexander Jones (alex-weej) wrote : Re: [Bug 226894] Re: Backlight control does not work on MacBook Pro 3.1

A workaround for both broken components pertaining to the backlight is
posted in the description.
Keyboard light is another bug.

2008/10/15 Krzysztof Janowicz <email address hidden>

> are there any news or workarounds for this bug? the backlight, sound and
> keybord-light keys still don't work.

Revision history for this message
Krzysztof Janowicz (janowicz) wrote :

loading mbp_nvidia_bl does not solve the problem in my case. to change the backlight settings i have to switch to the console (tty). the keys work there without any issues.

Revision history for this message
Henrik Rydberg (rydberg) wrote :

The state of this bug says fix released upstream. If it is fixed, a new bug should be created. If it is not fixed, the state should go back to new. Which one is it?

Revision history for this message
Krzysztof Janowicz (janowicz) wrote :

i don't know, i can just state that it is not fixed for my macbook pro santa rosa (3.1). it worked for a day or two some days ago, but overall it is broken and the only way to control backlight is to do it in the console and then go back to X. same for all other function keys (f3,...).

Revision history for this message
Krzysztof Janowicz (janowicz) wrote :

i just took a short look at ubuntuforums.org using intrepid and backlight as search terms and there are many reports about the same problem (and they are just some days old). hence, imo the bug is not 100% fixed yet.

Revision history for this message
Alexander Jones (alex-weej) wrote :

It is fixed upstream in HAL *and* in the Linux kernel. Everything current is
in the bug description.

Revision history for this message
Henrik Rydberg (rydberg) wrote :

The patch removes MacBookPro3,1 from the list using the macbookpro addon, which is good since the addon does not work for that machine, and as stated, should be picked up by the nvidia backlight driver. But there could be other reasons for the backlight not to work, could there not?

On a different note, the patch also adds the newer macbooks to the keyboard backlight interface, but that interface is provided by the same macbookpro addon, and hence wont work. (https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/125918).

Revision history for this message
Alexander Jones (alex-weej) wrote :

The only other reason is that the kernel module is not autoloaded. Again
it's fixed in more recent kernels.

Revision history for this message
Henrik Rydberg (rydberg) wrote :

The problem is not entirely fixed by the HAL upstream commit; see https://bugs.launchpad.net/ubuntu/+source/hal/+bug/285815.

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

This hal bit is fixed by having the latest upstream in Jaunty.

Changed in hal:
status: Confirmed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Is this still an issue in current Jaunty, i. e. is the module autoloaded now?

Changed in linux:
status: New → Incomplete
Revision history for this message
Amir Mlk (a-malekpour-gmail) wrote :

MacBook Pro v.3 (Santa Rosa) running Ubuntu 8.10 , kernel 2.6.27-11-generic , has problems with backlight.
The module "mbp_nvidia_bl" does not load by default. Loading the module manually and writing the desired back-light value (a number between 1 to 15) to /sys/class/backlight/mbp_backlight/brightness solves the problem. (You need to "sudo -i" )
Note that when you connect the laptop to power, the back-light goes back to the default value (i guess 15) , in which case you have to set it to 15 and then set it to your desired value the way I mentioned above.

Revision history for this message
Eric Miao (eric.y.miao) wrote :

Could you please run apport-collect -p 2.6.27-11-generic #<this-bug-number> if you are running Ubuntu 8.10, or the corresponding kernel package name if you are running other version. And pay especial attention to the output of dmidecode and see if your current MBP has a match there. Currently in Jaunty (9.04) it supports 3.1, 3.2 and 4.1 only.

You can also try the latest Karmic to see if this has been resolved. Thanks for your report.

Changed in linux (Ubuntu):
assignee: nobody → Eric Miao (eric.y.miao)
importance: Undecided → Medium
Revision history for this message
Boniek (boniek12p) wrote :

Unfortunately it seems this bug is still an issue. Can you confirm this issue exists with the most recent Lucid Lynx 10.04 release - http://cdimage.ubuntu.com/releases/lucid/alpha-2/. If the issue remains in Lucid, please test the latest 2.6.32 upstream kernel build - https://wiki.ubuntu.com/KernelMainlineBuilds . Let us know your results. Thank

Revision history for this message
Colin D Bennett (colinb) wrote :

I have a MacBook Pro 5,1 and my LCD backlight stopped working in Karmic after some package update a couple months ago. The Fn keys work but as the notification bubble brightness bar changes, the LCD backlight brightness does not change (it's fixed at the maximum level).

I inserted the mbp_nvidia_bl kernel module and voila! I can echo N to /sys/class/backlight/mbp_backlight/brightness to now adjust it. However, the Fn keys have no effect.

Revision history for this message
Alexander Jones (alex-weej) wrote : Re: [Bug 226894] Re: Backlight control does not work on MacBook Pro 3.1

MacBook Pro 5,4 requires nvidia_bl_dkms (NOT mbp_nvidia_bl_dkms) from the
Karmic Mactel PPA. Come on it's not too late to slip this fix in to the main
lucid release!

On 16 March 2010 18:48, Colin D Bennett <email address hidden> wrote:

> I have a MacBook Pro 5,1 and my LCD backlight stopped working in Karmic
> after some package update a couple months ago. The Fn keys work but as
> the notification bubble brightness bar changes, the LCD backlight
> brightness does not change (it's fixed at the maximum level).
>
> I inserted the mbp_nvidia_bl kernel module and voila! I can echo N to
> /sys/class/backlight/mbp_backlight/brightness to now adjust it.
> However, the Fn keys have no effect.
>
> --
> Backlight control does not work on MacBook Pro 3.1
> https://bugs.launchpad.net/bugs/226894
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Boniek (boniek12p) wrote :

Can you confirm that bug on Lucid Live Cd?

summary: - Backlight control does not work on MacBook Pro 3.1
+ Backlight control does not work on MacBook Pro 5.1
Revision history for this message
Alexander Jones (alex-weej) wrote :

I personally cannot test 3.1 anymore but I can tell you that 5.4 does not
work out of the box as of Sunday night updates.

By the way, no need to remove 3.1 from the bug summary...

On 16 March 2010 20:18, Boniek <email address hidden> wrote:

> Can you confirm that bug on Lucid Live Cd?
>
> ** Summary changed:
>
> - Backlight control does not work on MacBook Pro 3.1
> + Backlight control does not work on MacBook Pro 5.1
>
> --
> Backlight control does not work on MacBook Pro 5.1
> https://bugs.launchpad.net/bugs/226894
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Colin D Bennett (colinb) wrote : Re: Backlight control does not work on MacBook Pro 5.1

Ok, the LCD backlight control does work with the Lucid alpha 3 live CD. It works great -- the brightness range of the indicator bar on screen matches the apparent range of backlight brightness (before, when it was working on Karmic, the ranges were out of sync).

A little off topic, but this was my first test with Lucid, and I did have some other issues on the Lucid live CD, though. I tried to install the nvidia-current driver so I could see if it was working, but I couldn't get it to load. I did install the dkms package but I couldn't load the kernel module since the noveau module was installed. I tried to log out to a text login screen by logging out to the GDM screen and switching to a text VT to restart GDM, but I could not switch to another VT. From the GDM screen, pressing Fn-Control-Alt-F1 caused only my mouse cursor to disappear, but it did not switch from the graphical screen. I pressed Fn-Control-Alt-F7 and my cursor reappeared. I logged back in as ubuntu and *wow* my desktop reappeared instantly. gnome-screensaver crashed when I pressed a key to return to the desktop from the blank screen after inactivity.

Revision history for this message
Boniek (boniek12p) wrote :

Ok, I'm changing this bug to confirmed as 5.4 seem not to work.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Gorka Navarrete (emrys) wrote :

After a new Lucid installation backlight control does not work. Not after installing the nvidia_bl_dkms package and adding the line "nvidia_bl shift=2" to /etc/modules...

The funny thing was that I previously did an upgrade from Karmic and backlight control was working fine (better than in karmic).

This is in a MBP 5,3 64 bits.

Changed in hal:
importance: Unknown → Medium
Changed in hal:
importance: Medium → Unknown
Changed in hal:
importance: Unknown → Medium
Revision history for this message
Gorka Navarrete (emrys) wrote :

In Oneiric this works fine. Don't know if we should close it then?

Revision history for this message
Lars Noodén (larsnooden) wrote :

The backlight controls do not work on a MacBookPro8.2 with Precise.

Revision history for this message
Jochen Fahrner (jofa) wrote :

I have the same problem on a MacBook 5,1 with Precise.

Revision history for this message
penalvch (penalvch) wrote :

Alexander Jones, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please test for this with the latest development release of Ubuntu? ISO CD images are available from http://cdimage.ubuntu.com/releases/ .

If it remains an issue, could you please run the following command in the development release from a Terminal (Applications->Accessories->Terminal), as it will automatically gather and attach updated debug information to this report:

apport-collect -p linux <replace-with-bug-number>

Also, could you please test the latest upstream kernel available following https://wiki.ubuntu.com/KernelMainlineBuilds ? It will allow additional upstream developers to examine the issue. Please do not test the kernel in the daily folder, but the one all the way at the bottom. Once you've tested the upstream kernel, please comment on which kernel version specifically you tested and remove the tag:
needs-upstream-testing

This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the text:
needs-upstream-testing

If this bug is fixed in the mainline kernel, please add the following tags:
kernel-fixed-upstream
kernel-fixed-upstream-VERSION-NUMBER

where VERSION-NUMBER is the version number of the kernel you tested.

If the mainline kernel does not fix this bug, please add the following tags:
kernel-bug-exists-upstream
kernel-bug-exists-upstream-VERSION-NUMBER

If you are unable to test the mainline kernel, please comment as to why specifically you were unable to test it and add the following tags:
kernel-unable-to-test-upstream
kernel-unable-to-test-upstream-VERSION-NUMBER

Please let us know your results. Thank you for your understanding.

tags: added: needs-kernel-logs needs-upstraem-testing
removed: apport-bug
summary: - Backlight control does not work on MacBook Pro 5.1
+ Backlight control does not work on MacBook Pro 3.1
Changed in linux (Ubuntu):
assignee: Eric Miao (eric.y.miao) → nobody
status: Confirmed → Incomplete
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/226894

tags: added: iso-testing
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.