diff -u orig/regs3v.h xc/programs/Xserver/hw/xfree86/vga256/drivers/s3v/regs3v.h
--- orig/regs3v.h	Thu Nov 18 16:57:17 1999
+++ xc/programs/Xserver/hw/xfree86/vga256/drivers/s3v/regs3v.h	Thu May 25 14:16:00 2000
@@ -46,13 +46,15 @@
 
 
 #define VerticalRetraceWait() \
-{ \
+{ unsigned char tmp; \
+   tmp = inb(vgaCRIndex); \
    outb(vgaCRIndex, 0x17); \
    if ( inb(vgaCRReg) & 0x80 ) { \
        while ((inb(vgaIOBase + 0x0A) & 0x08) == 0x00) ; \
        while ((inb(vgaIOBase + 0x0A) & 0x08) == 0x08) ; \
        while ((inb(vgaIOBase + 0x0A) & 0x08) == 0x00) ; \
        }\
+   outb(vgaCRIndex, tmp); \
 }
 
 #if 0 /* currently not used at all */
diff -u orig/s3v_accel.c xc/programs/Xserver/hw/xfree86/vga256/drivers/s3v/s3v_accel.c
--- orig/s3v_accel.c	Mon May 10 18:51:13 1999
+++ xc/programs/Xserver/hw/xfree86/vga256/drivers/s3v/s3v_accel.c	Thu May 25 14:17:54 2000
@@ -321,7 +321,8 @@
 S3VGEReset(int from_timeout, int line, char *file)
 {
     unsigned long gs1, gs2;   /* -- debug info for graphics state -- */
-    unsigned char tmp, sr1, resetidx;
+    /* HK: resetidx doesn't work yet, use read-only register for fake */
+    unsigned char tmp, sr1, resetidx=0x2e;  
     int r;
     int ge_was_on = 0;
     int32  fifo_control, miu_control, streams_timeout, misc_timeout;
@@ -411,6 +412,7 @@
 
       if(tmp & 0x01) {
         tmp &= ~0x01;
+	outb(vgaCRIndex,resetidx);
         outb(vgaCRReg, tmp);
         ge_was_on = 1;
         usleep(10000);
@@ -421,6 +423,7 @@
       usleep(10000);
 
       VerticalRetraceWait();
+      outb(vgaCRIndex,resetidx);
       outb(vgaCRReg, (tmp & ~0x02));
       usleep(10000);
 
