Description of Problem: The mga driver in XFree86-4.1 does not restore text mode properly, when returning to nonstandard text mode (/etc/lilo.conf vga=7), instead of restoring the clock that was when X started. Version-Release number of selected component (if applicable): XFree86-4.1.0 (XFree86-4.2.0 in rawhide ?). How Reproducible: Steps to Reproduce: 1. Matrox G450, XWindow 4.1.0 2. /etc/lilo/conf with line vga=7 3. startx 4. Ctrl-Alt-F1 -> for my monitor ADI 6P - refresh out of range for XWindow resolution 1280x1024 or vrefresh 167 Hz for XWindow resolution 1024x768 etc. Patch: diff -uNr xc.orig/programs/Xserver/hw/xfree86/drivers/mga/mga.h xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h --- xc.orig/programs/Xserver/hw/xfree86/drivers/mga/mga.h Fri May 4 21:05:41 2001 +++ xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h Mon Jan 28 18:59:46 2002 @@ -117,6 +117,7 @@ unsigned char * DacRegs; unsigned long crtc2[0x58]; unsigned char dac2[0x21]; + Bool PIXPLLC_Saved; CARD32 Option; CARD32 Option2; CARD32 Option3; diff -uNr xc.orig/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c --- xc.orig/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c Fri Apr 6 18:51:19 2001 +++ xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dacG.c Mon Jan 28 18:57:22 2002 @@ -212,6 +212,7 @@ if(MGAISG450(pMga)) { G450SetPLLFreq(pScrn, f_out); + pReg->PIXPLLC_Saved = FALSE; return; } @@ -672,7 +673,7 @@ (i == 0x1c) || ((i >= 0x1f) && (i <= 0x29)) || ((i >= 0x30) && (i <= 0x37)) || - (MGAISG450(pMga) && + (MGAISG450(pMga) && !mgaReg->PIXPLLC_Saved && ((i == 0x2c) || (i == 0x2d) || (i == 0x2e) || (i == 0x4c) || (i == 0x4d) || (i == 0x4e)))) continue; @@ -794,6 +795,8 @@ for (i = 0; i < DACREGSIZE; i++) mgaReg->DacRegs[i] = inMGAdac(i); + mgaReg->PIXPLLC_Saved = TRUE; + mgaReg->Option = pciReadLong(pMga->PciTag, PCI_OPTION_REG); mgaReg->Option2 = pciReadLong(pMga->PciTag, PCI_MGA_OPTION2); diff -uNr xc.orig/programs/Xserver/hw/xfree86/drivers/mga/mga.h xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h --- xc.orig/programs/Xserver/hw/xfree86/drivers/mga/mga.h Fri May 4 21:05:41 2001 +++ xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h Mon Jan 28 18:59:46 2002 @@ -117,6 +117,7 @@ unsigned char * DacRegs; unsigned long crtc2[0x58]; unsigned char dac2[0x21]; + Bool PIXPLLC_Saved; CARD32 Option; CARD32 Option2; CARD32 Option3; Additional Information: This patch is from http://www.xfree86.org/pipermail/xpert/2002-January/014666.html
The patch doesn't apply cleanly. Please attach all patches as bugzilla file attachments so that whitespace changes do not get mixed into the patch. Thanks
Created attachment 44236 [details] Patch for XFree86-4.1.0-15.src.rpm
Patch modified to work with XFree86 4.2.0 and applied to 4.2.0 build. Will appear in rawhide shortly.
This is also a problem with the MGA 200 card, tried vga=7 and "video=matrox:vesa:0x0x1B8". no luck, still a problem. output from messages: Apr 4 10:08:35 lxready gnome-name-server[1630]: input condition is: 0x11, exiting Apr 4 10:08:35 lxready gdm(pam_unix)[1412]: session closed for user readyp Apr 4 10:08:36 lxready kernel: bridge-eth0: clear IFF_PROMISC Apr 4 10:08:36 lxready gdm[1412]: gdm_slave_xioerror_handler: Fatal X error - Restarting :0 Apr 4 10:08:52 lxready gdm(pam_unix)[5456]: session opened for user readyp by (uid=0) Apr 4 10:08:56 lxready gnome-name-server[5584]: starting Apr 4 10:08:56 lxready gnome-name-server[5584]: name server starting Just got 4.2 from xfee86.org and testing