From: Helge H. <hel...@ai...> - 2003-11-04 09:39:25
|
Svetoslav Slavtchev wrote: > Hi, > > i think i almost got it :-) > > almost, cause my main monitor died in the weekend > and i used a switch, and the accelerated head gives > pretty strange output > > Helge please correct me if i'm wrong somewhere, > or if smth differs from your setup > Some tips: The framebuffer driver is supposed to start the second head in 640x480, but the accelerated driver seems to set it to 1280x1024 while setting the first head to that resolution. Quitting X seems to reset this as "old" settings are restored. Try using the same resolution on both heads. Also, the framebuffer drivers claim to support only 16 or 32 bit color on the second head. So don't bother trying 8 or 24 bit. OpenGL seems to work only with 16bit, so that's what I use. 16-bit color and the same resolution on both screens. I happen to have two identical monitors, others should set up the accelerated driver with timings that both monitors can handle. I believe the second head uses the same timing as the first. Other setups may be possible - this is the "easy" one. >>>How did you got it running? >> >>I used this machine single-headed for a long time. >>All I did was to create a second config file (xf86config-4) >>for fbdev, and use matroxset-0.3 from Petrs site to >>set up which framebuffer connects to what output. >> >>I can set up a guest account on the machine, if you >>want to look more at the setup. >> >> >>>i'm tring with no success quite a long time. >> >>>which version of XFree ? >> >>debian packaged xserver-xfree86-dri-trunk from >>http://people.debian.org/~daenzer/dri-trunk-sid/ >>because I want accelerated opengl on at least one screen. > > that was my first problem, i used the matrox drivers > which obviously doesn't play nice with linux-2.6 > i got all kind of agp errors and tring to activate "UseFBDev" > caused lock ups > switching to the plain mga drivers fixed the problem, > but also the distored screen :( i'll have to play more with it > The matrox drivers (beta 3) were fine in single-screen setup, I haven't tried them with two screens. I gave up on them because the dri-trunk driver was better at doing opengl. If agp cause trouble, consider forcing agp 1x until everything else works. And turn off any kind of overclocking. (Experiment with such things after your setup works...) I use agp 2x, as my old motherboard (bx) isn't supposed to support more than that. I can specify agp4x, but then I have to change the bios from agp=1/1 cpuclk to agp=2/3 cpucl, where the cpu clock is 100MHz. This don't buy anything though, so I use the supported agp 2x and use agp=1/1 cpuclk. Just write down whatever bios settings you have, and test if some really slow settings work better. > >>I got xdm working too. >>>From my /etc/X11/xdm/Xservers: >> >>:0 local /usr/X11R6/bin/X :0 vt7 -deferglyphs 16 -nolisten tcp >>:1 local /usr/X11R6/bin/X :1 vt17 -deferglyphs 16 -nolisten tcp >>-xf86config xf86config-4 >> >>The first server use the standard XF86Config-4 >>This runs the servers, but I had to modify /etc/X11/xdm/Xsetup >>too to actually make the second framebuffer visible. Whenever the >>accelerated server starts, it configures the G550 to show the same >>screen on both outputs. Fortunately, xdm then runs the Xsetup script, >>so that's where I put the following lines: >>/usr/local/bin/matroxset -f /dev/fb/1 -m 0 >>/usr/local/bin/matroxset -f /dev/fb/0 -m 2 >>/usr/local/bin/matroxset -f /dev/fb/1 -m 1 > > > that's basicly the script swapped from the matroset tarball, correct ? Yes, except that I was surprised that the first screen was the second output. It was easy enough to find out though. The xfree driver for g550 really ought to have options for what output port to use. (first, second, both.. use the same numbers as for matroxset.) I currently have to re-run those lines whenever X changes resolution. I.e. when my girlfriend starts tuxracer on the accelerated screen. Any resolution change shows /dev/fb/0 on both screeens, but only the correct one changes resolution. Looks weird, and I have to run matroxset blind to get my own screen back. > >>1. line: disconnect /dev/fb/1 from whatever output it uses (in case it was >>using&blocking output 2) >>2. line: connect /dev/fb/0 to output 2, which is the vga connector >>3. line: connect /dev/fb/1 to output 1, which is the DVI connector with a >>VGA converter. >>The output numbers are really bits, so connecting a framebuffer to output >>3 shows >>it on both screens. There's also a third output, bitnumber 4, but there >>is no such plug. >>Perhaps the video out? "matroxset" seems undocumented. >> >>This setup means both servers get a screen. A minor inconvenience is the >>way >>both screens blink whenever one of the xdm's are reset. >> >> >>>which matrox drivers? >> >>I believe I'm using the mga_drv.o (and fbdev_drv.o) that comes with >>xserver-xfree86-dri-trunk. >>>From /var/log/XFree86.0.log: >>(II) LoadModule: "mga" >>(II) Loading /usr/X11R6/lib/modules-dri-trunk/drivers/mga_drv.o >>(II) Module mga: vendor="The XFree86 Project" >> compiled for 4.3.99.12, module version = 1.1.1 >> Module class: XFree86 Video Driver >> ABI class: XFree86 Video Driver, version 0.7 >> >>>From /var/log/XFree86.1.log: >>(II) LoadModule: "fbdev" >>(II) Loading /usr/X11R6/lib/modules-dri-trunk/drivers/fbdev_drv.o >>(II) Module fbdev: vendor="The XFree86 Project" >> compiled for 4.3.0, module version = 0.1.0 >> ABI class: XFree86 Video Driver, version 0.6 >> >>>From /etc/X11/XF86Config-4 (accelerated) >>Section "Device" >> Identifier "Matrox G550" >> Driver "mga" >> BusID "PCI:01:00:0" >> Option "UseFBDev" "true" > > > without "UseFBDev here i get the "mga" screen of both fb's > and if i run matroxset after "mga" is started ," mga" goes blank > or distored, if i start the "fb" i get lock up > > with "UseFBDev activated everything works, > running matroxset doesn't affect "mga" > (there might be short blanking but i couldn't see as > i used the switch with only one monitor ) > starting "fb" works OK > It is only the unaccelerated screen that blinks for me, because that is the only one that is turned off for a moment. The accelerated screen is on all the time with that script, assuming it was on from the beginning, so no blinking there. > >> Option "HWcursor" "off" #avoid cursor corruption >> Option "AGPMode" "2" #Faster 3D... >> Option "DRIReinit" #Possibly several servers with >>DRI >>EndSection >> >>The last option because someone on the net got DRI working on two >>matrox cards, (PCI+AGP) but only one at a time, unfortunately. >> >>>From /etc/X11/xf86config-4 (fbdev) >>Section "Device" >> Identifier "Matrox G550" >> Driver "fbdev" >># BusID "PCI:01:00:1" >> Option "UseFBDev" "true" >> Option "fbdev" "/dev/fb/1" >> >> Option "HWcursor" "off" #avoid cursor corruption >> >>EndSection >> >>Using BusID here doesn't work. The two files are otherwise >>identical except that they specify different mice. > > > > So, in a recap :-) > (for the howto ) > > 1.) > don't use matrox's closed source driver (mga_hall_drv) > it doesn't support linux-2.6 && the new FB API > do use the original XFree driver > > 2.) > do activate > Option "useFBDev" "true" > for the accelerated head > (? does this option affect "fbdev" unaccelerated head ? ) > > 3.) > get matroxset, build it and install it > install also the swapped script from the tarball > > 4.) > convince xdm/kdm/gdm to run swapped at every X server > start/restart > for xdm/kdm Xsetup > ?for gdm ? wrapper? is there smth like Xsetup used by gdm ? > This seems fine. I don't know what to do with gdm/kdm, other than read the docs and see if they have a similiar file that runs as root after X server initialization before presenting the login screen. It has to be at that moment, after the accelerated server initialization that scrambles the output setup, and before the login screen or you won't see it! xdm seems to work fine for this purpose though. I can restart the fbdev X server anythime without affecting the accelerated one. When running matroxset "blind" fails I simply press ctrl+alt+backspace, killing the fbdev server and then xdm restarts it and runs the script for me. I haven't tried this with the accelerated server yet. It will at least blink the wrong screen as it briefly take over both outputs. Setting up some hotkey for the matroxset script is highly advisable - I haven't bothered figuring it out yet though. This may depend on the window manager used. The framebuffer driver works surprisingly well. Browsing, word processing and 2D games performs fine even with this unaccelerated driver on 500MHz dual cpus. It is still fine with tuxracer running on the other screen using 100% of one cpu. Helge Hafting |