You are not logged in.

#1 2010-09-17 16:46:30

MrAllan
Member
Registered: 2008-12-08
Posts: 132

[SOLVED] MacBook Pro - adjust screen brightness

Hi,

I'm using a MacBook Pro 5,5 and the latest kernel. Adjusting the screen brightness doesn't work yet. When I log into the console (but don't start X), I can adjust the screen brightness with this module. I also tried out Allan's instructions, which doesn't work either (the PKGBUILD doesn't compile).

How can I solve this problem?

-- MrAllan

Last edited by MrAllan (2010-12-27 18:23:47)

Offline

#2 2010-09-17 17:17:02

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [SOLVED] MacBook Pro - adjust screen brightness

Use nvidia-bl instead, install pommed.

(possibly adjust settings in /etc/pommed.conf)


ᶘ ᵒᴥᵒᶅ

Offline

#3 2010-09-17 17:26:59

MrAllan
Member
Registered: 2008-12-08
Posts: 132

Re: [SOLVED] MacBook Pro - adjust screen brightness

litemotiv wrote:

Use nvidia-bl instead, install pommed.

(possibly adjust settings in /etc/pommed.conf)

Same thing - I can change the brightness from the console, but not when X is running.

Offline

#4 2010-09-17 17:34:05

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [SOLVED] MacBook Pro - adjust screen brightness

In X, if you open a console (xterm or other), change to root and then issue:

$ echo 256 > /sys/class/backlight/nvidia_backlight/brightness

Does anything happen?


ᶘ ᵒᴥᵒᶅ

Offline

#5 2010-09-17 19:29:49

MrAllan
Member
Registered: 2008-12-08
Posts: 132

Re: [SOLVED] MacBook Pro - adjust screen brightness

litemotiv wrote:

In X, if you open a console (xterm or other), change to root and then issue:

$ echo 256 > /sys/class/backlight/nvidia_backlight/brightness

Does anything happen?

Yes! The backlight's intensity changes depending on the value.

Offline

#6 2010-09-17 19:37:10

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [SOLVED] MacBook Pro - adjust screen brightness

Have a look at pommed.conf, try this for the sysfs control:

# sysfs backlight control
# nVidia machines, will fall back to nv8600gmt if not supported by the kernel
lcd_sysfs {
        # The sysfs backlight control is a generic interface provided
        # by the Linux kernel for backlight control on most graphic cards.
        # The brightness range can differ depending on the hardware.

        # initial backlight level [12] (0 - 15, -1 to disable)
        init = 640
        # step value (1 - 2)
        step = 64
        # backlight level when on battery [6] (1 - 15, 0 to disable)
        on_batt = 640
}

ᶘ ᵒᴥᵒᶅ

Offline

#7 2010-09-17 20:05:04

MrAllan
Member
Registered: 2008-12-08
Posts: 132

Re: [SOLVED] MacBook Pro - adjust screen brightness

litemotiv wrote:

Have a look at pommed.conf, try this for the sysfs control:

# sysfs backlight control
# nVidia machines, will fall back to nv8600gmt if not supported by the kernel
lcd_sysfs {
        # The sysfs backlight control is a generic interface provided
        # by the Linux kernel for backlight control on most graphic cards.
        # The brightness range can differ depending on the hardware.

        # initial backlight level [12] (0 - 15, -1 to disable)
        init = 640
        # step value (1 - 2)
        step = 64
        # backlight level when on battery [6] (1 - 15, 0 to disable)
        on_batt = 640
}

Thanks, but this doesn't do anything. (Unless restarting the pommed daemon isn't enough to apply the changes.)

Offline

#8 2010-09-17 20:09:29

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [SOLVED] MacBook Pro - adjust screen brightness

That's really strange.. pommed itself does work, i.e. your keyboard backlight etc?


ᶘ ᵒᴥᵒᶅ

Offline

#9 2010-09-17 21:20:34

MrAllan
Member
Registered: 2008-12-08
Posts: 132

Re: [SOLVED] MacBook Pro - adjust screen brightness

litemotiv wrote:

That's really strange.. pommed itself does work, i.e. your keyboard backlight etc?

Yes.

EDIT: I don't know if it matters, but I can only execute the command you posted above ("echo 256 > /sys/class/backlight_nvidia_backlight/brightness") when I'm the super-user. Doing so as a normal user results in "Permission denied".

Last edited by MrAllan (2010-09-17 21:25:57)

Offline

#10 2010-09-17 21:31:51

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [SOLVED] MacBook Pro - adjust screen brightness

