Fix backlight after resume on Linux 3.8 + Intel graphics

For some reason Linux 3.8 doesn’t resume from suspend properly on my Samsung Series 9 NP900X3C. From the comments on this Arch bug report it seems that the system is actually resuming, but the display back light isn’t coming back on.

One user suggested using systemd to run the following script at system resume, /usr/lib/systemd/system-sleep/linux-3.8-backlight.sh:

#!/bin/bash
[ "$1" = "post" ] && exec light `light -c`
exit 0

Don’t forget to install light and chmod +x the script.

It’s likely that this will soon be fixed in mainline, but I’m leaving this here in case I ever need to remember how to run stuff at resume using systemd. 🙂