Bug 43824

Summary: MGA/DRI doesn't work with my G450 (unresolved symbols in mga_drv.o)
Product: [Retired] Red Hat Raw Hide Reporter: martin.macok
Component: XFree86Assignee: Mike A. Harris <mharris>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: vladimir.kondratiev
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-06-12 08:35:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description martin.macok 2001-06-07 12:54:41 UTC
Description of Problem:
XFree86-4.1.0-0.0.1 with kernel-2.4.5-0.2.9 (athlon) doesn't use MGA/DRI
acceleration
(needed for OpenGL - like Quake3 arena, tuxracer etc.)
When I start X session, the DRI extension is not loaded, see
/var/log/X*.log:
...
(**) |   |-->Device "Matrox|MGA G450 DualHead LE"
...
Symbol vbeFree from module /usr/X11R6/lib/modules/drivers/mga_drv.o is
unresolve
d!
...
(II) MGA(0): [drm] bpp: 16 depth: 16
(II) MGA(0): [drm] Sarea 2200+664: 2864
[drm] failed to load kernel module "mga"
(II) MGA(0): [drm] drmOpen failed
(EE) MGA(0): [drm] DRIScreenInit failed.  Disabling DRI.
...

My XF86Config-4:
...
Section "Module"
        Load  "dbe"
        Load  "GLcore"
        Load  "dri"
        Load  "glx"
        Load  "extmod"
        Load  "v4l"
EndSection
...
Section "Device"
        Identifier  "Matrox|MGA G450 DualHead LE"
        Driver      "mga"
        BoardName   "MGA G450 AGP"
#       Option      "AGPMode4x"
        Option       "dpms"
        Option      "AGPMode" "4"
        BusID       "PCI:1:0:0"
EndSection
...
Section "Screen"
        Identifier "Screen0"
        Device     "Matrox|MGA G450 DualHead LE"
        Monitor    "F910"
        DefaultDepth     16
...

Steps to Reproduce:
Run X and look at /var/log/XF*.log. Try runnig some openGL software.

Expected Results:
MGA works - OpenGL runs accelerated - Everybody happy ;-)

Additional Information:
My system is RedHat 7.1 with
glib*, glibc*, gtk*, gdk*, XFree*, Mesa*, kernel*, modutils*, gcc*
from Rawhide.

Comment 1 Mike A. Harris 2001-06-07 19:51:59 UTC
You cannot use old kernel DRM modules with XFree86 4.1.0.  Right now, if you
want DRI in rawhide you must compile your own DRM modules.

I'll leave the bug open even though it duplicates many other reports
because of the symbol errors.  I'll fix those first before duping the report.

Thanks.

Comment 2 Vladimir Kondratiev 2001-06-11 11:55:47 UTC
Could you please elaborate what does mean "compile your own DRM modules"?  
Isn't all modules included with XFree86 itself?  
there are (part of XFree86 rpm)  
/usr/X11R6/lib/modules/linux/libdrm.a  
/usr/X11R6/lib/modules/extensions/libdri.a  
/usr/X11R6/lib/modules/dri/mga_dri.so  
Do you mean that  
/lib/modules/`uname -r`/kernel/drivers/char/drm/mga.o  
is out of date? If yes, how could I fix it?  


Comment 3 martin.macok 2001-06-11 13:08:37 UTC
regarding to unresolved symbols:
When I explicitely
Load "vbe"
in XF86config-4, then X server doesn't report unresolved vbeFree during startup.
(anyway, this undresolved symbol seems not critical for me, I think that problem
is just in out of date kernel DRM module -> )

regarding to compiling modules:
When I explicitely load kernel modules
insmod agpgart
insmod mga
before X server startup then X server reports something like "2.x is old version
of DRM module, 3.x is needed". So one should grab source of mga.o kernel DRM
version 3.x module from XFree86-4.1.0 sources and compile it for kernel instead
of the kernel DRM module version 2.x bundled with 2.4.5 kernel. So yes, we are
speaking about /usr/lib/`uname -r`/kernel/drivers/char/drm/mga.o
replacement/upgrade.

Comment 4 Vladimir Kondratiev 2001-06-12 07:18:08 UTC
I rebuild kernel modules, installs them under 
/usr/lib/`uname -r`/kernel/drivers/char/drm/
(for sure, rmmod mga agpgart;depmod -a)
For some reason, now I have to manually do
modprobe agpgart
modprobe mga
otherwise they do not get loaded.
I have no more complains regarding wrong kernel module version.
However , unresolved symbol remains.
If I add
Load "vbe"
to my XF86config-4, I get lots of unresolved symbols in libvbe.
all symbols contains xf86int10 or xf86ExecX86int10.
How could I deal with these symbols?
P.S.
now 'glxinfo' coredumps. Before it caused X server to crash. with 4.0.3 it used
to works fine.

Comment 5 martin.macok 2001-06-12 07:30:08 UTC
Regarding unresolved symbols in vbe:
Try to add:
Load  "int10"
this gets me no more unresolved symbols at all ...

Regarding all:
So does really DRI work now? Try to run some OpenGL software if it's really working.

Regarding glxinfo coredumps:
I saw this in bug #41592

Comment 6 Vladimir Kondratiev 2001-06-12 08:30:06 UTC
I confirm that
Load "int10"
resolves all unresolved symbols.

DRI do works. My card is G200.
'gears' from Mesa-demos reports
about 250 FPS in window 300x300
about 180 FPS in window 500x500
about 100 FPS in window 700x700

Comment 7 Vladimir Kondratiev 2001-06-12 08:35:04 UTC
Follow-up:
when everything is properly installed, Mesa updated to 3.4.2,
glxinfo no more coredumps. It just works!

Comment 8 Mike A. Harris 2001-06-12 08:42:06 UTC
Ok, thanks for updating the report.  I think it is safe to say it was just
DRI modules/configuration issue, not a bug.

Thanks.

Comment 9 martin.macok 2001-06-12 12:17:45 UTC
So it does work for me (getting modules from XF86 sources). 
Some comments:

1) I need to explicitely insmod agpgart and insmod mga to make it work.
The X server cannot load it automaticaly:
(==) MGA(0): Write-combining range (0xe4000000,0x1000000)
(--) MGA(0): 16 DWORD fifo
(==) MGA(0): Default visual is TrueColor
(II) MGA(0): [drm] bpp: 16 depth: 16
(II) MGA(0): [drm] Sarea 2200+664: 2864
[drm] failed to load kernel module "mga"
(II) MGA(0): [drm] drmOpen failed
(EE) MGA(0): [drm] DRIScreenInit failed.  Disabling DRI.
(II) MGA(0): Using 5529 lines for offscreen memory.
(II) MGA(0): Using XFree86 Acceleration Architecture (XAA)

2) I encounter real instability problems with these modules. Sometimes the
system hangs several seconds after using it (only SysRq+B works) and I even saw
a kernel oops with it (scheduling in interrupt). So I removed the modules and
don't use DRM.

kernel-2.4.5-0.2.9
XFree86-4.1.0-0.0.1

G450, Asus KT133A, Athlon