You are not logged in.

#1 2011-03-01 17:39:29

hijinks
Member
Registered: 2011-03-01
Posts: 10

Screen Backlight on Macbook Pro Aluminium

I have everything up and running nicely but my screen is really dark and everything I tried won't work. My graphic card is


01:00.0 VGA compatible controller: nVidia Corporation GT216 [GeForce GT 330M] (rev a2)

I have pommed installed and working for keyboard backlights and even the volumn +/-/mute work. I get the graphic when I go to change by brightness but nothing happens.

Any help?

Last edited by hijinks (2011-03-01 19:08:28)

Offline

#2 2011-03-01 18:48:36

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

Re: Screen Backlight on Macbook Pro Aluminium

Do you have entries for the backlight under /sys/class/backlight/ ?


ᶘ ᵒᴥᵒᶅ

Offline

#3 2011-03-01 18:50:19

hijinks
Member
Registered: 2011-03-01
Posts: 10

Re: Screen Backlight on Macbook Pro Aluminium

[root@host backlight]# ls
nvidia_backlight
[root@host backlight]# ls nvidia_backlight
actual_brightness  bl_power  brightness  max_brightness  power  subsystem  uevent

Also if I do

[root@host backlight]# echo 2000 > /sys/class/backlight/nvidia_backlight/brightness 
[root@host backlight]# 

Nothing changes on my screen.

Last edited by hijinks (2011-03-01 19:08:14)

Offline

#4 2011-03-01 18:54:09

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

Re: Screen Backlight on Macbook Pro Aluminium

Can you try if it works outside X? If it does, then you need to add:

Option         "RegistryDwords" "EnableBrightnessControl=1"

to the device section in your xorg.conf.


ᶘ ᵒᴥᵒᶅ

Offline

#5 2011-03-01 19:17:30

hijinks
Member
Registered: 2011-03-01
Posts: 10

Re: Screen Backlight on Macbook Pro Aluminium

It does not work outside of X and I tried adding that anyway and restarting X and no luck.. anything else to try?

Offline

#6 2011-03-01 19:21:38

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

Re: Screen Backlight on Macbook Pro Aluminium

Ok next try. smile Do you have one of the backlight modules from AUR installed (nvidia-bl or mbp-nvidia-bl)?

If not, install nvidia-bl first and retry the same steps (check /sys/class/backlight first). If it doesn't work, try the same with mbp-nvidia-bl. It might be a good idea to restart your laptop first after installing one of those modules.


ᶘ ᵒᴥᵒᶅ

Offline

#7 2011-03-01 19:29:55

hijinks
Member
Registered: 2011-03-01
Posts: 10

Re: Screen Backlight on Macbook Pro Aluminium

I have nvidia-bl installed.. restarted many times.. I can't find mbp-nvidia-bl in AUR

Offline

#8 2011-03-01 20:02:35

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

Re: Screen Backlight on Macbook Pro Aluminium

Did you already have nvidia-bl installed when you started? In that case, be sure to also try without it.

Also check the value of the max_brightness entry, make sure that you don't echo any values higher than that.

If this all fails, you can also obtain the mbp-nvidia-bl module from here.

Another thing you could try is the 'smartdimmer' package from AUR.

Which MBP model do you have?


ᶘ ᵒᴥᵒᶅ

Offline

#9 2011-03-01 20:07:20

hijinks
Member
Registered: 2011-03-01
Posts: 10

Re: Screen Backlight on Macbook Pro Aluminium

Here are my current settings

[root@host ~]# cat /sys/class/backlight/nvidia_backlight/brightness 
1660
[root@host ~]# cat /sys/class/backlight/nvidia_backlight/max_brightness 
2047

Not sure how to find out the version.. its a new macbook bought a few weeks ago so its a the aluminum version

Last edited by hijinks (2011-03-01 20:07:59)

Offline

#10 2011-03-01 20:13:38

hijinks
Member
Registered: 2011-03-01
Posts: 10

Re: Screen Backlight on Macbook Pro Aluminium

smartdimmer is broken right now

Offline

#11 2011-03-01 20:27:15

hijinks
Member
Registered: 2011-03-01
Posts: 10

Re: Screen Backlight on Macbook Pro Aluminium

removing nvidia-bl did nothing.. still cannot change it

Offline

#12 2011-03-01 21:50:14

hijinks
Member
Registered: 2011-03-01
Posts: 10

Re: Screen Backlight on Macbook Pro Aluminium

ok figured out how to find the version

[root@host pommed]# dmidecode --string system-product-name
MacBookPro6,2

Last edited by hijinks (2011-03-01 21:50:35)

Offline

#13 2011-03-01 22:11:35

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

Re: Screen Backlight on Macbook Pro Aluminium

Ok, i believe you might be needing the mbp-nvidia-bl module then. You can download the package from the link i gave above, but you will have to compile it yourself. Do you know how to do that?

Be sure to remove the nvidia-bl package from your system in this case.


ᶘ ᵒᴥᵒᶅ

Offline

#14 2011-03-01 22:20:47

hijinks
Member
Registered: 2011-03-01
Posts: 10

Re: Screen Backlight on Macbook Pro Aluminium

looked it over.. can't figure out how to compile it hmm

Offline

#15 2011-03-01 23:01:33

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

Re: Screen Backlight on Macbook Pro Aluminium

What you can do is download the nvidia-bl package from the AUR and edit it to use the mbp-nvidia-bl.c file (from the PPA) instead.

I'm not sure why the mbp-nvidia-bl package from the AUR is gone, that one was made by someone else with a MBP 6,2 so it should work for your scenario. However, since that person pulled the package, it would seem logical that he did because the backlight got supported by default in the kernel.

