Ubuntu – Fn + F5 / F6 brightness keys not working on Asus R556L

backlightbrightnessfunction keysintel graphicsnvidia

I've already tried many solutions I'd found on the web and none of them has worked. I'm using Ubuntu 16.04 LTS, fresh installation.

  • This notebook has Intel HD Graphics 5500 and Nvidia GeForce 920M. I thought that installing the proprietary Nvidia driver would solve the issue, but it still exists. Installing bumblebee for Nvidia Optimus didn't solve the issue either.
  • The other Fn keys like volume up, down, screen off, WiFi etc. work without any problems.
  • The brightness keys work in the GRUB selection menu. They stop working immediately after the Ubuntu is selected and launched. On Windows they work perfectly fine.
  • xev and acpi_listen don't detect the Fn + F5 / F6 combination at all, no matter what solution I try.
  • /sys/class/blacklight contains an intel_backlight folder and the brightness can be changed using the sudo tee /sys/class/backlight/intel_backlight/brightness <<< 200 command. This folder may also contain a second folder like acpi_video0 after trying some of the solutions, but the brightness setting in this folder does not have any effect.
  • Generally, the brightness can be changed in settings or by using xbacklight, the only issue is that the Fn brightness keys seems to be considered to not exist for the system. EDIT: Apparently, xbacklight doesn't work when the Nvidia GPU is used. It works when the Intel GPU is set in Nvidia Prime. So I guess this issue is somehow related to dual GPU setup.

Here are the solutions I've already tried and all of them failed:

  • I edited /etc/default/grub by commenting out the GRUB_CMDLINE_LINUX line and changing the GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" line. None of the following additions has worked for me, mixed or not:
    • acpi_backlight=vendor
    • acpi_backlight=native
    • acpi_backlight=video
    • video.use_native_backlight=1
    • acpi_osi=
    • acpi_osi=Linux
    • acpi_osi='!Windows 2012'
  • I created a /usr/share/X11/xorg.conf.d/20-intel.conf file with the following content:

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

    It only resulted in a black screen instead of the login screen, so I had to delete this file.

  • I edited the /etc/X11/xorg.conf file to add Option "Backlight" "intel_backlight" and Option "RegistryDwords" "EnableBrightnessControl=1". This didn't change anything. Here's the actual content of this file:

    Section "ServerLayout"
        Identifier "layout"
        Screen 0 "nvidia"
        Inactive "intel"
    Section "Device"
        Identifier "intel"
        Driver "modesetting"
        BusID "PCI:0@0:2:0"
        Option "AccelMethod" "None"
        Option "Backlight" "intel_backlight"
    Section "Screen"
        Identifier "intel"
        Device "intel"
    Section "Device"
        Identifier "nvidia"
        Driver "nvidia"
        BusID "PCI:4@0:0:0"
        Option "ConstrainCursor" "off"
        Option "RegistryDwords" "EnableBrightnessControl=1"
    Section "Screen"
        Identifier "nvidia"
        Device "nvidia"
        Option "AllowEmptyInitialConfiguration" "on"
        Option "IgnoreDisplayDevices" "CRT"

I can't find any other solutions, just the same as above everywhere. Thanks in advance for any help or ideas what might be a fix.

Best Answer

Hey there seem to be a few related questions for different asus computers:


This answer might be particularly interesting (it suggest a kernel downgrade):

14.04 on Asus GL552JX: Fn+F5 and Fn+F6 Brightness Problem

I don't have an Asus R556L to experiment with but I would suggest a couple of things:

  1. The showkeys command operates at the level of keycodes and scancodes, so might give you information that xev will not: sudo showkey -s

  2. This archwiki page describes the https://wiki.archlinux.org/index.php/Map_scancodes_to_keycodes process of mapping scancodes to keycodes, apparently this happens in the kernel, but can be customized from userland.

For the benefit of other readers, here's a picture of what's going on.

Keypresses --keyboard---> scan codes --kernel---> keycodes ---X----> keysym --- application / wm ----> event

The comments about GPU and xbacklight muddy the water a little. I would be inclined to try to go around your window manager and just set bindings directly. One thing to bear in mind is that the kernel protocol for changing backlight settings has been changing recently to use sysfs and there were problems with xbacklight not supporting this. See acpilight for a drop in replacement. You can also do stuff manually inside sysfs.