# Problem loading Mach64 DRM module compiled from CVS [solved]

## DiskDoc

I followd the guide at http://gentoo-wiki.com/HOWTO_DRI_with_ATi_Open-Source_Drivers as best I could and indeed produced a module, mach64_dri.so. Problem is, when I try to insmod it it gives 

```
localhost modules # insmod mach64_dri.so 

insmod: error inserting 'mach64_dri.so': -1 Invalid module format
```

I'm thinking I've missed some step..the guide is a bit vague on what to do next.  *Quote:*   

> That's the kernel, build it, install it, boot it.

 

----------

## Minos

mach64_dri.so isn't the kernel module, it's a driver for X.org.  You're looking for mach64.ko.  Personally, I just emerged x11-base/x11-drm-20050502 with VIDEO_CARDS="mach64".

----------

## DiskDoc

Thanks for the tip! The wiki is kindof obsolete since I didn't succeed using it and you can handle it nicely through Portage. I thought the drm modules in Portage were for 2.4 kernels only but not so anymore..

Still, I'm having trouble. I have a kernel with dri turned off, x11-drm-20050502 installed and modules loaded:

```
localhost ~ # lsmod

Module                  Size  Used by

mach64                 51040  0 

drm                    62072  1 mach64
```

I've but the DRI-section with Mode 0666 in xorg.conf but glxinfo says no direct rendering. The only thing wrong in the X.org log I can see is a notice about not having enough video memory.

http://people.arcada.fi/~englundc/tmp/Xorg.0.log

What's wrong?

----------

## DiskDoc

The solution was found here: http://dri.freedesktop.org/wiki/DriTroubleshooting

 *Quote:*   

> If there are no [dri] lines and it says Direct Rendering disabled, you may be trying to use too high of a resolution. grep static\ buffer /var/log/XFree86.0.log will find a line like:
> 
> (WW) ATI(0): DRI static buffer allocation failed -- need at least 4608 kB video memory
> 
> If so, reduce your resolution or color depth. The video ram necessary for a given resolution/depth is width*height*(depth/*3 kilobytes. (The 3 is for front, back, and depth buffers).

 

At 800x600 dri works like it should. That resolution however, isn't adequate for much anything so it turns out the card will be used just as an ordinary 2D card. After allt this work :-/ Aw..

----------

