diff --git a/src/i830_driver.c b/src/i830_driver.c
index e000d92..708b961 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3002,10 +3002,10 @@ I830LeaveVT(int scrnIndex, int flags)
 
    xf86_hide_cursors (pScrn);
 
-   ResetState(pScrn, TRUE);
-
    RestoreHWState(pScrn);
 
+   ResetState(pScrn, TRUE);
+
    if (pI830->debug_modes) {
       i830CompareRegsToSnapshot(pScrn, "After LeaveVT");
       i830DumpRegs (pScrn);
