Avoid flicker with dpms enabled by turning off the screen before drawing the unlock screen.