Bug 5570 - apple_bl module does not support Macbook Pro 8,2 laptops
Summary: apple_bl module does not support Macbook Pro 8,2 laptops
Status: RESOLVED WORKSFORME
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 2
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Thomas Backlund
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-23 18:20 CEST by Andy Liebman
Modified: 2012-06-02 15:59 CEST (History)
1 user (show)

See Also:
Source RPM: kernel
CVE:
Status comment:


Attachments
Apple gmux backlight drivers (6.91 KB, text/plain)
2012-04-23 18:22 CEST, Andy Liebman
Details
A script to raise and lower the backlight values (1.65 KB, application/octet-stream)
2012-04-23 18:25 CEST, Andy Liebman
Details
Alternate apple_bl.c file (9.20 KB, text/x-csrc)
2012-04-24 15:57 CEST, Andy Liebman
Details
Makefile for apple_bl.c (160 bytes, application/octet-stream)
2012-04-24 15:57 CEST, Andy Liebman
Details
apple_gmux.c (6.45 KB, text/x-csrc)
2012-04-24 15:58 CEST, Andy Liebman
Details
Makefile for apple_gmux.c (163 bytes, application/octet-stream)
2012-04-24 15:58 CEST, Andy Liebman
Details
A script to raise and lower the backlight values (1.65 KB, text/plain)
2012-04-24 16:03 CEST, Andy Liebman
Details

Description Andy Liebman 2012-04-23 18:20:22 CEST
Macbook Pro 8,2 and 8,3 notebooks with ATI Radeon graphics have an unusual kind of backlight that requires the "gmux" driver.  I don't really understand all the details.  However, I found a substitute "apple_bl" and "apple_gmux" driver for Ubuntu.  


Downloaded deb packages from Ubuntu maintainer:

http://ppa.launchpad.net/sforshee/apple-bl-gmux/ubuntu/pool/main/a/

Explanation here:
https://wiki.ubuntu.com/Kernel/AppleGmuxBacklight


I used alien to convert the deb to rpm and installed it.  It's a dkms package but it didn't work in Mageia.  However, I was able to fix the Makefile (in the included attachment) and just compile it with "make" and it works and allows me now to control the Apple backlight on these computers. 

I don't know if substituting THIS apple_bl driver will break the standard apple_bl driver that comes with the 3.3.3 kernel.  I compiled both the apple_bl and apple_gmux drivers and put them in /lib/modules/3.3.3.../extra and, after removing /lib/modules/3.3.3.../kernel/drivers/video/backlight/apple_bl.ko.. I ran depmod -a and this driver works. 

When I run: 

modprobe apple_bl
modprobe apple_gmux

I get a new listing at 

/sys/class/backlight/gmux_backlight/brightness

I'm not suggesting putting this in Mageia 2.  You probably have too much to worry about right now.  But you might want to do something with this in the future.
Comment 1 Andy Liebman 2012-04-23 18:22:39 CEST
Created attachment 2079 [details]
Apple gmux backlight drivers
Comment 2 Andy Liebman 2012-04-23 18:25:34 CEST
Created attachment 2080 [details]
A script to raise and lower the backlight values

This script was originally written for ubuntu, to be used with the standard apple backlight (apple_bl) which has values of 0-15.  The gmux driver seems to take values from 0 - 110000, so you need much bigger increments.
Comment 3 Manuel Hiebel 2012-04-24 02:20:49 CEST
Maybe you can attach

Assignee: bugsquad => tmb

Comment 4 Andy Liebman 2012-04-24 15:57:18 CEST
Created attachment 2093 [details]
Alternate apple_bl.c file
Comment 5 Andy Liebman 2012-04-24 15:57:48 CEST
Created attachment 2094 [details]
Makefile for apple_bl.c
Comment 6 Andy Liebman 2012-04-24 15:58:19 CEST
Created attachment 2095 [details]
apple_gmux.c
Comment 7 Andy Liebman 2012-04-24 15:58:47 CEST
Created attachment 2096 [details]
Makefile for apple_gmux.c
Comment 8 Andy Liebman 2012-04-24 15:59:30 CEST
Not sure what you wanted me to attach.  I had previous attached the driver source files in a single zip file, but here they are individually.
Comment 9 Andy Liebman 2012-04-24 16:03:28 CEST
Created attachment 2097 [details]
A script to raise and lower the backlight values

I am re-attaching the script to raise/lower the backlight values.  I have adpated it from the original script to reference the new location of the backlight sys file.

Attachment 2080 is obsolete: 0 => 1

Comment 10 Manuel Hiebel 2012-04-24 16:11:05 CEST
arf sorry it was for the dmesg, but it seems not necessarily
Comment 11 Marja Van Waes 2012-05-26 13:05:40 CEST
Hi,

This bug was filed against cauldron, but we do not have cauldron at the moment.

Please report whether this bug is still valid for Mageia 2.

Thanks :)

Cheers,
marja

Keywords: (none) => NEEDINFO

Comment 12 Andy Liebman 2012-06-02 15:47:15 CEST
I think you should close this bug, but only after reading the following: 

This is NO LONGER  A PROBLEM for Mageia 2.  I am not sure how Mageia solved the problem but I installed Mageia 2 on the Macbook 8,2 laptop and the backlight is working. 

I see that the Mageia 3.3.6 kernel does NOT have the apple_gmux module, but for some reason the apple_bl module must just be working.  I confirmed that if I go to 

       cd /sys/class/backlight/apple_backlight/  

and run 

       echo 10 > brightness

or 

       echo 15 > brightness

I am able to bring the brightness up and down.  This did NOT work in beta versions of Mageia 2. 

Note that in Kubuntu 12.04, they have patched in the apple_gmux driver into their kernel and adjusting /sys/class/backlight/apple_backlight/brightness has NO EFFECT on Kubuntu.  On Kubuntu, you need to adjust the value for the gmux_backlight 

So, this is a bit confusing, but somehow it's working in Mageia.  I'm not saying the Kubuntu approach is the right one.  Perhaps support for the new backlight was properly patched into the 3.3 kernel, whereas Kubuntu 12.04 is still using the 3.2 kernel?

Version: Cauldron => 2

Comment 13 Sander Lepik 2012-06-02 15:59:11 CEST
So i'm closing it as worksforme, feel free to reopen if needed.

Keywords: NEEDINFO => (none)
Status: NEW => RESOLVED
CC: (none) => sander.lepik
Resolution: (none) => WORKSFORME


Note You need to log in before you can comment on or make changes to this bug.