Tuesday 12 August 2014

Can't change screen brightness with nVidia drivers? Here's a fix

After installing proprietary nVidia drivers on my Lenovo Thinkpad T530, the screen brightness was stuck at 100% and was  frying my eyes. Fortunately for those with such a laptop, or those who use a 5400M graphics card with Ubuntu 12.04/14.04, there is a fix. This AskUbuntu page helped me, and here are the instructions, summarised and curtailed to a computer with an nVidia 5400M graphics card:

Open up a terminal, as we will need to create a configuration file. Enter,
sudo nano /usr/share/X11/xorg.conf.d/10-nvidia-brightness.conf

A new file will be created. If there is something there already, overwrite it with this,
Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVS 5400M"
    Option         "RegistryDwords" "EnableBrightnessControl=1"
EndSection

I don't know how this works, but my eyes are blessed by this bit of code. Save it, and reboot your computer. If the problem persists, follow these steps (non Lenovo/Thinkpad users, replace "thinkpad_acpi" with "vendor"):
  1. sudo nano /etc/default/grub
  2. change GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight= thinkpad_acpi"
  3. sudo update-grub
  4. sudo reboot
This tutorial was tested on Ubuntu 12.04 and Ubuntu 14.04.