Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't control brightness of MacBook Pro 6,2 LCD screen
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Splooshie123
n00b
n00b


Joined: 16 Apr 2012
Posts: 26

PostPosted: Fri Apr 20, 2012 10:43 am    Post subject: Can't control brightness of MacBook Pro 6,2 LCD screen Reply with quote

Hi.

When I was using Ubuntu, I installed pommed to control the LCD brightness and keyboard backlight and eject key, etc.
In Gentoo, I discovered the ebuild for pommed is horribly outdated so I built pommed from source.

Pommed can successfully change my keyboard backlight and I was able to reverse the function key with it also.
However, I am still unable to change the brightness of the screen.

This is not a problem with pommed. I emerged nvclock and it is also unable to change the brightness.
After that, I emerged macbook-backlight and it is also useless:
Code:
macbook-backlight -s 100
error, cannot find video card

I know that all three programs access some files in /sys (or was it proc?) to change the brightness but the files don't exist. There is nothing related to the lcd backlight in /sys. The only thing I could find was "kbd_backlight" which is for the keyboard backlight. Any ideas why the relevant files are missing?

According to lspci, I have 2 GPUs: intel HD and NVIDIA GeForce GT 330M.
I am using the nouveau driver.
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2070

PostPosted: Fri Apr 20, 2012 12:12 pm    Post subject: Reply with quote

Do you have FB_NVIDIA_BACKLIGHT set in your kernel?
_________________
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Back to top
View user's profile Send private message
Splooshie123
n00b
n00b


Joined: 16 Apr 2012
Posts: 26

PostPosted: Fri Apr 20, 2012 3:49 pm    Post subject: Reply with quote

FB_NVIDIA_BACKLIGHT is not listed in my .config at all.

grep BACKLIGHT /usr/src/linux/.config
Code:
CONFIG_FB_BACKLIGHT=y
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
CONFIG_BACKLIGHT_GENERIC=y
# CONFIG_BACKLIGHT_PROGEAR is not set
CONFIG_BACKLIGHT_APPLE=y
# CONFIG_BACKLIGHT_SAHARA is not set
# CONFIG_BACKLIGHT_ADP8860 is not set
# CONFIG_BACKLIGHT_ADP8870 is not set
# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
CONFIG_DRM_NOUVEAU_BACKLIGHT=y


EDIT: I just took a look at the config for Ubuntu (pommed worked there before) and discovered it had several more BACKLIGHT options, including CONFIG_FB_NVIDIA_BACKLIGHT.
Additionally, I discovered that CONFIG_FB_NVIDIA_BACKLIGHT is hidden in "make menuconfig" unless nvidia framebuffer support is activated.
I'm recompiling the kernel as I speak..........type, I'm recompiling the kernel as I type.
Back to top
View user's profile Send private message
Splooshie123
n00b
n00b


Joined: 16 Apr 2012
Posts: 26

PostPosted: Fri Apr 20, 2012 4:07 pm    Post subject: Reply with quote

Setting CONFIG_FB_NVIDIA_BACKLIGHT didn't help. Or is there something else I need to do?
Back to top
View user's profile Send private message
Splooshie123
n00b
n00b


Joined: 16 Apr 2012
Posts: 26

PostPosted: Tue Nov 06, 2012 11:09 am    Post subject: Reply with quote

Sorry to necro my own thread, but I finally found a solution 7 months later.

The backlight can be changed by echoing a brightness value to the Apple GMUX backlight driver.

Code:
echo 10000 > /sys/class/backlight/gmux_backlight/brightness


Pommed doesn't support this particular driver, but it was trivial to add that support.

I will post the modification later since I'm not on my gentoo box right now.
Back to top
View user's profile Send private message
Splooshie123
n00b
n00b


Joined: 16 Apr 2012
Posts: 26

PostPosted: Wed Nov 07, 2012 9:57 am    Post subject: Reply with quote

Here it is.

Put this file in /path/to/pommed-1.39-source-code/pommed, name it sysfs_backlight.c (replace the original), and compile:

http://pastebin.com/q7pL7xQh
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum