Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
MGA driver update ... back to FBDev driver [unSolved]
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2643
Location: Slovenia

PostPosted: Thu Nov 22, 2012 1:49 pm    Post subject: Reply with quote

I've found a post saying that video overlay requires the mga_hal module. If that's true, awesome.

I doubt it'll work, but try textured video:
Code:
  Option "TexturedVideo" "true"

This will disable DRI though, but I'd say video playback is more important than 3D, I doubt you'll be gaming on this machine. I'll tell you one thing though, the mga driver is a big giant mess. That thing I said about wanting a Matrox card to play with? Forget it, just buy a new graphic card.
Back to top
View user's profile Send private message
destroyedlolo
Guru
Guru


Joined: 17 Jun 2011
Posts: 530
Location: Close to Annecy (France)

PostPosted: Thu Nov 22, 2012 3:05 pm    Post subject: Reply with quote

TexturedVideo doesn't help ether :cry:

But that + recurrent system freezings I'm facing, it's probably time to me to have a look for a new PC that have to be saved from recycling ... :evil:

I've liked playing w/ this little piece of &$*#, but I'm loosing to much time for nothing : after all, it's not an Amiga, it's a PC, and a PC is by definition disposable.

I'll revert back to the previous version of Xorg :arrow: my spare machine collection.
Back to top
View user's profile Send private message
destroyedlolo
Guru
Guru


Joined: 17 Jun 2011
Posts: 530
Location: Close to Annecy (France)

PostPosted: Mon Nov 26, 2012 5:37 pm    Post subject: Reply with quote

Well, well well : what I have to recompile to revert back to previous version of Xorg ?

I recompiled xorg-server and as well as drivers ... but at startup, X give only a black screen and I even wasn't able to switch to a terminal :?

So What I missed ?
Back to top
View user's profile Send private message
pa1983
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jan 2004
Posts: 97

PostPosted: Mon Jun 02, 2014 3:33 pm    Post subject: Reply with quote

I know this thread is old but I bought a Matrox G450 for my Digital Alpha Personal Workstation 6-7 years ago. Ran as a filesrver so no X.
I took the Alpha down and repaired a few hardware faults and got gentoo on it again.

I struggled to get any form of X to work with out crashing the card and the system. I finally solved that but to my disappointment I realized mga has no dri driver in mesa since 8.0.

I was running Xorg-server-1.15 and mesa-10.0.4.

I read this thread and another one.
http://www.mintppc.org/forums/viewtopic.php?f=20&t=1464

My first idea was to try to downgrade mesa, xorg and some other packages but that proved a bad idea.
Then I read that some on in this gentoo thread suggested to compile and use the mga_dri.so driver only with existing mesa.

So I downloaded the mesa 7.11.2 sources from the link below and extracted it to /usr/src/
http://ppa.launchpad.net/xorg-edgers/mesa-legacy/ubuntu/pool/main/m/mesa-legacy/mesa-legacy_7.11.2.orig.tar.gz

Then I emerged "x11-misc/makedepend" since i did not have that and its required for ./configure to work.

Then i found this page whit some information on how to compile mesa. My own first attempt I did not manage to get mga_dri.so to build. since I was missing some options.
http://x.debian.net/howto/build-mesa.html

I did not fallow that guide precisely, I deduced that i could remove some of those compile options from checking the default flags on my newer x86_64 machines. I also had to add some options to get it to work.

This was what I ended up whit and executed from a terminal.

Code:
./configure --enable-driglx-direct --enable-glx-tls --with-driver=dri --with-dri-driverdir=/usr/lib/dri --with-egl-platforms='drm x11' --with-dri-drivers=mga --enable-shared-glapi


When I tested tuxracer using this it segmentation faulted a few seconds in to the game. Now this migth not be a problem for x86 or amd64 users.

IMPORTANT! OPTIONAL!
I realized that compiling manually dont use the CFLAGS from make.conf meaning no CPU specific flags.
For me using an Alpha CPU thats very important since Alpha natively is not IEEE floating point complaint. This can cause problems with X according to the gentoo wiki and cause segmentation faults.

So I ran .configure like this.

Code:
./configure CFLAGS="-mieee -pipe -O2 -mcpu=ev56" --enable-driglx-direct --enable-glx-tls --with-driver=dri --with-dri-driverdir=/usr/lib/dri --with-egl-platforms='drm x11' --with-dri-drivers=mga --enable-shared-glapi


Now you should replace the CFLAGS="" with the CFLAGS in you /etc/portage/make.conf to match your system.
I recommend doing this on all architectures, x86 and amd64 included.
I recommend doing it this way to get the best optimization for your system.

On bonus I noticed using 24bit colors was that glxgears increased its FPS by a factor of 3x so its almost as fast as 16bit mode. On the other hand when I tested extreme-tuxracer opengl did not work so it seems to default to software rendering. I could play but the frame rate where borderline unplayable. But unlike my first method of compiling tuxracer did not segmentation fault now.
For me with Alpha that could be due to using -mieee to make sure my driver complies with ieee floating point standard.

Now if you use other legacy dri only drivers that mesa-8.0 and up dont support this should work to I figured so you can change the "--with-dri-drivers=" to a suitable driver and you should read the link on how to compile mesa to figure out what extra option your drivers might require. Some use --enable-gallium-* fallowed by the drivers name.

once ./configure is done configuring I ran "make" to compile Mesa-7.11.2.

Then I copied the driver to its proper location so Xorg can use it.

Code:
cp /usr/src/Mesa-7.11.2/src/mesa/drivers/dri/mga/mga_dri.so /usr/lib/dri/


After that I started X and 2D was significantly faster. glxgears went from 5fps to around 200fps so 3D works to.

Before I had the mga_dri.so driver glxinfo printed the fallowing message.

