Comment 205 for bug 1303736

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

If executing "xrandr --auto" works, the following script will automate the process:

Add a file, say "00_screen", in

/etc/pm/sleep.d/

with the following content:

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

Make the file 00_screen executable, i.e., "chmod +x 00_screen".