Comment 31 for bug 1259339

Revision history for this message
Lawrence Ong (lawrence-ong) wrote :

I have written an automated script to execute the "xrandr --auto" command after resume. It solves the blank-screen problem for me.

1. Create the following file named "00_screen" in /etc/pm/sleep.d/

=================
#!/bin/bash
case "$1" in
    thaw|resume)
 sleep 5
 sudo -u <user> env DISPLAY=:0 /usr/bin/xrandr --auto
        ;;
    *)
        ;;
esac
==================

replace <user> with your username

2. Change it to be executable:

# chmod +x 00_screen