10

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.

22

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.

7
  • Not sure why you were downvoted. This was the first thing to work for me. Thanks! – skaz Feb 7 '15 at 19:07
  • I found out that this is to be done again after any upgrading to new versions – Captain_Frog Apr 1 '15 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 '15 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ć May 6 '15 at 17:21
  • worked on ASUS R554L – akonsu Jan 16 '16 at 19:05
3

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.

3
  • 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
1

On my ASUS GL552vw with ubuntu 16.04:

Just working by adding acpi_backlight=native in /etc/default/grub:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pcie_aspm=force acpi_osi= acpi_backlight=native"

EDIT 1

Don't forgett to update grub !

sudo update-grub
0

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.

0

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

EDIT: Ok, after some years I got to do this again, this time on Arch Linux. It turns out it is not really distro specific and if you have an ASUS laptop then you have problems with that.

So most of the users say that if you have the asus-laptop module (or for newer machines asus_nb_wmi)loaded you are good to go. However for me it was this and kernel parameter acpi_osi=. Yes, exactly like that. Nothing after the equals sign, not even a space.

So to check if it's loaded by default do:

lsmod | grep asus

If it isn't:

modprobe asus-laptop

You would probably need to load the module every time you boot like that, so please be sure to make it load automatically (search google for that)

I'll also keep the link for reference on how to add the parameter permanently, and I'll paste it also here, in case it gets lost there:

First:

sudo sed 's/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi="/' -i /etc/default/grub

Then:

sudo update-grub

P.S. Wherever you see asus-laptop in these instructions but you know your laptop is new enough, substitute with asus_nb_wmi

2
  • 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
0

I have Asus N551VW, and doing

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi="

makes FN+F5 move the brightness slider (without this, it did nothing), but brightness remains unchanged. Changing it through the menu works. All other FN combinations work.

Will test other combos and post solution if I get one...

(Side note, hibernate on closed lid doesn't work, no matter what. The event of closing the lid isn't recognized. Could these be connected somehow?)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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