Latest driver does NOT work on OpenSuSE11, Ubuntu 8.10, ...

This forum is for questions about all G-series cards (G200, G400, G450, ...) that need the mga driver to work properly

Latest driver does NOT work on OpenSuSE11, Ubuntu 8.10, ...

Postby tuxx-home.at » Tue Mar 17, 2009 10:50 pm

... and everything else that uses X.org 1.5.

Why?
How can you help?

-> read: [Trying to port the mga driver to Xorg 1.5]

If you're not a coder and still want to help:

-> file a trouble ticket with Matrox Tech support and tell them, that their latest available mga driver does not work on Xorg 1.5.
User avatar
tuxx-home.at
Supreme Commander
Supreme Commander
 
Posts: 2199
Joined: Mon Jan 01, 2007 12:51 pm
Location: Vassach - Austria - Europe

Re: Latest driver does NOT work on OpenSuSE11, Ubuntu 8.10, ...

Postby Highmad » Mon May 18, 2009 1:28 pm

According to Matrox, there's a planned release of a new driver coming out on 25th of May. It should support Ubuntu 8.10. But I don't know exactly if it's just the driver for the P-Series or both. I hope it's for both series.

Let's hope the best.
Highmad
Private
Private
 
Posts: 4
Joined: Wed Jun 04, 2008 4:32 pm

Re: Latest driver does NOT work on OpenSuSE11, Ubuntu 8.10, ...

Postby SergeyK » Thu May 28, 2009 12:08 am

Matrox indeed released a new driver, but it is only for the P series.
Since I'm stuck with a non-functioning G550, I decided to try to hack on the driver.
However, I got stuck on the following puzzle:

It seems that in the 7.0.0 directory the USEMGAHAL symbol is not defined by the make file. However, there does not seem to be any way to compile the driver without that symbol, because mga_driver.c uses ISDIGITAL1 and ISDIGITAL2 macros unprotected by
#ifdef USEMGAHAL
but these macros reference members that are only defined when USEMGAHAL is defined.

Am I missing something ?

Sergey.
SergeyK
Private
Private
 
Posts: 4
Joined: Wed May 27, 2009 11:58 pm

Re: Latest driver does NOT work on OpenSuSE11, Ubuntu 8.10, ...

Postby number-g » Thu May 28, 2009 3:26 am

i recently decided i would try ubuntu (debian on my other machines), and i really like it so far ... it's a real shame about this problem. i'm going to have to put debian on this machine for now, but is there any chance of a mailing list or something to update us of progress with this?
number-g
Private
Private
 
Posts: 1
Joined: Thu May 28, 2009 3:22 am

A little more progress

Postby SergeyK » Thu May 28, 2009 5:27 pm

Well, I managed to compile the driver by just appending -DUSEMGAHAL to the Makefile.
That produced mga_drv.so but not the mga_hal_drv.so
I'm trying to run this newly-compiled mga_drv with the older pre-compiled hal from the binary drivers. I'm getting a SEGFAULT.
Either I made a mistake in the code, or compiled incorrectly, or it does not like the hal that was compiled for other version of X, or some combination of the above.
If anyone wants to try, I can post my diffs.
I would also appreciate some instructions to compile the thing correctly.

Sergey.
SergeyK
Private
Private
 
Posts: 4
Joined: Wed May 27, 2009 11:58 pm

Now I'm stuck

Postby SergeyK » Fri May 29, 2009 4:27 am

Did a lot of debugging. I'm crashing inside mga_hal in MATROXValidateMode. I traced it down to the fact that during MATROXOpenLibrary, when MGAClientReadConfigSpaceDword is called be the hal, that pci_device_cfg_read_u32 function does not work. It did not modify pulDword, leaving whatever garbage was in there. I am completely lost here - why would not it work ? The pMga->PciInfo looked reasonable, although it is conceivable that something was missing in it - I don't know what to look for.

Any ideas ?
SergeyK
Private
Private
 
Posts: 4
Joined: Wed May 27, 2009 11:58 pm

more puzzles

Postby SergeyK » Fri May 29, 2009 8:00 pm

The deeper I go, the more puzzling it becomes. I traced down my problem to a pread64 call that returns EFAULT. The only way for this to happen, apparently, is for the buffer address to be outside of the allocated space.
But that buffer address is the pulDword in MGAClientReadConfigSpaceDword, and the debugger shows quite a reasonable number there and does not complain when I read/write its content. It is actually right there in the stack, just a local variable. How can it be bad !?

That makes no sense to me, and I have no idea what can be done to fix this.

Sergey.
SergeyK
Private
Private
 
Posts: 4
Joined: Wed May 27, 2009 11:58 pm

Re: Latest driver does NOT work on OpenSuSE11, Ubuntu 8.10, ...

Postby amites » Wed Jun 17, 2009 2:45 am

Has anyone else had a crack at this? Not sure what I can offer since I don't have any experience writing drivers though I may be able to gather some community support, come across several people looking to get this working, might be able to get a little fund raiser going...
amites
Private
Private
 
Posts: 5
Joined: Wed Jun 04, 2008 1:44 am

