[i915][kms] kernel backlight interface missing for macbooks

Bug #511965 reported by Steffen Röcker on 2010-01-24
48
This bug affects 8 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Unassigned
Nominated for Lucid by Steffen Röcker

Bug Description

There is no /sys/class/backlight interface for Macbooks.

The module mbp_nvidia_bl only supports Macbook Pro, though the method for Macbook with intel graphics is the same.

ProblemType: Bug
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.21.
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: sroecker 2205 F.... pulseaudio
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0x90440000 irq 22'
   Mixer name : 'SigmaTel STAC9221 A1'
   Components : 'HDA:83847680,106b0a00,00103401'
   Controls : 21
   Simple ctrls : 13
Date: Sun Jan 24 17:21:05 2010
DistroRelease: Ubuntu 10.04
EcryptfsInUse: Yes
HibernationDevice: RESUME=UUID=4c22a4c3-51e3-449e-adff-5ce9e5da4e87
IwConfig:
 lo no wireless extensions.

 eth0 no wireless extensions.

 pan0 no wireless extensions.
MachineType: Apple Computer, Inc. MacBook1,1
Package: linux-image-2.6.32-11-generic 2.6.32-11.15
ProcCmdLine: root=UUID=76362543-a575-496a-b4dc-83283e6de93e ro
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=de_DE.UTF-8
 LANGUAGE=de_DE.UTF-8
ProcVersionSignature: Ubuntu 2.6.32-11.15-generic
Regression: No
RelatedPackageVersions: linux-firmware 1.28
Reproducible: Yes
RfKill:
 1: hci0: Bluetooth
  Soft blocked: no
  Hard blocked: no
SourcePackage: linux
TestedUpstream: No
Uname: Linux 2.6.32-11-generic i686
WpaSupplicantLog:

dmi.bios.date: 10/12/06
dmi.bios.vendor: Apple Computer, Inc.
dmi.bios.version: MB11.88Z.0061.B03.0610121324
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: Mac-F4208CC8
dmi.board.vendor: Apple Computer, Inc.
dmi.board.version: PVT
dmi.chassis.asset.tag: Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: Apple Computer, Inc.
dmi.chassis.version: Mac-F4208CC8
dmi.modalias: dmi:bvnAppleComputer,Inc.:bvrMB11.88Z.0061.B03.0610121324:bd10/12/06:svnAppleComputer,Inc.:pnMacBook1,1:pvr1.0:rvnAppleComputer,Inc.:rnMac-F4208CC8:rvrPVT:cvnAppleComputer,Inc.:ct10:cvrMac-F4208CC8:
dmi.product.name: MacBook1,1
dmi.product.version: 1.0
dmi.sys.vendor: Apple Computer, Inc.

Steffen Röcker (sroecker) wrote :
Steffen Röcker (sroecker) wrote :

Here is a patch for MacBook1,1.

This method should work for all intel macbooks.
If you patch xserver-xorg-video-intel like in bug #417770
the brightness hotkeys work again.

tags: added: backlight i915 patch

This modification indeed makes mpb_backlight module available in /sys/class/backlight, modifying brightness works as promised. This is on macbook 3.1.

Changed in linux (Ubuntu):
status: New → Confirmed
Surbhi Palande (csurbhi) on 2010-02-05
Changed in linux (Ubuntu):
importance: Undecided → Low
importance: Low → Medium
Surbhi Palande (csurbhi) wrote :

@sroecker, I cannot see this patch upstream in Linus tree. Have you submitted it upstream ? If not, can you submit the patch upstream. Here is a link which tells you about the procedure to do so, in case you need it:
https://wiki.ubuntu.com/KernelTeam/KernelPatches.

Surbhi Palande (csurbhi) on 2010-03-26
Changed in linux (Ubuntu):
status: Confirmed → In Progress
Andy Whitcroft (apw) on 2010-03-30
Changed in linux (Ubuntu):
status: In Progress → Fix Committed
Steffen Röcker (sroecker) wrote :

Did you cherry-pick 36bc5ee6a8d13333980fa54e97d3469d3d4cda98 ?
You should include http://lkml.org/lkml/2010/3/23/412 which fixes this for MacBook1,1.

Launchpad Janitor (janitor) wrote :
Download full text (3.3 KiB)

This bug was fixed in the package linux - 2.6.32-19.28

