# Can't control brightness of MacBook Pro 6,2 LCD screen

## Splooshie123

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:

```
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.

----------

## avx

Do you have FB_NVIDIA_BACKLIGHT set in your kernel?

----------

## Splooshie123

FB_NVIDIA_BACKLIGHT is not listed in my .config at all.

grep BACKLIGHT /usr/src/linux/.config

```
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.

----------

## Splooshie123

Setting CONFIG_FB_NVIDIA_BACKLIGHT didn't help. Or is there something else I need to do?

----------

## Splooshie123

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.

```
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.

----------

## Splooshie123

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

----------

