brightness control

Adjust display brightness for Sony Vaio on Ubuntu

Adjusting the display brightness for the Sony Vaio F series doesn't work by default on Ubuntu. I've done a little research about the issue and found some interesting things.

After loading and unloading the module, you get the following dmesg messages:

# rmmod sony_laptop
# modprobe sony_laptop debug=1
# dmesg | tail
[ 2976.867199] sony-laptop: method: name: SNFD, args 1
[ 2976.867204] sony-laptop: method: name: SNFE, args 1
[ 2976.867209] sony-laptop: method: name: SNFF, args 1
[ 2976.867218] sony-laptop: Doing SNC setup
[ 2976.879859] sony-laptop: Found rkfill handle: 0x0124
[ 2976.880855] sony-laptop: Radio devices, looking at 0x00
[ 2976.882935] sony-laptop: Radio devices, looking at 0x10
[ 2976.892519] input: Sony Vaio Keys as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/SNY5001:00/input/input11
[ 2976.892599] input: Sony Vaio Jogdial as /devices/virtual/input/input12
[ 2976.892657] sony-laptop: brightness ignored, must be controlled by ACPI video driver

Now, when pressing the Fn keys, you get the following output:

# dmesg | tail
[10933.010324] sony-laptop: sony_nc_notify, event: 0x10
[10933.186300] sony-laptop: sony_nc_notify, event: 0x3b
[10933.736506] sony-laptop: sony_nc_notify, event: 0x11
[10933.891048] sony-laptop: sony_nc_notify, event: 0x3b

The most important message here is sony-laptop: brightness ignored, must be controlled by ACPI video driver. This tells us that the brightness must be handled by the nVidia video driver.

By default the brightness control is disabled in the nVidia driver. To enable it, you'll have to add the following line to the "Device" section of your xorg.conf:

Option "RegistryDwords" "EnableBrightnessControl=1"

After adding the line, just restart your X server. Everything will work fine, including the auto brightness dimming.