Click to See Complete Forum and Search --> : X 4.1.0 and DRI help


[P]Diablos
09-17-2001, 02:14 PM
Hello,

I'm running Debian woody right now with a Matrox G400 video card. Recently I apt-get upgraded which seems to have upgraded my version of X from 4.0.3 to 4.1.0. Either way, I downloaded the Quake 3 demo to see what it would run like in linux. When I first ran it, I got an error about libGL.so not found and the game didn't launch. I then did an apt-get to install the Mesa GL drivers, and moved the libGL.so file to the quake3 folder. Excellent, the game fired up...however everything is *so* slow and I know it's because I don't have 3D acceleration enabled.

To get 3D acceleration, I need to enable DRI, correct? Well I thought I enabled it in my XF86Config-4 file by doing:

Section "Module"

Load "ddc"
Load "GLcore"
Load "dbe"
Load "dri"
Load "extmod"
Load "glx"
(more stuff..)
End Section

I then checked my XF86 logs and saw :

[drm] failed to load kernel module "mga"
(II) MGA(0): [drm] drmOpen failed
(EE) MGA(0): [drm] DRIScreenInit failed. Disabling DRI.

I try doing an insmod mga but get this message:

Using /lib/modules/2.2.19pre17/misc/mga.o
/lib/modules/2.2.19pre17/misc/mga.o: init_module: Device or resource busy
Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters

Anyone have any idea what I can do to enable DRI? Is that even what I want to do to get 3D acceleration in Linux? Thanks for the help