Re: Latest driver does NOT work on OpenSuSE11, Ubuntu 8.10, ...

Postby tuxx-home.at » Fri Jun 19, 2009 11:36 am

The real problem is (as you can see in the weblog entry I posted above), that a _LOT_ of things have changed in the ABI and major parts of the driver need to be rewritten. This is a quite competitive task and I think me start-off is pretty good, but I'm not sure about it, it still doesn't work, so that's why I (for now) gave up on it. If anyone wants to base his work off of mine, go ahead, I will provide as much help and support as necessary, but I'm afraid I will not have enough time to dig into this deeper over the next few months.
User avatar
tuxx-home.at
Supreme Commander
Supreme Commander
 
Posts: 2199
Joined: Mon Jan 01, 2007 12:51 pm
Location: Vassach - Austria - Europe

Re: Latest driver does NOT work on OpenSuSE11, Ubuntu 8.10, ...

Postby Zosimos » Mon Jul 13, 2009 3:31 am

Just to be clear, does the current driver still work with Debian? (The current 'stable' version: Lenny) That's the impression I get but I don't see any absolutely clear statements of which Debian people are using. I'm trying to get Debian 5 installed on two different systems with the AGP G450 installed. So far, so good. The default drivers that come with the distro do get installed, but of course there is no 3D. Also, the screen resolution/refresh rates are very limited compared to the full driver. So, I'd like to try the 'unofficial' complete driver.

What other than xorg.conf should I backup in a Debian install to be able to recover if something goes wrong?
Zosimos
Major
Major
 
Posts: 20
Joined: Sun Jun 10, 2007 10:12 pm

Re: Latest driver does NOT work on OpenSuSE11, Ubuntu 8.10, ...

Postby Zosimos » Wed Jul 15, 2009 2:52 am

Direct Rendering enabled!

The 4.4.4 drivers installed fine with Debian Lenny 5.0.1 (or 5.0.2 since I had downloaded the updates). All it did was install the mga_hal driver, no changes to the xorg config as far as I can tell. Very simple and smooth compared to my struggles with Suse and Fedora. But I restarted and it seems to work perfectly. The Xorg.log shows it as recognizing the hardware and activating direct rendering. No further changes needed, though I haven't played any elaborate 3D games yet to see how it works. The next question is how to activate more video modes. Apparently that will require editing of some config files somewhere.
Zosimos
Major
Major
 
Posts: 20
Joined: Sun Jun 10, 2007 10:12 pm

Re: Latest driver does NOT work on OpenSuSE11, Ubuntu 8.10, ...

Postby calimero » Thu Jul 16, 2009 2:23 am

Zosimos wrote:Direct Rendering enabled!

...I haven't played any elaborate 3D games yet to see how it works....


Please, are you sure it really works then? During my plays with G550 once i have achieved a state when all was fine including X logs, until I really tried to use 3D... than it segfaulted.....:)

Please run glxgears and report.
calimero
Private
Private
 
Posts: 6
Joined: Wed Dec 17, 2008 9:41 pm

Re: Latest driver does NOT work on OpenSuSE11, Ubuntu 8.10, ...

Postby Zosimos » Thu Jul 16, 2009 6:55 pm

Once I found out that glxgears is actually in mesa tools I installed that and ran the tests.

# glxinfo
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap,
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_OML_swap_method,
GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGIS_multisample,
GLX_SGIX_fbconfig, GLX_SGIX_visual_select_group
client glx vendor string: SGI
client glx version string: 1.4
client glx extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_allocate_memory,
GLX_MESA_copy_sub_buffer, GLX_MESA_swap_control,
GLX_MESA_swap_frame_usage, GLX_OML_swap_method, GLX_OML_sync_control,
GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync,
GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
GLX_SGIX_visual_select_group, GLX_EXT_texture_from_pixmap
GLX version: 1.2
GLX extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_swap_control,
GLX_MESA_swap_frame_usage, GLX_OML_swap_method, GLX_SGI_make_current_read,
GLX_SGI_swap_control, GLX_SGI_video_sync, GLX_SGIS_multisample,
GLX_SGIX_fbconfig, GLX_SGIX_visual_select_group
OpenGL vendor string: VA Linux Systems Inc.
OpenGL renderer string: Mesa DRI G400 20061030 AGP 1x x86/MMX/SSE
OpenGL version string: 1.2 Mesa 7.0.4
OpenGL extensions:
GL_ARB_multisample, GL_ARB_multitexture, GL_ARB_texture_compression,
GL_ARB_texture_env_add, GL_ARB_texture_env_combine,
GL_ARB_texture_env_crossbar, GL_ARB_texture_rectangle,
GL_ARB_transpose_matrix, GL_ARB_vertex_buffer_object,
GL_ARB_vertex_program, GL_ARB_window_pos, GL_EXT_abgr, GL_EXT_bgra,
GL_EXT_blend_logic_op, GL_EXT_clip_volume_hint,
GL_EXT_compiled_vertex_array, GL_EXT_copy_texture,
GL_EXT_draw_range_elements, GL_EXT_fog_coord, GL_EXT_multi_draw_arrays,
GL_EXT_packed_pixels, GL_EXT_polygon_offset, GL_EXT_rescale_normal,
GL_EXT_secondary_color, GL_EXT_separate_specular_color,
GL_EXT_stencil_wrap, GL_EXT_subtexture, GL_EXT_texture, GL_EXT_texture3D,
GL_EXT_texture_edge_clamp, GL_EXT_texture_env_add,
GL_EXT_texture_env_combine, GL_EXT_texture_object,
GL_EXT_texture_rectangle, GL_EXT_vertex_array, GL_APPLE_packed_pixels,
GL_ATI_texture_env_combine3, GL_IBM_rasterpos_clip, GL_MESA_ycbcr_texture,
GL_MESA_window_pos, GL_NV_light_max_exponent, GL_NV_texture_rectangle,
GL_NV_texgen_reflection, GL_NV_vertex_program, GL_NV_vertex_program1_1,
GL_OES_read_format, GL_SGIS_generate_mipmap, GL_SGIS_texture_edge_clamp,
GL_SGIS_texture_lod, GL_SUN_multi_draw_arrays