You could consider e-mailing the person in question if he still has the package somewhere, or other information on how to fix this: https://bbs.archlinux.org/viewtopic.php … 27#p819927


ᶘ ᵒᴥᵒᶅ

Offline

#16 2011-04-16 12:50:18

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: Screen Backlight on Macbook Pro Aluminium

I'm having the same problems on a MBP 5.5 and I almost got it working as it should:

1. In /etc/modprobe.d/ there was a file blacklisting mbp_nvidia_bl - I removed that file to make it more straightforward (I like to see all modules in /etc/rc.conf)
2. In /sys/class/backlight there was an entry 'mbp_backlight', but that didn't work with pommed
3. I installed nvidia_bl from AUR and added the line in /etc/X11/xorg.conf.d/20-nvidia.conf
4. I blacklisted the module mbp_nvidia_bl and loaded the module nvidia_bl
5. I enabled the brightness-control 'lcd_sysfs' in /etc/pommed.conf (default it is at -1, disabled - I set it to 1023 and steps to 40)
6. I restarted pommed

Now it works, but not completely as it should: The icon that is displayed on screen while changing the brightness is always showing a filled bar, probably because it is only tought to go to 15, and now it is always above that number.

HTH someone...

/EDIT: after a reboot, its working perfectly!

Last edited by zenlord (2011-04-16 13:26:23)

Offline

#17 2011-06-16 18:07:32

petrakos
Member
Registered: 2011-06-16
Posts: 3

Re: Screen Backlight on Macbook Pro Aluminium

Hi all,

I have the same problem as hijinks on my macbook 6.2.
I have installed pommed and nvidia-bl and are running.
When I press the backlight keys on the keyboard, I have an OSD with a brightness bar that's moving, however the backlight of the screen is not changing.
When I press those keys, the value of /sys/class/backlight/nvidia_backlight/brightness is changing,  but to no avail.

However, if I try:

echo 6 > /sys/class/backlight/apple_backlight/brightness

then the brightness of the screen actually changes.

Any idea on how to bind this to the keys?

Offline

#18 2011-07-03 06:57:39

johan1391
Member
From: Dhahran, Saudi Arabia
Registered: 2010-08-03
Posts: 106

Re: Screen Backlight on Macbook Pro Aluminium

petrakos wrote:

Hi all,

I have the same problem as hijinks on my macbook 6.2.
I have installed pommed and nvidia-bl and are running.
When I press the backlight keys on the keyboard, I have an OSD with a brightness bar that's moving, however the backlight of the screen is not changing.
When I press those keys, the value of /sys/class/backlight/nvidia_backlight/brightness is changing,  but to no avail.

However, if I try:

echo 6 > /sys/class/backlight/apple_backlight/brightness

then the brightness of the screen actually changes.

Any idea on how to bind this to the keys?

This is exactly the same thing that I am experiencing. May I ask how you were able to get the brightness bar moving?

Offline

#19 2011-08-07 22:03:20

petrakos
Member
Registered: 2011-06-16
Posts: 3

Re: Screen Backlight on Macbook Pro Aluminium

Hi,

I have a macbook pro 6.2 and manage to get the backlight change on backlight keys by configuring Openbox (or any desktop manager) to run a custom script when the backlight keys are pressed.
Here's the script I use:
(file's name is 'backlight')

#!/bin/zsh

cat /sys/class/backlight/apple_backlight/brightness | read current_brightness
cat /sys/class/backlight/apple_backlight/max_brightness | read max_brightness

if [ $# -eq 0 ]
then
    echo "Usage:"
        echo "'backlight +' will increase brightness"
        echo "'backlight -' will decrease brightness"
        echo "'backlight #' will set brightness to the level correspoonding to #.
        echo "     # is a number btween 0 and 15"
elif [ $# -eq 1 ]
then
    if [ $1 = "+" ]
    then
        new_brightness=$((current_brightness + 2))
        if [ $new_brightness -gt $max_brightness ]
        then
            new_brightness=$max_brightness
        fi
        echo $new_brightness > /sys/class/backlight/apple_backlight/brightness
    elif [ $1 = "-" ]
    then
        new_brightness=$((current_brightness - 2))
        if [ $new_brightness -lt 0 ]
        then
            new_brightness=0
        fi
        echo $new_brightness > /sys/class/backlight/apple_backlight/brightness
    elif echo "$1" | egrep "[0-9]*" > /dev/null
    then
        new_brightness=$1
        if [ $new_brightness -gt $max_brightness ]
        then
            new_brightness=$max_brightness
        elif [ $new_brightness -lt 0 ]
        then
            new_brightness=0
        else
            ;
        fi
        echo $new_brightness > /sys/class/backlight/apple_backlight/brightness
    else
        ;
    fi
else
    ;
fi

cat /sys/class/backlight/apple_backlight/brightness | read current_brightness
echo "Brightness : $current_brightness"

Note: you can change your shell to other than zsh on the first line.
FOr openbox, I added the following entries in ~/.config/openbox/rc.xml:

    <keybind key="XF86MonBrightnessUp">
      <action name="Execute">
        <command>sudo ~/bin/backlight +</command>
      </action>
    </keybind>
    <keybind key="XF86MonBrightnessDown">
      <action name="Execute">
        <command>sudo ~/bin/backlight -</command>
      </action>
    </keybind>

It requires that you allow your user to run those scripts with sudo without a password prompt, so you might add those script in /etc/sudoers like this:

your_user ALL=NOPASSWD:/PATH_TO_YOUR_SCRIPT

Offline

Board footer

Powered by FluxBB