Howto fix: black screen / adjust brightness after resume (Linux)

.
In some computers with Intel graphics (maybe others as well), I’ve often come across this problem: when resuming from sleep (standby) mode, I can’t adjust the screen brightness. There is a very well known fix for this: to pass the “acpi_backlight=vendor” option to the kernel at boot. However, in my two last KDE installs, this workaround broke the wake up from standby, bringing up a stubborn black screen (no backlight).
I don’t know if this is KDE related, but I’ve experienced this issue with both Kubuntu 12.04 and Aptosid-KDE, whereas I didn’t with a parallel Ubuntu 12.04, all three of them in the same computer and same kernel versions. I was astonished to find out that both *buntu distributions behaved so differently in this matter, as I have always taken for granted that Ubuntu and Kubuntu were “synchronized”; but, apparently, developers in both *buntu branches don’t talk to each other. 🙂
So, after a lot of checking around files and packages, I finally came across the difference: the standard Ubuntu install includes a file which is not present in the Kubuntu version, and which doesn’t belong to any particular package; it’s just there: /etc/pm/sleep.d/20_wakeup. Ahd this is the file that has fixed (for me) the black screen after resume problem. Maybe it will also work for you, whatever your hardware and distribution is. The content of this file is as follows:
#!/bin/bash
case “$1” in
suspend|hibernate)
#do nothing
;;
resume|thaw)
echo 2 > /sys/class/backlight/toshiba/brightness
;;
*)
exit 1
;;
esac
exit 0
Hope this will help somebody out there. If you have any constructive contribution to this post, please feel free to add your comment.

This entry was posted in Binary world and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *