Ubuntu – Every function key on laptop works except for brightness

function keyslaptop

I have an Asus UX21A, and I'm pleased to discover that almost all the hardware functions and features work perfectly with Ubuntu 12.10.

The only thing that is not working straight "out of the box" are the brightness keys. In theory, the screen brightness can be adjusted downward by pressing fn+f5, and adjusted upward by pressing fn+f6.

Is there a way I can connect the monitor brightness settings to these function keys?

Best Answer

According to the Zenbook Prime community page, the answer is "yes", with a caveat. It looks like the problem will be fixed in a 3.7.x version of the kernel (see this bug), but still exists in 3.5.x (i.e. Ubuntu 12.10).

For now, you can try applying this patch to the 3.5.x kernel. For instructions on building the kernel and applying patches, see here. Again, according to the Zenbook Prime community page the patch is imperfect. The brightness-down key works fine, but the brightness-up key imposes an ~2 second delay before other hotkey presses are registered.

The community page also lists a couple of workarounds that involve the xrandr command. The second workaround involves a custom script that is then mapped to Ctrl+Shift+F5/F6. You could, of course change the keymapping to anything you like (say just F5 or just F6, for example).