I've deployed awesome on top of Mint 15 XFCE. I use xrandr for dual-monitor
setup with an old Radeon card (3570 I think). I also use xflock4 for
locking my screen. I'm not sure if the issue is with the other
apps/hardware or awesome itself, but occasionally (once a week or so)
unlocking the screen after it has been locked only starts my first monitor
and the second monitor stays black.

Cycling through the xrandr configs via a script I put together (copied
below) fixes this issue, but it also detaches all windows from the
secondary monitor and attaches them to the primary, which is annoying since
I then end up spending the next 10-15 minutes moving them all back to
appropriate workflows.

If I attempt to restart the second monitor via xrandr manually without
cycling, nothing seems to happen. I don't mind the cycling as much as
rearranging the windows. Is there an easy way to either fix this bug or
have awesome automatically reattach windows to 2nd monitor if they're
clearly outside the visible range of the first one, or even remember the
positions/screens they were associated with initially and restore that (in
fact this would be quite handy to restore them post-reboot as well).

Thanks




SCREENS=(`xrandr --current | grep '\bconnected' | awk '{ print $1 }'`)
PRIMARY_MONITOR=${SCREENS[0]}
SECONDARY_MONITOR=${SCREENS[1]}
case "$1" in
    1)
        ARGS="--output $SECONDARY_MONITOR --same-as $PRIMARY_MONITOR"
        ;;
    2)
        ARGS="--output $SECONDARY_MONITOR --right-of $PRIMARY_MONITOR"
        ;;
    0)
        ARGS="--output $SECONDARY_MONITOR --off"
        ;;
esac
`xrandr $ARGS`
if [[ "z$1" == "z1" || "z$1" == "z2" ]] ; then
    `xrandr --output $SECONDARY_MONITOR --auto`
fi

Reply via email to