oBacklight

Menu: Requirement Installation Configuration

obacklight_68x199

Requirement

  • Requires nvidiabl to be installed and running.
    Download from here & read about it here.

Installation

  • Copy the script to /etc/init.d/
    $ sudo cp oBacklight /etc/init.d/
  • Add script to your startup sequence.
    This how you do it in openSUSE.
    $ sudo yast runlevel add service=oBacklight
  • To start the script either reboot your computer or start the script like this.
    $ sudo /etc/init.d/oBacklight.sh start

Configuration

To make this script behave like you want to there are some parameters that must be checked and changed if the script isn’t working out of the box.

  • BMT
    Sets the Brightness Mode Type. There are currently 3 different types defined in the script.
    • ACPIS
      Sets correct system ACPI event codes. 3 predefined settings available for now.

    Depending on your system the brightness type could differ from default settings.  If none of these suggestions work and you have figured out one that does, please let us know and we will put it up here as a help to other users.

    8 Responses to oBacklight

    1. avatar xa0c says:

      thanks for your script.
      i have dell vostro 3700 anspamb0x@mail.rud used such vals:

      brightness down event - 00000087 00000000
      brightness up event - 00000086 00000000
      battery mode event - 00000080 00000000

      BBL="4"
      DID="1"
      MBV="32"

      btw. i think it’ll be better to restore previous brightness val from the file (after reboot)

    2. avatar admin says:

      Hi.

      Thanks for sharing your settings, i will look into how i can incorporate them into the script.

      I will look at the previous brightness restoration and see what can be done.

      /Marcus

    3. avatar mus says:

      thanks, this works great on my Sony VPCS11C5E (Vaio S). I had to set BMT=2 and ACPIS=1.
      Just one little suggestion. I’m running ArchLinux and there is no /etc/init.d/, instead all init scripts are in /etc/rc.d/.
      “/etc/rc.d/oBacklight start” fails because you start “/etc/init.d/oBacklight run &” in start(). I replaced it with “$0 run &”, which imho makes more sense and should work for everyone ($0 is the path to the script itself).

    4. avatar MattQ says:

      It looks like it is fairly easy to add an event for AC power plug in (set to max).

      1.) added event to watch for, e.g.
      ACAC=”00000081 00000001″ # ACPI brightness on AC event

      2.) had to adjust the CMD variable asignment a little
      CMD=$(acpi_listen -c 1 | egrep -o ” [A].+” | egrep -o ” [0-9].+” | egrep -o “[0-9].+”)

      3.) added task
      # Battery to AC change
      if [ "$CMD" == "$ACAC" ]
      then
      SVAR=$MBV
      echo $SVAR > /sys/class/backlight/nvidia_backlight/brightness
      echo $SVAR > /root/oBacklight.def
      fi

      Hope someone will find this helpful.

      Cheers,

      Matt

    5. avatar MattQ says:

      Actually there needs to be an “S” in the CMD assignment line:

      CMD=$(acpi_listen -c 1 | egrep -o ” [A,S].+” | egrep -o ” [0-9].+” | egrep -o “[0-9].+”)

      and I guess I can’t spell.

    6. avatar admin says:

      Hi

      Thanks for the input, i will check your modifications out. :-)

    7. avatar Zoltan says:

      Hi,

      Thanks for the script, it worked when a few months ago i used on XUbuntu 12.04

      Now however all i manage to achieve is this (using an Ubuntu 12.11 with gnome classic):

      sudo /etc/init.d/oBacklight startsudo: unable to execute /etc/init.d/oBacklight: No such file or directory

      permissions are set properly, the file is there too. I’m sure it might be something really silly i missed, but maybe there is something within the script?

    8. avatar admin says:

      Thanks.

      Not sure what this could be, if you try to edit the file via a terminal, is there strange letters in the file och does it look okay?

      /Marcus

    Leave a Reply

    Your email address will not be published. Required fields are marked *


    *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>