This is what I've done, and it works a lot better for me. My screen has a lot of brightness increments, as it's LED backlit and someone thought to take advantage of that.
sudo apt-get install xbacklight
# ..and test it..
xbacklight -dec 20
xbacklight -inc 20
# If this works for you, you can proceed
I'm using KDE, but this applies for Gnome as well. For KDE:
- Open System Settings
- Open Shortcuts and Gestures
- Select Custom Shortcuts in the left bar, if it's not already selected
- Right-click on a blank part of the list of actions, and select New->Global Shortcut
- Create one named "Brightness up" and one named "Brightness down"
- For the trigger, use your brightness-up/down keys. These will conflict with the defaults, but you can just reassign them to this action.
- For the Action, enter (for example) "xbacklight -inc 3" or "xbacklight -dec 3" (minus quotes)
- Larger numbers increase/decrease the backlight more, and smaller numbers less.
You can also set a specific percentage:
xbacklight -set 100
Sometimes, an increment or percentage change may have no effect. This is because the hardware only allows specific settings, and the closest setting to the percentage selected is used.
Incidentally, I happily found out that even though this is a more low-level program that is making the change, KDE still recognizes that the screen brightness has changed and displays the brightness percentage appropriately. :-)