Code:
libGL error: failed to load driver: mga
libGL error: Try again with LIBGL_DEBUG=verbose for more details.


Now that message is gone.

2D graphics is still to slow and thats because Xorg after version 1.12 dont support XAA acceleration. EXA is an option but buggy.
So the best thing is to emerge xorg-serve 1.12 by masking out any newer servers,
if you already have Xorg installed make sure to rebuild your xorg drivers like evdev, mga or any other drivers you migth use.
It might also be easier to downgrade if needed by first unmerging your xorg drivers. They should be pulled in again once you emerge xorg-server-1.12.

Now you should have a fast and smooth 2D experience.
3D seems to be a hit and miss. extreme-tuxracer dont seem to run in hardware mode, it complains about some missing device. Lots of GL screensavers in xscreensaver runs slowly.
Blender works relatively well but its pretty limited by my old 500mhz Alpha CPU.
Best results so fare is with quakeforge, quake 1 port and OpenGL is not realy faster in 320x200 in OpenGL VS software render but it only loses some fps even at 1024x768 with OpenGL. Software render on the other hand starts to slow down pretty quickly at 400x300 and higher and was unplayable at 640x480 so it seems to run of the GPU pretty well and runs at 15-70fps min/max for in 640x480.
Quake 3 (ioquake3) also worked but I think the GPU is to slow. Way to much fps drops in fights but I got 40fps+ at times. I had an old K6-2 450@ 500 and it could play it with a GeForce 2 GTS in windows but even that was slow at times since quake 3 requires som what better CPU to run smooth and the G450 is probably to slow to.

Im no developer or anything but should it not be possible to create a legacy-mesa package from mesa 7.x that just installs the desired drivers according to 'VIDEO_CARDS=' flags?

Any way that was how i got my no longer supported Matrox G450 32Mb to work with Mesa-10.0.4 and Xorg-server-1.12.
_________________
WS: i7 3930K @4Ghz, 32Gb ram, 128Gb SSD, GTX780 3Gb, NICs: Intel 2x1Gbit
NAS: Core I3-4360 3.7Ghz, 20Gb ram, 256Gb SSD, 36Tb HDD, NICs: Intel 2x1Gbit
ROUTER: Celeron J1900 2Ghz, 8Gb ram, 128Gb SSD, NICs: 2x1Gbit, WIFI: Intel AC 7260, Atheros AR5005G


Last edited by pa1983 on Tue Jun 10, 2014 9:02 pm; edited 16 times in total
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 1801
Location: Berlin, Germany

PostPosted: Mon Jun 02, 2014 3:51 pm    Post subject: Reply with quote

Creating an ebuild for legacy mesa drivers has been on our TODO list for some time, but nobody got to it yet.
Back to top
View user's profile Send private message
destroyedlolo
Guru
Guru


Joined: 17 Jun 2011
Posts: 530
Location: Close to Annecy (France)

PostPosted: Mon Jun 02, 2014 5:08 pm    Post subject: Reply with quote

I switched to a i5 laptop to edit video (because this Athlon is definitively too weak now I switched to full HD with my GoPro). Anyway, I'm still using this ancestor for development purposes and it would be fine if I can bring it back to decent 2D manipulation :D

No time to work on it, just a encouragement.
Back to top
View user's profile Send private message
pa1983
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jan 2004
Posts: 97

PostPosted: Mon Jun 02, 2014 5:47 pm    Post subject: Reply with quote

3D seems to work to, its way faster at least. But I will have to try more later.
My xorg.conf is not even done yet its just at the point where it "works". Need final tuning.
Now that I know how to solve the problem its a easy fix and the time it takes realy depends on the CPU performance during compilation.

EDIT.

Running windows still lags a bit to move around and 3D lagged even more when moving windows (Ran glxgears).
I read som where that XAA dont work any more and setting acceleration to that did no difference (should on by default any way).
So I set the string in xorg.conf to this instead.

Code:
Option "AccelMethod" "EXA"


And now 2D is smooth when moving windows, can move around windows in MWM smoothly with out seeing individual frames of the window drawing.
And with glxgears running moving other windows are still smooth like a modern PC so yea that seems to be needed to get smooth drawing.

Not sure if 3D is software or hardware accelerated tough. Suspect it runs on the CPU but at least its 40x faster now then before.

If and when I get my alpha machine working well enough (it seems to have an intermittent hardware fault, its old so cant do t o much about it) I will post a working xorg.conf that can be used as a templet. And by templet I mean that it still might require alteration depending on screen and other hardwares. I run alpha so I must disable the use of vesa bios.

EDIT2:
EXA was buggy. Caused segmentation faults in some programs. Seems to be a old bug.
The solution was to downgrade xorg-server to version 1.12 since thats the last one supporting XAA.
Then re-emerge all the xorg drivers like evdev and mga.
Now acceleration works and programs dont crash the Xorg server with segmentation faults.
So make sure to downgrade Xorg and recompile drivers or if your making a new install make sure to mask out xorg-server-1.13 and higher before starting to emerge packages after setting up the base system.

EDIT3:
OpenGL seems to work very well with quakeforge, port of quake 1. Maintains a better FPS at higher resolutions where software render just crawls to a halt. Best results I had so fare with my Matrox G450.
_________________
WS: i7 3930K @4Ghz, 32Gb ram, 128Gb SSD, GTX780 3Gb, NICs: Intel 2x1Gbit
NAS: Core I3-4360 3.7Ghz, 20Gb ram, 256Gb SSD, 36Tb HDD, NICs: Intel 2x1Gbit
ROUTER: Celeron J1900 2Ghz, 8Gb ram, 128Gb SSD, NICs: 2x1Gbit, WIFI: Intel AC 7260, Atheros AR5005G
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum