Brightness keys F4 and F5 not working on Dell XPS 15.6 Laptop

Edit "/etc/default/grub" as root.

gksu gedit /etc/default/grub

Now, look for the line that looks like:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Append "acpi_backlight=vendor acpi_osi=Linux" to the end of that line, before the end quotes, so that the line now looks something like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor acpi_osi=Linux"

Save and close the file, and run the following command:

sudo update-grub

Now, reboot, and test out the brightness keys. They should be working correctly now.