[YLUG] Dual xorg.conf

Stuart Priest sap1 at york.ac.uk
Thu Nov 16 15:15:26 GMT 2006


Matthew Burton wrote:

> Hey people,
> 
> I'd just like to say thanks for the install day, since then I've been 
> using Ubuntu also exclusively and only switch back to windows to get 
> data from it! I've had a play around with it quite a bit (I'm Linux noob 
> on the whole) and I've got a things working quite well thanks to google 
> and the community wiki.
> 
> I have quite a strange laptop though, I have two graphics cards. They're 
> controlled by a switch on the laptop which instructs the BIOS as to 
> which one to use. So if I want more power (heat, noise and battery drain 
> lol) I can flip onto my 6600. At the moment I've got my xorg.conf 
> looking like this:
> 
>    Section "Device"
>        Identifier    "Intel Corporation Mobile 915GM/GMS/910GML Express
>    Graphics Controller"
>        Driver        "i810"
>        Option        "XAANoOffscreenPixmaps"
>        VideoRam    131072
>        Option        "DRI"        "true"
>        BusID        "PCI:0:2:0"
>    EndSection
> 
>    Section "Device"
>        Identifier    "NVIDIA Corporation NV43 [GeForce Go 6600]"
>        Driver        "nvidia"
>        BusID        "PCI:3:0:0"
>        Option        "NoLogo"
>        Option        "RenderAccel"        "true"
>        Option        "AllowGLXWithComposite" "true"
>    EndSection
> 
>    Section "Monitor"
>        Identifier    "Generic Monitor"
>        Option        "DPMS"
>        HorizSync    28-84
>        VertRefresh    43-60
>    EndSection
> 
>    Section "Screen"
>        Identifier    "Default Screen"
>        Device        "Intel Corporation Mobile 915GM/GMS/910GML Express
>    Graphics Controller"
>    #    Device        "NVIDIA Corporation NV43 [GeForce Go 6600]"
>        Monitor        "Generic Monitor"
>        DefaultDepth    24
>        SubSection "Display"
>            Depth        24
>            Modes        "1680x1050"
>        EndSubSection
>    EndSection
> 
> 
> At the moment I have to edit xorg.conf every time I want to switch card 
> by changing the comment bit! And have to remember the one I last used 
> otherwise I get nothing on screen at all (since the other card is 
> disabled by the BIOS)!
> 
> So my question, is there a way I can make a script or something that 
> asks me which card I'm using before X starts and changes my xorg.conf 
> automatically?

If you set your default runlevel to 3 rather than 5 (edit /etc/inittab 
and change the line that looks like "id:5:initdefault:" to 
"id:3:initdefault:") then everytime you boot you will enter text mode. 
Login, and then create two versions of the xorg.conf file, then create 
two aliases in your login startup files, "start_first" and 
"start_second".  The aliases should simply copy the appropriate 
xorg.conf file to /etc/X11/xorg.conf and then run "startx" which will 
start your X11 windows.  Hope that's clear.

Regards
-- 
Stuart Priest
Bioscience Computing Manager, Dept. of Biology (Area 15)
University of York, PO Box 373, YORK, YO10 5YW, UK
Telephone 01904 328744, mobile 07876 577900, FAX 01904 328266



More information about the York mailing list