From: Svetoslav S. <ga...@st...> - 2003-04-10 12:31:50
|
Quoting Aiv...@un...: > > Hi all, > Previous xf86 hack may be is ugly, but works for me long time. > Blank > screen, then user type Ctrl-Alt-Fx, realy dont like me, and possible > don't > like others concurent X's users. > I test same "hack" versions again. When X server do not see > in PCI devices list neighbourhood video adapter, then it do no try > disable > unused video adapters. So , we should restrict video adapters > visibility > for runing X servers. Fortunately all info about video adapters > colected > in one xf86 function FindPCIVideoInfo(void) and one time during xf86 > initialization. Now FindPCIVideoInfo(void) body is changed and xf86 > can see only video adapter specified with additional parameter > -prefbusid (This mean "preferred PCI bus identifier"). > startx -- -prefbusid 1:0:0 now will use only AGP adapter. > Without this parameter xf86 is unchanged. once again :) why not use just "-prefbusid" & BusID "PCI:1:0:0" in the Xconf (at least on mandrake this option is set by the XFconfigurator when more then one card is found) or even add Option "PrefBusID" "1:0:0" in the Xconf this would save some typing on the console, and whould make the display manager conf files a bit cleaner (shorter commands) & the old dm config files could be used :) > Advantages against old multihead "hack": > 1) user can use Linux text mode Virtual Consoles. > 2) AGP server now is restartable (at least for Nvidia). > Disadvantages: > User cannot use text mode console during secondary xf86 init. don't you lose VGA console when you start secondary X with the previous patch ? i do :( > secondary xf86 cannot be started from VC ! > > Howto restore VGA fonts: > Ctrl-Alt-F1 -- show garbage on screen > Ctrl-F7 -- switch back to xf86 > Ctrl-Alt-F1 -- to text mode console, now standard look. > > Garbage pop up only , than user 1-st time switch to text mode. > After 1-st switch console and xf86 can be changed any times, until > secondary xf86 do full restart. I cannot undestand why libint10.a clean > up > VGA fonts. Real, unreal, protected CPU modes is strange for me. > Actualy libint10.a is perpretrator. If user try switch to VC during > 2-nd > xf86 > initialization, then VC show 2-nd video adapter boot message and > system hung up. Seems libint10.a need legacy VGA. > xf86 startting order: > 1-st must be started xf86 over primary (VGA) video adapter. xf86 store > VGA fonts internal. > 2-nd may start any xf86 wich use secondary adapter. > xf86 stopping oder: > 1-st must be stopped all secondary xf86 servers. > last must be stopped xf86 over VGA. this xf86 should restore VGA > fonts. > If VGA fonts are not restored may be used "/bin/consolechars -d" - > I add this command in my desktop manager start/stop script. > > Reverse xf86 stopping order used by gdm, but oft VGA fonts are not > restored and I add "consolechars -d". Of course international user > should > restore their national fonts. do you have idea how does xdm/kdm stops the X servers ? and could you give a try to bruby Xserver menu ( you'll find a link in the how-to and on the contrib page) i have to update the Xserver menu page a bit, i found out that kdm do not use [kde-prefix]/share/config/kdm/Xservers & it doesn't use it's own /var/run/*.pid but the one from xdm, so if you want to test it with kdm modify the line in restartDM.sh. and under xdm/kdm the by reseting the display manager to activate the changes does not end the current session on the X from which the bruby_X was called (need to test it a bit: when, why, how xdm/kdm restart the X servers) > I have troubles with my bunch of Nvidia. I can start xf86 servers only > in one order 0:11:0, 0:9:0, 1:0:0. To go around the ban I start xf86: > X -probeonly -layout X2 > X -probeonly -layout X1 > startx -- X0 :0 -layout X0 -prefbusid 1:0:0 vt7 > startx -- X1 :1 -layout X1 -prefbusid 0:9:0 vt16 > startx -- X2 :2 -layout X2 -prefbusid 0:11:0 vt8 > This is Nvidia specific feature/bug. (driver version 1.0-4349) > > file: http://startx.times.lv/xf86-430-prefbusid.diff > > text: > diff -Nurp xc/programs/Xserver/hw/xfree86/common/xf86Globals.c > xc-chg-prefbusid/programs/Xserver/hw/xfree86/common/xf86Globals.c > --- xc/programs/Xserver/hw/xfree86/common/xf86Globals.c > 2003-02-20 > 04:05:14.000000000 +0000 > +++ xc-chg-prefbusid/programs/Xserver/hw/xfree86/common/xf86Globals.c > 2003-04-01 16:28:14.000000000 +0100 > @@ -215,6 +215,7 @@ Bool xf86MiscModInDevAllowNonLocal = FAL > #endif > PropertyPtr *xf86RegisteredPropertiesTable = NULL; > Bool xf86inSuspend = FALSE; > +PciBusId xf86PrefBusId; > > #ifdef DLOPEN_HACK > /* > diff -Nurp xc/programs/Xserver/hw/xfree86/common/xf86Init.c > xc-chg-prefbusid/programs/Xserver/hw/xfree86/common/xf86Init.c > --- xc/programs/Xserver/hw/xfree86/common/xf86Init.c 2003-02-26 > 09:21:38.000000000 +0000 > +++ xc-chg-prefbusid/programs/Xserver/hw/xfree86/common/xf86Init.c > 2003-04-01 17:54:13.000000000 +0100 > @@ -1553,6 +1553,24 @@ ddxProcessArgument(int argc, char **argv > xf86AllowMouseOpenFail = TRUE; > return 1; > } > + if (!strcmp(argv[i], "-prefbusid")) > + { > + int bus, device, func; > + if (++i >= argc) > + return 0; > + if (sscanf(argv[i], "%d:%d:%d", &bus, &device, &func) == 3) > + { > + xf86PrefBusId.bus = bus; > + xf86PrefBusId.device = device; > + xf86PrefBusId.func = func; > + return 2; > + } > + else > + { > + ErrorF("Invalid preferred PCI BusId\n"); > + return 0; > + } > + } > /* OS-specific processing */ > return xf86ProcessArgument(argc, argv, i); > } > diff -Nurp xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c > xc-chg-prefbusid/programs/Xserver/hw/xfree86/common/xf86pciBus.c > --- xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c 2003-02-18 > 15:42:11.000000000 +0000 > +++ xc-chg-prefbusid/programs/Xserver/hw/xfree86/common/xf86pciBus.c > 2003-04-01 17:29:10.000000000 +0100 > @@ -160,7 +160,10 @@ FindPCIVideoInfo(void) > int num = 0; > pciVideoPtr info; > Bool mem64 = FALSE; > + int DoPrefBusIdCheck = 0; > > + if( xf86PrefBusId.bus || xf86PrefBusId.device || xf86PrefBusId.func > ) > + DoPrefBusIdCheck = 1; > pcrpp = xf86PciInfo = xf86scanpci(0); > getPciClassFlags(pcrpp); > > @@ -182,7 +185,11 @@ FindPCIVideoInfo(void) > subclass = pcrp->pci_sub_class; > } > > - if (PCIINFOCLASSES(baseclass, subclass)) { > + if (PCIINFOCLASSES(baseclass, subclass) && > + (DoPrefBusIdCheck ? > + (xf86PrefBusId.bus == pcrp->busnum && > + xf86PrefBusId.device == pcrp->devnum && > + xf86PrefBusId.func == pcrp->funcnum):1)) { > num++; > xf86PciVideoInfo = xnfrealloc(xf86PciVideoInfo, > sizeof(pciVideoPtr) * (num + 1)); > diff -Nurp xc/programs/Xserver/hw/xfree86/common/xf86Priv.h > xc-chg-prefbusid/programs/Xserver/hw/xfree86/common/xf86Priv.h > --- xc/programs/Xserver/hw/xfree86/common/xf86Priv.h 2002-12-12 > 18:29:10.000000000 +0000 > +++ xc-chg-prefbusid/programs/Xserver/hw/xfree86/common/xf86Priv.h > 2003-04-01 16:28:42.000000000 +0100 > @@ -53,6 +53,7 @@ extern Bool xf86BestRefresh; > extern Gamma xf86Gamma; > extern char *xf86ServerName; > extern Bool xf86ShowUnresolved; > +extern PciBusId xf86PrefBusId; > > /* Other parameters */ > > Please replay if I gibber and please replay if You done. > Aivils Stoss > p.s. ISA and VLB adapters stay untested :-) > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: ValueWeb: > Dedicated Hosting for just $79/mo with 500 GB of bandwidth! > No other company gives more support or power for your dedicated server > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ > _______________________________________________ > Linuxconsole-dev mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxconsole-dev > |