How to set lightness in Ubuntu14.04

Open the folder.

sudo vim /etc/default/grub
Change the following code
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
To
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux"
GRUB_CMDLINE_LINUX="acpi_osi=Linux acpi_backlight=vendor"
Save and Restart.
sudo update-grub && sudo reboot