[P]Diablos
09-18-2001, 01:08 PM
Ok, well I was trying out a few things today and ended up (while in KDE 2.1) moving my mga.o and mga_drv.o files from /usr/X11R6/lib/modules (i think that's the path) to the trash can. I then copied what I thought was a newer version of these files into that location. I exit out of X and then startx. It tells me no screens were found and that mga.o is an invalid module.

What can fix this? The old mga.o and mga_drv.o files should still be on my hard drive somewhere if I only moved them to the trash can, right? Where would they be then? And if I can't salvage those files, is there a way I can uninstall X and then reinstall it? would apt-get remove anythingxrelated do that? thanks for the help..

bdg1983
09-18-2001, 04:33 PM
If you left-click on the trash can, does it not open up Konqueror and show the contents of Trash?

Or else browse to ~/Desktop2/Trash and see if the modules are still there.

[P]Diablos
09-19-2001, 06:01 PM
I guess I should have made things clearer, I'm not able to startx at all right now. I did find the modules in the trashcan without X, but moving them back to their original folders didn't help. This is what I get currently when I go to 'startx' using the mga.o driver:

(II)Loading /usr/X11R6/lib/modules/drivers/mga.o
Not Loading: .text.lock
.rel.text.lock
.fixup
.rel.fixup
.__ex_table
.rel__ex_table
.modinfo
(EE)LoadModule: Module mga does not have a mgaModuleData data object
(II)Unloading /usr/X11R6/lib/modules/drivers/mga.o
(EE)Failed to load module "mga" (invalid module, 0)

Fatal Server error:
No screens found

When I try using the mga_drv.o file (by editing my XF86-Config-4 file by hand) I get the same error.

I was able to startx using a vga driver, but the I only saw 1/8 the screen and it was distorted looking. Does anyone have any idea how I can fix this? I have 4 driver files for my MGA 400 card: mga_drv.o and mga.o in /usr/X11R6/lib/modules/drivers/ - and - mga_drv.o and mga.o in /lib/modules/2.2.19pre17/misc. All of these don't work and give me the same error about an invalid module.

Please, how do I fix this?? Argh I am kicking myself right now..everything was working just fine and I go and try to do too much and end up fscking over X =/

bdg1983
09-19-2001, 06:20 PM
Usually when you get

Fatal Server error:
No screens found

you need to reconfigure X using either xf86cfg (specific to X4) or xf86config (X4 and X3.3).

Backup your existing XF86Config-4 and try configuring X again.

These are some of my own notes from the X4.1 documentation and a few others I added. It may help.

XFree86 -configure

Run the configuration program that will probe and/or guess all your settings.
This will create a new conf in the root directory.
To test this new configuration, run this command:

XFree86 -xf86config /root/XF86Config.new

This will display a grey hatch with an 'X' for the mouse cursor.
If this works fine, hit CTRL-ALT-BACKSPACE to return to the commandline.
Copy this file to the /etc/X11/ directory using this command:

cp /root/XF86Config.new /etc/X11/XF86Config

This may not work correctly as further configuration will need to be done.

xf86cfg

If errors such as library not found when running xf86cfg, then do the following

ldconfig

as it should fix the library not found errors. Hopefully...

xf86cfg

This creates the same XF86Config.new file, so to test it, follow the same steps as before.

XFree86 -xf86config /root/XF86Config.new

cp /root/XF86Config.new /etc/X11/XF86Config-4

[P]Diablos
09-19-2001, 09:33 PM
Alright, I think we're getting somewhere...

I run XFree86 -configure and copy the config file to etc/X11. If I startx now, I get it to start with no errors, but I'm using a vesa driver and the screen looks bad. If I then run an xf86cfg I can start configuring some stuff in there, but in certain areas of the config program, for example if I go to configure the mouse, the computer locks up with the grey hatch and X for a cursor display.

If I edit my XF86Config-4 file generated by XFree86 -configure to use the mga driver instead of the vesa one, I still get the same problem of mga.o being invalid. Any clue on what to do next? Is there any way I can get a good version of the mga driver, by reinstalling X or something like that? Thanks for the help

[P]Diablos
09-19-2001, 11:20 PM
Quick little update here, in my first post I said:

"I try doing an insmod mga but get this message:

Using /lib/modules/2.2.19pre17/misc/mga.o
/lib/modules/2.2.19pre17/misc/mga.o: init_module: Device or resource busy
Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters"

Well, after poking around some more today, I went and did an 'insmod mga' again, and lo and behold it worked.. now when I do lsmod I see the mga module there.

However, I STILL keep getting the same error about the module mga not having a mgaModuleData data object...argg could I just have someone send me ther mga.o file for X 4.1.0? Could that work?

bdg1983
09-20-2001, 05:42 AM
I tried to send you the modules, but my @home email is not working. Had the same problem last night.

I'll try to fix (or hopefully it is fixed) when I get home from work. Post if you still need the modules.

[P]Diablos
09-20-2001, 03:00 PM
Alright, someone just sent me their mga.o file and I tried it and got the same error. Only thing I can think of now is get the X 4.1.0 source and recompile mga.o. If I were to do that, I could just recompile mga.o, right? I wouldn't have to recompile all of X?

DrDebian
09-20-2001, 03:33 PM
Originally posted by [P]Diablos:
<STRONG>Hello,

I'm running Debian woody right now with a Matrox G400 video card. Recently I apt-get upgraded which seems to have upgraded my version of X from 4.0.3 to 4.1.0. Either way, I downloaded the Quake 3 demo to see what it would run like in linux. When I first ran it, I got an error about libGL.so not found and the game didn't launch. I then did an apt-get to install the Mesa GL drivers, and moved the libGL.so file to the quake3 folder. Excellent, the game fired up...however everything is *so* slow and I know it's because I don't have 3D acceleration enabled.
</STRONG>

I recently had similar problems and posted about them on www.debianhelp.org. (http://www.debianhelp.org.) I got serious help from an expert who knew what he was talking about. You can find it here: http://www.debianhelp.org/article.php?sid=725

[P]Diablos
09-20-2001, 11:09 PM
Well I just spent a few hours trying to make the mga driver again with no luck. I've completely run out of ideas. Does anyone know if I just apt-get remove ANYTHING_X_RELATED and then apt-get install those packages back if that would work?