Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32

Thread: HowTo: Screen brightness on a Compaq Laptop Hardy 8.04

  1. #1
    Join Date
    Mar 2008
    Beans
    24

    HowTo: Screen brightness on a Compaq Laptop Hardy 8.04

    By the number of questions floating around these forums, laptop screen brightness issues seem to be a common problem. I tried several solutions addressed towards other makes/models of laptops. None worked. I could not find any references to Compaq's either.

    I was able, however, to modify 2 suggestions that I found and make them work with my laptop. I take no credit for the basic code. I found it in several locations. All I did was modify a few things to make it work in my laptop. My how-to might get a bit long, but hopefully it makes sense once you read it through and helps some Compaq folks, or anybody else that has been frustrated by the inability to change screen brightness.

    For reference my laptop is a new (August 2008) Compaq Presario A900 series (specifically A940AN). It came loaded with Win Vista. I repartitioned the HD and now dual-boot Ubuntu 8.04 and Vista. I also run WinXP inside Ubuntu using VirtualBox, primarily because I need to run MS Office Accounting 2008 that I purchased several months back. I bought the XP version and couldn't get it to load in Vista....so dual boot Ubuntu/Vista + VirtualBox = Works great.

    Anyway...screen brightness. I found this suggestion in another thread:
    --------
    sudo -s
    echo -n 50 > /proc/acpi/video/VGA/LCD/brightness
    exit
    --------
    (50 is 50% screen brightness...100 would be 100% screen brightness).

    It didn't work because my directory structure is different. My Compaq has the following structure (not sure why its different):

    /proc/acpi/video/OVGA/DD0X/brightness

    so the command needs to look like this:
    sudo -s
    echo -n 50 > /proc/acpi/video/OVGA/DD0X/brightness
    exit

    Note that O in OVGA is like the capital letter O in the alphabet and 0 in DD0X is zero. Also X in DD0X is a number, since, on my PC I have several directories under the OVGA directory as follows: DD01, DD02, DD03, DD04, and DD05.

    I first tried DD01, then DD02 in the command line
    "echo -n 50 > /proc/acpi/video/OVGA/DD0X/brightness"
    Neither worked. When I used DD03 as in echo -n 50 > /proc/acpi/video/OVGA/DD03/brightness, I immediately noticed a bump down in the brightness. You may need to try DD04 and DD05 if DD03 doesn't work. I then tried:
    echo -n 100 > /proc/acpi/video/OVGA/DD03/brightness
    and my screen immediately jumped to full-bright.

    NOTE. In the help/how-to that I found this command in, the writer used the following values for percentages:
    12 25 37 50 62 75 87 100
    Except for 50 and 100, these DID NOT work on my Compaq. I had to use:
    30 40 50 60 70 80 90 100.
    Again, why the difference? I don't know, but mine is in multiples of 10 and works for me.

    OK....so now I can change my brightness and is a decent solution, but it doesn't get your Fn (function) key + F7 and fn + F8 key combos to change the brightness. Here is how to make them work. (Again, I found this code in several help forums and modified it to make it work for my Compaq). Make a backup of these files (video_brightnessup.sh and video_brightness_down.sh) so you can put things back the way they were if necessary.
    ------------THIS WORKED FOR ME---------------
    sudo gedit /etc/acpi/video_brightnessup.sh
    Replace everything in this file with:

    #!/bin/bash

    CURRENT=$(grep "current:" /proc/acpi/video/OVGA/DD03/brightness |awk '{print $2}')


    case "$CURRENT" in

    100)
    echo -n 100 > /proc/acpi/video/OVGA/DD03/brightness;
    ;;
    90)
    echo -n 100 > /proc/acpi/video/OVGA/DD03/brightness;
    ;;
    80)
    echo -n 90 > /proc/acpi/video/OVGA/DD03/brightness;
    ;;
    70)
    echo -n 80 > /proc/acpi/video/OVGA/DD03/brightness;
    ;;
    60)
    echo -n 70 > /proc/acpi/video/OVGA/DD03/brightness;
    ;;
    50)
    echo -n 60 > /proc/acpi/video/OVGA/DD03/brightness;
    ;;
    40)
    echo -n 50 > /proc/acpi/video/OVGA/DD03/brightness;
    ;;
    30)
    echo -n 40 > /proc/acpi/video/OVGA/DD03/brightness;
    ;;
    *)
    echo -n 100 > /proc/acpi/video/OVGA/DD03/brightness ;
    ;;
    esac

    --------------END of VIDEO-BRIGHTNESS_UP---------

    Now do the brightness_down file:

    --------------BEGIN BRIGHTNESS_DOWN------------
    sudo gedit /etc/acpi/video_brightnessdown.sh
    Replace everything in this file with:

    #!/bin/bash

    CURRENT=$(grep "current:" /proc/acpi/video/OVGA/DD03/brightness |awk '{print $2}')


    case "$CURRENT" in

    30)
    echo -n 30 > /proc/acpi/video/OVGA/DD03/brightness;
    ;;
    40)
    echo -n 30 > /proc/acpi/video/OVGA/DD03/brightness;
    ;;
    50)
    echo -n 40 > /proc/acpi/video/OVGA/DD03/brightness;
    ;;
    60)
    echo -n 50 > /proc/acpi/video/OVGA/DD03/brightness;
    ;;
    70)
    echo -n 60 > /proc/acpi/video/OVGA/DD03/brightness;
    ;;
    80)
    echo -n 70 > /proc/acpi/video/OVGA/DD03/brightness;
    ;;
    90)
    echo -n 80 > /proc/acpi/video/OVGA/DD03/brightness;
    ;;
    100)
    echo -n 90 > /proc/acpi/video/OVGA/DD03/brightness;
    ;;
    *)
    echo -n 60 > /proc/acpi/video/OVGA/DD03/brightness ;
    ;;
    esac

    ----------END VIDEO=BRIGHTNESS_DOWN------------
    Save both files.
    Your FN +F7 for screen brightness down and Fn + F for screen brightness up should now work. (No reboot required).
    Hope this helps somebody.
    Last edited by countrylane; August 6th, 2008 at 01:13 AM.

  2. #2
    Join Date
    Aug 2008
    Beans
    3

    Re: HowTo: Screen brightness on a Compaq Laptop Hardy 8.04

    Thank you so much! This worked to fix the brightness controls on my Compaq C751NR laptop, running Ubuntu 8.04

    Many, many thanks!

    Matt

  3. #3
    Join Date
    Dec 2007
    Location
    Upstate New York
    Beans
    54
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HowTo: Screen brightness on a Compaq Laptop Hardy 8.04

    Many thanks! Didn't realize it.

    Of cource, you can replace those long files with:

    Code:
    #!/bin/bash
    ## video_brightnessup.sh
    
    CURRENT=`grep "current:" /proc/acpi/video/OVGA/DD03/brightness \
        | awk '{print $2}'`
    
    if [[ "$CURRENT" -ge 100 ]]; then
        echo -n 100 > /proc/acpi/video/OVGA/DD03/brightness
    else
        echo -n `expr $CURRENT + 10` > /proc/acpi/video/OVGA/DD03/brightness
    fi
    and

    Code:
    #!/bin/bash
    ## video_brightnessdown.sh
    
    CURRENT=`grep "current:" /proc/acpi/video/OVGA/DD03/brightness \
        | awk '{print $2}'`
    
    if [[ "$CURRENT" -le 30 ]]; then
        echo -n 30 > /proc/acpi/video/OVGA/DD03/brightness
    else
        echo -n `expr $CURRENT - 10` > /proc/acpi/video/OVGA/DD03/brightness
    fi

  4. #4
    Join Date
    May 2008
    Beans
    13

    Re: HowTo: Screen brightness on a Compaq Laptop Hardy 8.04

    Not related: Almost identical setup. Dual booting Vista/Ubuntu 8.04 running XP in VB.
    Related: Initially I was frustrated with brightness as well, and recently while altering my menu bar I found a solution. When you right click on your menu bar, and go to "Add to Panel..." you will find an applet called "Brightness Applet". Not sure if this is related to what you guys are talking about.

  5. #5
    Join Date
    Mar 2008
    Beans
    24

    Re: HowTo: Screen brightness on a Compaq Laptop Hardy 8.04

    re david819 and the applet, I tried the applet and it didn't work for me. I just tried the applet again after doing the suggestions in my original howto post and it still doesnt work, so whatever makes it work, must be pulling information from other/different config files.

  6. #6
    Join Date
    Jul 2008
    Beans
    1

    Compaq Presario C700

    Thank you so much! This worked to fix the brightness controls on my Compaq Presario C700 laptop Ubuntu Hardy 8.04

  7. #7
    Join Date
    Apr 2008
    Location
    Bellevue, WA, USA
    Beans
    262
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HowTo: Screen brightness on a Compaq Laptop Hardy 8.04

    Awesome dude! Works perfectly!
    My main system: AMD Athlon 64 X2 3.1Ghz, Nvidia 8800GT, 4GB RAM, Debian Lenny/Windows 7 dual-boot. My laptop (Compaq C700): Intel Celeron 1.7Ghz, Intel X3100, 1GB RAM, Ubuntu Lucid.

  8. #8
    Join Date
    Oct 2006
    Beans
    1
    Distro
    Ubuntu 6.06

    Re: HowTo: Screen brightness on a Compaq Laptop Hardy 8.04

    Thank you! I have just come back to Ubuntu with my new laptop, as my old one got stolen.

    So far today I have cracked wireless and now this. Going well.

    Thanks again.

  9. #9
    Join Date
    Apr 2008
    Beans
    1

    Re: HowTo: Screen brightness on a Compaq Laptop Hardy 8.04

    Thank you country lane and chrismp1! I've spend days searching forums and messing about with various codes. Huge thumbs up!

    Thanks

  10. #10
    Join Date
    Jun 2006
    Beans
    5

    Talking Re: HowTo: Screen brightness on a Compaq Laptop Hardy 8.04

    This is exactly what I needed for my new Compaq Presario A940NR. i bit the bullet and went full ubuntu 8.04 install, as I am unable to fathom the idea of Vista entering my house. Lovin the full system now !!!!

    Thanks SOOO much!

Page 1 of 4 123 ... 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
  •