My only conclusion is: if pommed works, and the manual backlight control works, then it must be a config problem with pommed. If all else fails you could write your own little brightness script, but really this should just work (i have the exact same machine)..

edit: to your addition above, as long as you also start pommed as root this is okay.

Last edited by litemotiv (2010-09-17 21:33:19)


ᶘ ᵒᴥᵒᶅ

Offline

#11 2010-09-17 21:55:52

MrAllan
Member
Registered: 2008-12-08
Posts: 132

Re: [SOLVED] MacBook Pro - adjust screen brightness

litemotiv wrote:

My only conclusion is: if pommed works, and the manual backlight control works, then it must be a config problem with pommed. If all else fails you could write your own little brightness script, but really this should just work (i have the exact same machine)..

edit: to your addition above, as long as you also start pommed as root this is okay.

Would you mind sharing your pommed.conf? I'm using the stock one (copied from pommed.conf.mactel), but maybe there's still something wrong with it.

Offline

#12 2010-09-17 23:33:27

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,473
Website

Re: [SOLVED] MacBook Pro - adjust screen brightness

http://allanmcrae.com/packages/nvidia-b … src.tar.gz

That is the version I am currently using.

Offline

#13 2010-09-18 07:34:31

MrAllan
Member
Registered: 2008-12-08
Posts: 132

Re: [SOLVED] MacBook Pro - adjust screen brightness

Allan wrote:

http://allanmcrae.com/packages/nvidia-b … src.tar.gz

That is the version I am currently using.

Installed it, but I have the same problem again: I can change the brightness when X is not running, but I can't when it is. This is really strange.

P.S.: Thanks for your efforts, litemotiv and Allan.

Last edited by MrAllan (2010-09-18 07:35:04)

Offline

#14 2010-09-18 08:45:44

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [SOLVED] MacBook Pro - adjust screen brightness

MrAllan wrote:

Would you mind sharing your pommed.conf? I'm using the stock one (copied from pommed.conf.mactel), but maybe there's still something wrong with it.

I'm using stock too, with the changes i posted above (brightness steps of 64 instead of 1, since the sysfs entry goes to 1023 instead of 15).


ᶘ ᵒᴥᵒᶅ

Offline

#15 2010-10-08 13:56:23

deticxe
Member
Registered: 2010-10-08
Posts: 9

Re: [SOLVED] MacBook Pro - adjust screen brightness

I'm having the same issue with the same model; mbp 5,5. Adusting manually works, but the function keys don't change the brightness level.  The keyboard backlight worked (with the problems that Allan Mcrae describes) without a pommed.conf.  Creating a pommed.conf stopped the keyboard backlight from working.

pommed.conf:
http://pastebin.com/btAjDyhy

Offline

#16 2010-11-06 23:13:05

faj
Member
Registered: 2010-11-06
Posts: 4

Re: [SOLVED] MacBook Pro - adjust screen brightness

litemotiv wrote:
MrAllan wrote:

Would you mind sharing your pommed.conf? I'm using the stock one (copied from pommed.conf.mactel), but maybe there's still something wrong with it.

I'm using stock too, with the changes i posted above (brightness steps of 64 instead of 1, since the sysfs entry goes to 1023 instead of 15).

I don't what macbook you're using but on mine (7.1, the one released mid-2010) the max brightness setting is 44000. Had a little trouble with this too, 'cause when the brightness i reduced with 1/44000 it's really hard to notice (even when I tried "step = 64" i.e. 64/44000). And really confused when the screen went "totally black" (well, not really) when switched. to battery...

This is my settings, give it a try.

lcd_sysfs {
        # initial backlight level [12] (0 - 15, -1 to disable)
        init = -1
        # step value (1 - 2)
        step = 800
        # backlight level when on battery [6] (1 - 15, 0 to disable)
        on_batt = 1800
}

Offline

#17 2010-12-27 18:23:25

MrAllan
Member
Registered: 2008-12-08
Posts: 132

Re: [SOLVED] MacBook Pro - adjust screen brightness

OK, so I finally found a solution. In my /sys/class/backlight directory, there were two directories: mbp_backlight/ and nvidia_backlight/. What actually changed the screen brightness was inside the nvidia_backlight/ directory. The mbp_backlight/ directory was completely dead. So I downloaded the pommed source code and replaced all the "mbp_backlight" references with "nvidia_backlight" references. I can now change the screen brightness when X is running.

If you also want to do this, add the following line as the second line (after the cd command) to your PKGBUILD build() section:

find . -name "*" -exec sed -i 's/mbp_backlight/nvidia_backlight/' '{}' \;

Offline

Board footer

Powered by FluxBB