Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have recently installed Ubuntu on my new Asus G56Jr laptop. I noticed that despite all the other Fn+fX keys are working, the screen brightness does not.

I have already tried editing the grub, as many here earlier advised, with no result. Also I tried using various drivers. ATM I am using the NVidia binary driver 331.38 and my grub file looks like this:

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pcie_aspm=force acpi_backlight=vendor"
GRUB_CMDLINE_LINUX=""

I know this has been already asked plenty of times, but I couldn' t find any working solution.

edit

Unlike many others I can actually set the brightess in Settings.

share|improve this question

4 Answers 4

The most generic option is to control brightness through the /sys class file as below echo 150 > /sys/class/backlight/intel_backlight/brightness. The highest value of this file is 946.

In addition, you can create a file /usr/share/X11/xorg.conf.d/20-intel-conf and put the below value:


Section "Device"
Identifier  "card0"
Driver      "intel"
Option      "Backlight"  "intel_backlight"
BusID       "PCI:0:2:0"
EndSection

Not sure if the below step is required, but i had used it prior to the above step, Edit /etc/default/grub and put the GRUB_CMDLINE_LINUX_DEFAULT as

 
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pcie_aspm=force"
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"
GRUB_CMDLINE_LINUX=""

Then I did a sudo update-grub

You could also use the utility xbacklight and set-up keyboard shortcuts in unity/ Compiz to call it. Setting shortcut:
xbacklight -dec 5 to decrease by 5 units
xbacklight -inc 5 to increase.

While, the xbacklight will not solve "fn" keys, but it would give you a simple keyboard shortcut nonetheless.

share|improve this answer
    
Adding: Option "RegistryDwords" "EnableBrightnessControl=1" to "device" also works on some hardware. You may need to also add the line "VendorName" "nvidia" –  bleeves Jul 30 '14 at 21:33
    
Unfortunately the given solutions do not work for me. Yes, the /sys class file control works, but this is cumbersome solution and it won't be comfortable to set brightness throughout the entire day. –  Dr. Nefario Aug 1 '14 at 7:52
    
my brightness file has value of 4302 and there is no way to edit it even as a su... strange –  Hrachos Sep 24 '14 at 9:45

I have an ASUS G56JK and had the same problem. It is now fixed for me.

In the terminal:

sudo gedit /etc/default/grub

Change

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi="

Save, then

sudo update-grub

Restart computer.

The function keys (fn+F5/F6) should now be active.

share|improve this answer
    
Not sure why you were downvoted. This was the first thing to work for me. Thanks! –  skaz Feb 7 at 19:07
    
I found out that this is to be done again after any upgrading to new versions –  Captain_Frog Apr 1 at 13:11
    
Works on an Asus F200MA, thanks a lot! I've seen some tutorials using acpi_backlight=vendor or pcie_aspm instead of acpi_osi, but neither worked for me. I guess it's just a matter of minor hardware differences?! Anyway, I'm glad it works! –  Samy Dindane Apr 2 at 22:56
    
You might have gotten downvoted because you're suggesting edit of default files. You should actually add menuentry to /etc/grub.d/40_custom. Menuentry can be copied from /boot/grub/grub.cfg find one that is called the same as the ubuntu you menu item you usually boot in grub. After copied to 40_custom find line that has "quiet splash" and add acpi_osi= to the end. Google for "Maintenance-Free Menuentries" to find out how to make it update proof. And rename 40_custom to 06_custom so that it will be the first option. Run sudo update-grub. –  Ivan Ivanić 15 hours ago

I've found out that this: Brightness keyboard buttons do not work on Asus 1225c works even for ubuntu 14.04 with ASUS G56jr

share|improve this answer
    
Unfortunately not for me :/ I have nVidia GTX760M and Intel core i7 4700HQ –  Hrachos Sep 1 '14 at 13:14
    
I am with the same hardware like you. Sorry to hear it doesn't work for you... –  Dr. Nefario Sep 4 '14 at 13:06

I have ASUS G551JM with the same problem (the Fn+F5 and Fn+F6 keys do not even get registered by the acpi_listen).

I found the following workaround solution: to map another pair of Fn+ keys into a custom brightness script. I choose to use Fn+C and Fn+V.

I also suggest the following script of mine, to do the actual adjustments of the brightness. The script does it in exponential increments rather than linear, so it requires many less key presses to reach the desired luminosity:

#!/bin/bash

USAGE="Usage: `basename $0` +|-|max|<number>"

hwpath="/sys/class/backlight/intel_backlight"

if [ "$1" == "+" ]; then
    maxbright=`cat $hwpath/max_brightness`
    bright=`cat $hwpath/brightness`
    bright=`echo "print(int(min($maxbright,$bright + max($bright * 0.5, 1))))" | python`
else
   if [ "$1" == "-" ]; then
    bright=`cat $hwpath/brightness`
    bright=`echo "print(int(max(0,$bright - max($bright * 0.33, 1))))" | python`
   else
    if [ "$1" == "max" ]; then
        maxbright=`cat $hwpath/max_brightness`
        bright=$maxbright
    else
        if ! [[ "$1" =~ ^[0-9]+$ ]] ; then
            echo "`basename $0` version 0.1"
            echo $USAGE >&2
            echo "+|-   brighter/darker"
            echo "max   maximum luminosity"
            echo "<int> set specific light intensity"
            exit 1
        else
            bright=$1
        fi
    fi
   fi
fi


echo $bright | tee $hwpath/brightness"

The Bash script needs a Python. Put it somewhere in the path (I name it bright), and use it simply by bright -, bright +, bright 50 (very dim screen, good for night work) or bright max.

If you want to use the script as a non-root user, please change the permissions for the /sys/class/backlight/intel_backlight; the best place to do it is via the upstart job, since upstart jobs are executed by the root.

This script is compatible with at least 3 ASUS models: ASUS N56VZ, ASUS G551JM and ASUS P53E. I guess it should be compatible with most of the other ASSUSes out there, and after a minor modification, with all other notebook brands that expose screen brightness somewhere in the /sys file system tree.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.