On Fri, Mar 02, 2012 at 09:27:52PM -0600, joshua stein wrote: > hi friends, > > this enables vt switching on my laptop (dell xps 13) with > sandybridge video: > > vga1 at pci0 dev 2 function 0 "Intel GT2 Video" rev 0x09 > > previously it would do nothing on ctrl+alt+f1 and redraw the screen > on ctrl+alt+f5. now i am able to switch between the console and X > multiple times without any problems or artifacts. > > can i get some tests on other sandybridge systems like an x220 and > on non-sandybridge intel video machines? >
It fixes the text mode on switching VTs and exiting X on my X220, but it still panics when trying to restart X after exiting it. And it only works if you don't suspend the machine. After a suspend/resume cycle, X still comes back, but text mode VTs stay black again. My X220 also has: vga1 at pci0 dev 2 function 0 "Intel GT2+ Video" rev 0x09 But text mode is still black whith your patch on my Toshiba laptop with Ironlake graphics: vga1 at pci0 dev 2 function 0 "Intel Mobile HD graphics" rev 0x02 On my X40 it doesn't seem to break anything: vga0 at pci0 dev 2 function 0 "Intel 82855GM Video" rev 0x02 > > diff --git a/driver/xf86-video-intel/src/intel_driver.c > b/driver/xf86-video-intel/src/intel_driver.c > index 03b1586..8f04695 100644 > --- a/driver/xf86-video-intel/src/intel_driver.c > +++ b/driver/xf86-video-intel/src/intel_driver.c > @@ -1552,7 +1552,7 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags) > > if (!intel->use_drm_mode) { > /* console hack, stolen from G80 */ > - if (IS_GEN5(intel)) { > + if (IS_GEN5(intel) || HAS_PCH_SPLIT(intel)) { > if (xf86LoadSubModule(scrn, "int10")) { > intel->int10 = xf86InitInt10(pEnt->index); > if (intel->int10) { > @@ -1779,9 +1779,6 @@ static Bool RestoreHWState(ScrnInfoPtr scrn) > vgaRegPtr vgaReg = &hwp->SavedReg; > int i; > > - if (HAS_PCH_SPLIT(intel)) > - return TRUE; > - > DPRINTF(PFX, "RestoreHWState\n"); > > /* Disable outputs */ > @@ -2600,7 +2597,8 @@ static void I830LeaveVT(int scrnIndex, int flags) > RestoreHWState(scrn); > > /* console restore hack */ > - if (IS_GEN5(intel) && intel->int10 && intel->int10Mode) { > + if ((IS_GEN5(intel) || HAS_PCH_SPLIT(intel)) && > + intel->int10 && intel->int10Mode) { > xf86Int10InfoPtr int10 = intel->int10; > > /* Use int10 to restore the console mode */ > @@ -2610,7 +2608,6 @@ static void I830LeaveVT(int scrnIndex, int flags) > int10->cx = int10->dx = 0; > xf86ExecX86int10(int10); > } > - > } > > i830_unbind_all_memory(scrn); > -- Matthieu Herrb