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

Thread: Ubuntu 12.04 boots with full screen brightness and keyboard backlight

  1. #1
    Join Date
    Mar 2011
    Beans
    3

    Ubuntu 12.04 boots with full screen brightness and keyboard backlight

    I have dual-booted my Macbook Pro with Ubuntu 12.04 . Whenever i log-in to Ubuntu, it does so with full screen brightness and keyboard backlight at full . How do i get rid of this? How can i tweak the start-up setting for screen brightness and disable keyboard backlight at start-up?

  2. #2
    Join Date
    Aug 2010
    Location
    Waterloo, Canada
    Beans
    144
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Ubuntu 12.04 boots with full screen brightness and keyboard backlight

    I also have this issue - suggestions appreciated

  3. #3
    Join Date
    May 2008
    Beans
    76

    Re: Ubuntu 12.04 boots with full screen brightness and keyboard backlight

    Add this to /etc/rc.local:

    Code:
    echo '2' > /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness
    echo '0' > /sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness
    Change the values to match your preference, keyboard brightness from 0 to 255, and screen backlight from 1 to 15.

    You might also want to have a look at lightum:

    lightum - MacBook automatic light sensor daemon

  4. #4
    Join Date
    Aug 2010
    Location
    Waterloo, Canada
    Beans
    144
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Ubuntu 12.04 boots with full screen brightness and keyboard backlight

    Thanks for this - it works well.

    Just one thing - the second line cannot have a value of 0, the lowest setting for the keyboard is 1 (which turns the backlights off)

    Thanks for your suggestion.
    (for other mac users - I've got macbookpro8,1 running Linux Mint 13 - this worked well for me)

    Quote Originally Posted by poliva View Post
    Add this to /etc/rc.local:

    Code:
    echo '2' > /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness
    echo '0' > /sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness
    Change the values to match your preference, keyboard brightness from 0 to 255, and screen backlight from 1 to 15.

    You might also want to have a look at lightum:

    lightum - MacBook automatic light sensor daemon

  5. #5
    Join Date
    Nov 2012
    Beans
    3

    Re: Ubuntu 12.04 boots with full screen brightness and keyboard backlight

    Quote Originally Posted by poliva View Post
    Add this to /etc/rc.local:

    Code:
    echo '2' > /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness
    echo '0' > /sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness
    Change the values to match your preference, keyboard brightness from 0 to 255, and screen backlight from 1 to 15.

    You might also want to have a look at lightum:

    lightum - MacBook automatic light sensor daemon
    The first echo for the display brightness didnt do anything on my macbook 5.5.
    Can someone help with the display brightness

  6. #6
    iMac71 is offline Gee! These Aren't Roasted!
    Join Date
    Dec 2012
    Beans
    169

    Re: Ubuntu 12.04 boots with full screen brightness and keyboard backlight

    Quote Originally Posted by mustinet1900 View Post
    The first echo for the display brightness didnt do anything on my macbook 5.5.
    Can someone help with the display brightness
    you might try this:
    Code:
    echo 8 > /sys/class/backlight/apple_backlight/brightness
    it works fine on my iMac 7.1

  7. #7
    Join Date
    Oct 2011
    Location
    Canada
    Beans
    951
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Ubuntu 12.04 boots with full screen brightness and keyboard backlight

    Interesting....I have a 2012 13" Macbook Pro (non retina) and this seems to only work 50%. I can disable the keyboard backlight on boot but lowering screen brightness does NOT work. It still boots into 100% power even with the following rc.local:


    Code:
    #!/bin/sh -e # # rc.local # # This script is executed at the end of each  multiuser runlevel. # Make sure that the script will "exit 0" on  success or any other # value on error. # # In order to enable or disable  this script just change the execution # bits. # # By default this  script does nothing.  echo '3' >  /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness  echo '1' >  /sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness   exit 0

    I wondered why and when I ran just the below command in terminal, I got the below;

    Code:
    sudo echo '5' > /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness
    (with and without the '#')

    Code:
    sudo echo '5' > /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness: Permission denied
    Permission denied even with sudo?!
    Last edited by d4m1r; April 23rd, 2013 at 08:39 PM.
    613websites.com Canadian Web Design and Hosting

  8. #8
    Join Date
    Oct 2011
    Location
    Canada
    Beans
    951
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Ubuntu 12.04 boots with full screen brightness and keyboard backlight

    Fix my own problem by just installing xbacklight...not sure why the above didn't work but it probably a bug. You can find xbacklight in the Ubuntu repo's (sudo apt-get install xbacklight) and you can find more info on it below;

    http://linux.die.net/man/1/xbacklight
    613websites.com Canadian Web Design and Hosting

  9. #9
    Join Date
    Aug 2013
    Beans
    2

    Re: Ubuntu 12.04 boots with full screen brightness and keyboard backlight

    Before you run the code, try
    Code:
    sudo su
    Then run your commands without the sudo in front.


    Quote Originally Posted by d4m1r View Post

    Code:
    sudo echo '5' > /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness
    (with and without the '#')

    Code:
    sudo echo '5' > /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness: Permission denied
    Permission denied even with sudo?!

  10. #10
    Join Date
    Aug 2013
    Beans
    2

    Re: Ubuntu 12.04 boots with full screen brightness and keyboard backlight

    Adding these to /etc/rc.local didn't work for me on Linux Mint running on a Macbook Air 2012 (it worked up to the login window then after login it quit working). I had to run a script as sudo at login using the above commands: http://greeennotebook.com/2010/06/ru...ot-at-startup/

    First I created a shell script in ~/subfolder/script.sh with the two commands from above:

    Code:
    echo '2' > /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness
    echo '0' > /sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness
    exit 0
    Then had to edit the sudoers file and enable the custom script to run without a password.

    Code:
    username ALL=NOPASSWD:/full/path/to/script.sh
    (of course replace username and path with your own)

    Then basically just added
    Code:
    sudo /full/path/to/script.sh
    to startup applications.

    This is all explained in the link.

    Any suggestions for improvement would be appreciated, but this works for me.

Page 1 of 2 12 LastLast

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
  •