Ubuntu – Screen brightness keys not working (fn + f5/f6)


i'm using ASUS K501U with Ubuntu 14.04 LTS and Gnome-shell 3.10.4,
The screen brightness works only from settings,
i tried that, but it disabled all my fn keys:

In the terminal:
sudo gedit /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi="
Then, save the file.
sudo update-grub
Restart computer.

help me, please?

Best Answer

On Ubuntu with Unity desktop environment, one can use qdbus to issue some of the system commands via dbus service, and there are two commands for increasing and decreasing brightness.

For increasing ,

qdbus org.gnome.SettingsDaemon.Power  /org/gnome/SettingsDaemon/Power org.gnome.SettingsDaemon.Power.Screen.StepUp

and for decreasing

qdbus org.gnome.SettingsDaemon.Power  /org/gnome/SettingsDaemon/Power org.gnome.SettingsDaemon.Power.Screen.StepDown

These commands can be bound to keyboard shortcuts for convenience. Go to System-Settings -> Keyboard -> Shortcuts -> Custom Shortcuts , click on + icon to add new shortcut.

A popup will appear, and add one of the commands above. In the screenshot you can see me adding the step-down command

enter image description here

Once you click apply, you will see a new entry added to the list. You can click on the Disabled text, and it will wait for you to press the key combination you want to correspond to this command.

enter image description here

I've set mine to Alt+Shift+Arrow Down for decreasing brightness. Feel free to select your own combination.