visual x bf lv rg d st colorbuffer ax dp st accumbuffer ms cav
id dep cl sp sz l ci b ro r g b a bf th cl r g b a ns b eat
----------------------------------------------------------------------
0x23 24 tc 0 24 0 r y . 8 8 8 0 0 0 0 0 0 0 0 0 0 None
0x24 24 tc 0 24 0 r . . 8 8 8 0 0 0 0 0 0 0 0 0 0 None
0x25 24 tc 0 24 0 r y . 8 8 8 0 0 24 8 0 0 0 0 0 0 None
0x26 24 tc 0 24 0 r . . 8 8 8 0 0 24 8 0 0 0 0 0 0 None
0x27 24 tc 0 24 0 r y . 8 8 8 0 0 0 0 16 16 16 0 0 0 Slow
0x28 24 tc 0 24 0 r . . 8 8 8 0 0 0 0 16 16 16 0 0 0 Slow
0x29 24 tc 0 24 0 r y . 8 8 8 0 0 24 8 16 16 16 0 0 0 Slow
0x2a 24 tc 0 24 0 r . . 8 8 8 0 0 24 8 16 16 16 0 0 0 Slow
0x2b 24 dc 0 24 0 r y . 8 8 8 0 0 0 0 0 0 0 0 0 0 None
0x2c 24 dc 0 24 0 r . . 8 8 8 0 0 0 0 0 0 0 0 0 0 None
0x2d 24 dc 0 24 0 r y . 8 8 8 0 0 24 8 0 0 0 0 0 0 None
0x2e 24 dc 0 24 0 r . . 8 8 8 0 0 24 8 0 0 0 0 0 0 None
0x2f 24 dc 0 24 0 r y . 8 8 8 0 0 0 0 16 16 16 0 0 0 Slow
0x30 24 dc 0 24 0 r . . 8 8 8 0 0 0 0 16 16 16 0 0 0 Slow
0x31 24 dc 0 24 0 r y . 8 8 8 0 0 24 8 16 16 16 0 0 0 Slow
0x32 24 dc 0 24 0 r . . 8 8 8 0 0 24 8 16 16 16 0 0 0 Slow
0x4c 32 tc 0 32 0 r . . 8 8 8 8 0 0 0 0 0 0 0 0 0 Ncon

# glxgears
1425 frames in 5.0 seconds = 284.878 FPS
1426 frames in 5.0 seconds = 285.123 FPS
1430 frames in 5.0 seconds = 285.945 FPS
1436 frames in 5.0 seconds = 287.065 FPS
Zosimos
Major
Major
 
Posts: 20
Joined: Sun Jun 10, 2007 10:12 pm

Re: Latest driver does NOT work on OpenSuSE11, Ubuntu 8.10, ...

Postby calimero » Sun Jul 19, 2009 9:54 pm

You are right,

I tryed it too and it really works..... default driver worked also good !!!and glxinfo was even saing that direct rendering is enabled!!! (which was a bit strange I think) of course glxgears was running on poor 140FPS which was no diference to my gentoo with default mga driver and indirect rendering.

but after installing mga_hal from 4.4.4 it runs on 240 and makes mee think that direct rendering is really enabled now :)

This makes Lenny perhaps the last modern linux distro fully working with G series.

(it is latest Lenny amd64 in my case)
calimero
Private
Private
 
Posts: 6
Joined: Wed Dec 17, 2008 9:41 pm

Re: Latest driver does NOT work on OpenSuSE11, Ubuntu 8.10, ...

Postby Zosimos » Wed Jul 22, 2009 4:18 am

One more trick. Set the default depth to 16 in xorg.conf and it makes things faster. (glxgears now reports 500 FPS on my machine.) The G450 is an older card, after all. It doesn't have a gazillion parallel circuits running at once and 32 bit color is harder for it to do. And anyway, what are you gonna do with 32 bit color on an old machine? Video editing? :)
Zosimos
Major
Major
 
Posts: 20
Joined: Sun Jun 10, 2007 10:12 pm

Next

Return to Matrox G-Series Cards

Who is online

Users browsing this forum: No registered users and 5 guests

cron