---------------
linux (2.6.32-19.28) lucid; urgency=low

  [ Andy Whitcroft ]

  * [Config] enable various multitouch devices
    - LP: #541453

  [ Chase Douglas ]

  * (pre-stable): input: ALPS - Add signature for HP Pavilion dm3 laptops
    - LP: #545307
  * SAUCE: Disable function tracing after hitting __schedule_bug
  * SAUCE: Reduce ACPI resource conflict message to KERN_INFO, printf
    cleanup
    - LP: #440470

  [ Jesse Barnes ]

  * SAUCE: drm/i915: don't change DRM configuration when releasing load
    detect pipe
    - LP: #488328

  [ John Johansen ]

  * SAUCE: AppArmor: Remove null_profile's use of PFLAG_NO_LIST_REF
    - LP: #539437
  * SAUCE: AppArmor: Stop page allocation warnings that can occur on policy
    load
    - LP: #458299
  * SAUCE: AppArmor: Return string len rather than the allocation size
    - LP: #551844
  * SAUCE: AppArmor: Fix oops in profile verification if profile unpack
    fails.

  [ Luke Yelavich ]

  * [Config] Enable Nouveau DRM module on powerpc

  [ Stefan Bader ]

  * SAUCE: Pull in thinkpad-acpi from v2.6.34-rc1
    - LP: #357673
  * [Config] Enable thinkpad-acpi ALSA volume control
    - LP: #357673

  [ Steve Conklin ]

  * SAUCE: drm/i915: Disable FBC on 915GM and 945GM
    - LP: #492392, #539609

  [ Upstream Kernel Changes ]

  * Revert "(pre-stable) drm/i915: blacklist lid status: Sony VGN-BX196VP,
    Dell Inspiron 700m"
    - LP: #515246
  * (pre-stable) softlockup: Stop spurious softlockup messages due to
    overflow
    - LP: #551068
  * backlight: mbp_nvidia_bl - add five more MacBook variants
    - LP: #511965
  * drm/nv04-nv40: Fix up the programmed horizontal sync pulse delay.
    - LP: #529130
  * drm/nouveau: Fix fbcon corruption with font width not divisible by 8
    - LP: #544739
  * (pre-stable) USB: fix usbfs regression
  * drm/radeon/bo: add some fallback placements for VRAM only objects.
    - LP: #507148
  * drm/radeon/kms: don't print error on -ERESTARTSYS.
    - LP: #507148
  * Input: add the ABS_MT_PRESSURE event
    - LP: #541453
  * HID: Support for 3M multitouch panel
    - LP: #541453
  * HID: make 3M PCT touchscreen driver standalone config option
    - LP: #541453
  * HID: add support for Stantum multitouch panel
    - LP: #541453
  * HID: make Stantum driver standalone config option
    - LP: #541453
  * HID: add support for Acer T230H multitouch
    - LP: #541453
  * HID: add support for Pixart Imaging Optical Touch Screen
    - LP: #541453
  * HID: fixed bug in single-touch emulation on the stantum panel
    - LP: #541453
  * HID: add pressure support for the Stantum multitouch panel
    - LP: #541453
  * HID: Support for MosArt multitouch panel
    - LP: #541453
  * HID: hid-ntrig add multi input quirk and clean up
    - LP: #541453
  * HID: n-trig: remove unnecessary tool switching
    - LP: #541453
  * HID: hid-ntrig: multitouch cleanup and fix
    - LP: #541453
  * HID: hid-ntrig: Single touch mode tap
    - LP: #541453
  * hid: ntrig touch events
    - LP: #541453
  * (pre-stable) x86-32, resume: do a global tlb flush in S4 resume
    - LP: #531309
  * drm/i915: Part of: Add initial bits for VGA mode...

Read more...

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
Steffen Röcker (sroecker) wrote :

Not working with MacBook1,1 , MacBook Pro 1,1 and potentially other MacBooks not in the kernel module. (see bug 397617)

Changed in linux (Ubuntu):
status: Fix Released → Incomplete
Benoit Garret (benoit.garret) wrote :

As asked in bug 397617:

$ sudo dmidecode -s system-manufacturer
Apple Computer, Inc.
$ sudo dmidecode -s system-product-name
MacBook1,1
$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)

Eric (etmeek) wrote :

Requested information from bug 397617:

$ sudo dmidecode -s system-manufacturer
Apple Computer, Inc.
$ sudo dmidecode -s system-product-name
MacBookPro1,1
$ lspci | grep VGA
01:00.0 VGA compatible controller: ATI Technologies Inc M56P [Radeon Mobility X1600]

Aldrin Martoq (amartoq) wrote :

I confirm patch patch mentioned in comment #5 works wonderfully in my Macbook1,1 (first gen white macbook).
That patch is not included in latest kernel (linux-image-2.6.32-21-generic 2.6.32-21.32).

$ sudo dmidecode -s system-manufacturer
Apple Computer, Inc.
$ sudo dmidecode -s system-product-name
MacBook1,1
$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)

How to test:
$ sudo apt-get install linux-source
$ cd /tmp/ && tar xvfj /usr/src/linux-source* && cd linux-source-*
<< apply patch here to drivers/video/backlight/mbp_nvidia_bl.c >>
$ make oldconfig && make prepare && make scripts
$ cp /lib/modules/$(uname -r)/build/Module.symvers .
$ make M=drivers/video/backlight
$ sudo insmod drivers/video/backlight/mbp_nvidia_bl.ko
<< restart X, F1/F2 controls should be working >>

Benoit Garret (benoit.garret) wrote :

Thanks Aldrin, I can confirm the instructions in comment #10 for applying the patch in comment #5 work flawlessly on my MacBook 1,1

Benoit Garret (benoit.garret) wrote :

As an appendix to the instructions posted by Aldrin in comment #11, if you want to install the module in a more permanent way, replace the last step (sudo insmod ...) by this:
$ uname -r > include/config/kernel.release
$ sudo make M=drivers/video/backlight modules_install

Benoit Garret (benoit.garret) wrote :

I forgot a step in my previous post:
$ sudo depmod -a

Eric (etmeek) wrote :

adding the below to my drivers/video/backlight/mbp_nvidia_bl.c fixed the problem for me on my MacBookPro1,1 after recompiling and inserting the module

 {
  .callback = mbp_dmi_match,
  .ident = "MacBookPro 1,1",
  .matches = {
   DMI_MATCH(DMI_SYS_VENDOR, "Apple Computer, Inc."),
   DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro1,1"),
  },
  .driver_data = (void *)&intel_chipset_data,
 },

madbiologist (me-again) wrote :

The code Eric mentions in comment 14 has been added in the upstream kernel tree, along with similar code for other MacBookPro's, and will hopefully be included in kernel 2.6.35.

Jeremy Foshee (jeremyfoshee) wrote :

This bug report was marked as Incomplete and has not had any updated comments for quite some time. As a result this bug is being closed. Please reopen if this is still an issue in the current Ubuntu release http://www.ubuntu.com/getubuntu/download . Also, please be sure to provide any requested information that may have been missing. To reopen the bug, click on the current status under the Status column and change the status back to "New". Thanks.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kj-expired
Changed in linux (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers