Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Macbook Default Brightness for Keyboard / Display

  1. #1
    Join Date
    Sep 2007
    Location
    Alnilam
    Beans
    310
    Distro
    Ubuntu 14.04 Trusty Tahr

    Macbook Default Brightness for Keyboard / Display

    I've got the Macbook 5,1 and when I boot into Ubuntu, the brightness resets to maximum for both the backlit keyboard and monitor. Is there any way to adjust this, so that the monitor is at the lowest brightness setting while booting and after X loads and also so the keyboard backlight is turned off by default?

  2. #2
    Join Date
    Dec 2008
    Beans
    1

    Re: Macbook Default Brightness for Keyboard / Display

    I have a MacBook Pro 4,1.

    While I don't know how to adjust the backlight brightness pre-boot, after loading the mbp_nvidia_bl module, I was able to set the backlight brightness via gnome-power-preferences; this setting is reinstated by gnome-power-manager when you log in. You need to run "sudo modprobe mbp_nvidia_bl" for this to work; to make the module load at every bootup, add mbp_nvidia_bl to /etc/modules. Alternatively, you can "echo 1 > /sys/devices/virtual/backlight/mbp_backlight/brightness" in your /etc/rc.local to make this happen earlier in the boot process (brightness values range from 0 to 15 on my system).

    The keyboard light defaults to off for me, but I've found that you can echo a brightness value (appears to be in the range 0-255) to "/sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness". You need to load the applesmc module for this to work: "sudo modprobe applesmc". So you could, for instance, add applesmc to /etc/modules, and edit /etc/rc.local to adjust the keyboard backlight on bootup.

    A few other things you may find useful:

    1. applesmc allows you to adjust the minimum and maximum speeds for the two fans, or if you desire, you can even manually set the fans to a particular speed (be careful). Just look around in /sys/devices/platform/applesmc.768 (it may be a different number for your computer).

    2. applesmc also allows you to read the values of several temperature sensors.

    3. nvidia-settings allows you to adjust the GPU and video memory clock speeds (e.g., make them slower to save power). To enable clock speed adjustment view the nvidia-settings GUI, you need to add the line
    Option "Coolbits" "1"
    to the Device section(s) of your /etc/X11/xorg.conf file. The nvidia-settings program can also be used as an entirely command-line driven program, so you can script it to automatically load predetermined settings (check the man page). You'll need to apt-get install nvidia-settings to get it.

    4. At least for my computer, the keyboard repeat rate was much faster than what the settings in gnome-keyboard-properties would seem to indicate. This resulted in backspace going too fast, etc. I'm not sure if this is because I'd increased the (by default, overly slow) keyboard repeat rate in Mac OS X. But my solution was to run "kbdrate -d 250 -r 1" in /etc/rc.local (you can also sudo and run this... but for some reason it works from a console login (Ctrl-Alt-F1) but not from within X...). The 1 there means 1 character per second, but it's actually much faster than that--probably in the range of 5-10 cps.

    5. The gsynaptics (GUI) and syn-client (command line) programs allow you to fine-tune the settings of your touchpad; you can then add these settings to an InputDevice section of your /etc/X11/xorg.conf file. This lets you do things like adjust tracking speed, adjust how clicks are detected, program multi-finger clicks for the middle and right buttons, and enable horizontal two-finger scrolling (only vertical was on by default for me). I only found out about this because tap-to-click wasn't working at all by default for me; since as I understand the 5,1 doesn't have a discrete trackpad button, this may be even more important for you.
    Last edited by Sameer Sundresh; December 14th, 2008 at 08:23 PM.

  3. #3
    Join Date
    Feb 2007
    Location
    Norway
    Beans
    386
    Distro
    Ubuntu Development Release

    Re: Macbook Default Brightness for Keyboard / Display

    Quote Originally Posted by Sameer Sundresh View Post
    I have a MacBook Pro 4,1.
    The keyboard light defaults to off for me, but I've found that you can echo a brightness value (appears to be in the range 0-255) to "/sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness". You need to load the applesmc module for this to work: "sudo modprobe applesmc". So you could, for insance, add applesmc to /etc/modules, and edit /etc/rc.local to adjust the keyboard backlight on bootup.
    Im not quite in to this echo thing. Tried
    Code:
    sudo echo 150 | /sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness
    both in X and in tty1, but got permission denied each time. Could you point me out in the right direction here?

    And by the way, have you any idea on how to tap and drag? I'm having difficulties with that one.. EDIT: Oh, click and drag with the same finger. I must say Im more fund of the way osx do it cause theres no click at the top, so click and drag upwards is kinda hard...
    Last edited by olavjunior; December 30th, 2008 at 12:41 PM.

  4. #4
    Join Date
    Jun 2008
    Location
    Tampico,Mexico
    Beans
    1,395
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Macbook Default Brightness for Keyboard / Display

    I dodn't know about your macbooks but on my 8.04 install I have an icon on the top panel that controls brightness. I don't remember if it came with the install or the Gdesklets package that I installed. I just right clicked on the panel and choose add to panel and found it in the list. Works rather well.

  5. #5
    Join Date
    Jul 2008
    Beans
    245
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Macbook Default Brightness for Keyboard / Display

    Quote Originally Posted by olavjunior View Post
    Im not quite in to this echo thing. Tried
    Code:
    sudo echo 150 | /sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness
    both in X and in tty1, but got permission denied each time. Could you point me out in the right direction here?
    yes, it's:

    Code:
    echo 150 | sudo tee /sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness
    ciao,
    Mario

  6. #6
    Join Date
    Feb 2007
    Location
    Norway
    Beans
    386
    Distro
    Ubuntu Development Release

    Re: Macbook Default Brightness for Keyboard / Display

    Thanks!!

    Any ways to do this in X so that the brightness can be controlled via F5/F6?

  7. #7
    Join Date
    Feb 2007
    Location
    UK
    Beans
    393

    Re: Macbook Default Brightness for Keyboard / Display

    It would be great if we could get a proper tutorial on this subject. Information on it seems to be really loosely scattered throughout these boards.

    I've been trying for a couple hours now to get my keyboard backlight working.

    " echo 150 | sudo tee /sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness
    150"

    Gives me a response, but the F5/6 keys do nothing - and the light isn't coming on at boot for me. I have the hal Applesmc .deb installed.

    I can't find an /etc/modules though, which is frustrating.
    Asus 1015px
    Macbook Pro 4.1

  8. #8
    Join Date
    Feb 2007
    Location
    Norway
    Beans
    386
    Distro
    Ubuntu Development Release

    Re: Macbook Default Brightness for Keyboard / Display

    To make them light up at boot time you need to do as mentioned in the first post. You need to add applesmc to /etc/modules, and add the echo command to /etc/rc.local. This did it for me.

    But you wont be able to control it via F5/F6 no matter what, cause then you somehow need to map the F-keys to the echo-command (give a relative delta value), and I don't know how to do that..

    (Can't give you any more info as I'm on OSX right now)
    Last edited by olavjunior; January 19th, 2009 at 05:25 PM.

  9. #9
    Join Date
    Feb 2007
    Location
    UK
    Beans
    393

    Re: Macbook Default Brightness for Keyboard / Display

    Got it sorted, I was looking for a modules folder rather than a simple config file.

    F5/6 work perfectly for controlling the keyboard backlight.
    Asus 1015px
    Macbook Pro 4.1

  10. #10
    Join Date
    Feb 2007
    Location
    Norway
    Beans
    386
    Distro
    Ubuntu Development Release

    Re: Macbook Default Brightness for Keyboard / Display

    Haha, omg! Who figures, mine do as well I guess I just took it for granted they wouldn|t work

    The only thing that|s stopping me from an all ubuntu experience now is the display-port (digitally output)

    (I|m actually impressed with how good Ubuntu does all this! It seems like a worse situation on other distros. One bugger is the keyboard though, that just won|t get mapped right - as you all can see )
    Last edited by olavjunior; January 22nd, 2009 at 01:08 AM.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •