# ATI drivers and 2.6 Kernel [SOLVED]

## cloudsurfer

I have been struggling with this for a couple weeks now, trying to get ATI's drivers to work with a 2.6 kernel. Did all sorts of research on gentoo forums and found all sorts of HOW-TO's to get the ati drivers to work in the 2.6 kernel. I can not get direct rendering to work, and for a while I just thought I was being stupid and it was just a long while since I used linux for my desktop system, but I come to find after all this work that it was my own stupidity. Stupidity for not going up to ATI's webpage in the first place and reading their FAQ.

The ati drivers do NOT work with the 2.6 kernel regardless of what anyone says:

 *Quote:*   

> Q6: What Linux kernel version is needed for this driver? 
> 
> A6: Version 2.4 of the Linux kernel is required for this driver. This kernel version is installed as standard in many current Linux distributions. Support for the newer version 2.6 kernel is under development and should be available in a future release. 
> 
> 

 Last edited by cloudsurfer on Wed May 19, 2004 2:17 am; edited 1 time in total

----------

## Admiral LSD

You're wrong, the current ATi drivers work perfectly fine with kernel 2.6. I've been running them with my 9500 Pro under 2.6 since 2.6.0 went stable and up until quite recently haven't had any trouble with them whatsoever.

----------

## cloudsurfer

Can I see the output from your glxinfo. I would certainly like to see that direct rendering is enabled, using the ati-drivers.

----------

## Wedge_

 *cloudsurfer wrote:*   

> The ati drivers do NOT work with the 2.6 kernel regardless of what anyone says: 

 

Um, yes they do  :Smile:  I've been using them with 2.5/2.6 for months, and so have many other people. If you could post a description of what you've tried so far and what problems you ran into, I'll try and help you out.

 *cloudsurfer wrote:*   

> Can I see the output from your glxinfo. I would certainly like to see that direct rendering is enabled, using the ati-drivers.

 

ATI 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_visual_info, GLX_EXT_visual_rating, 

    GLX_EXT_import_context, GLX_SGI_make_current_read, GLX_SGIS_multisample

client glx vendor string: ATI

client glx version string: 1.3

client glx extensions:

    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context, 

    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_ATI_pixel_format_float, 

    GLX_ATI_render_texture

GLX extensions:

    GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating, 

    GLX_EXT_import_context

OpenGL vendor string: ATI Technologies Inc.

OpenGL renderer string: Radeon 9800 (AIB) Athlon (3DNow!)

OpenGL version string: 1.3 (X4.3.0-3.2.9)

OpenGL extensions:

    GL_ARB_multitexture, GL_EXT_texture_env_add, GL_EXT_compiled_vertex_array, 

    GL_S3_s3tc, GL_ARB_depth_texture, GL_ARB_fragment_program, 

    GL_ARB_multisample, GL_ARB_point_parameters, GL_ARB_shadow, 

    GL_ARB_shadow_ambient, GL_ARB_texture_border_clamp, 

    GL_ARB_texture_compression, GL_ARB_texture_cube_map, 

    GL_ARB_texture_env_add, GL_ARB_texture_env_combine, 

    GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3, 

    GL_ARB_texture_mirrored_repeat, GL_ARB_transpose_matrix, 

    GL_ARB_vertex_blend, GL_ARB_vertex_buffer_object, GL_ARB_vertex_program, 

    GL_ARB_window_pos, GL_ATI_draw_buffers, GL_ATI_element_array, 

    GL_ATI_envmap_bumpmap, GL_ATI_fragment_shader, GL_ATI_map_object_buffer, 

    GL_ATI_separate_stencil, GL_ATI_texture_env_combine3, 

    GL_ATI_texture_float, GL_ATI_texture_mirror_once, 

    GL_ATI_vertex_array_object, GL_ATI_vertex_attrib_array_object, 

    GL_ATI_vertex_streams, GL_ATIX_texture_env_combine3, 

    GL_ATIX_texture_env_route, GL_ATIX_vertex_shader_output_point_size, 

    GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color, GL_EXT_blend_func_separate, 

    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_clip_volume_hint, 

    GL_EXT_draw_range_elements, GL_EXT_fog_coord, GL_EXT_multi_draw_arrays, 

    GL_EXT_packed_pixels, GL_EXT_point_parameters, GL_EXT_rescale_normal, 

    GL_EXT_polygon_offset, GL_EXT_secondary_color, 

    GL_EXT_separate_specular_color, GL_EXT_stencil_wrap, 

    GL_EXT_texgen_reflection, GL_EXT_texture3D, 

    GL_EXT_texture_compression_s3tc, GL_EXT_texture_cube_map, 

    GL_EXT_texture_edge_clamp, GL_EXT_texture_env_combine, 

    GL_EXT_texture_env_dot3, GL_EXT_texture_filter_anisotropic, 

    GL_EXT_texture_lod_bias, GL_EXT_texture_object, GL_EXT_texture_rectangle, 

    GL_EXT_vertex_array, GL_EXT_vertex_shader, GL_HP_occlusion_test, 

    GL_NV_texgen_reflection, GL_NV_blend_square, GL_NV_occlusion_query, 

    GL_SGI_color_matrix, GL_SGIS_texture_edge_clamp, 

    GL_SGIS_texture_border_clamp, GL_SGIS_texture_lod, 

    GL_SGIS_generate_mipmap, GL_SGIS_multitexture, GL_SUN_multi_draw_arrays

glu version: 1.3

glu extensions:

    GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess

   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 32  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  1 0 None

0x24 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  8 16 16 16 16  1 0 None

0x25 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  0 16 16 16 16  1 0 None

0x26 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  0 16 16 16 16  1 0 None

0x27 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  1 0 None

0x28 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  1 0 None

0x29 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  1 0 None

0x2a 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  0  0  0  0  0  1 0 None

0x2b 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  1 0 None

0x2c 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  8 16 16 16 16  1 0 None

0x2d 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  0 16 16 16 16  1 0 None

0x2e 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  0 16 16 16 16  1 0 None

0x2f 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  2 1 None

0x30 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  2 1 None

0x31 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  2 1 None

0x32 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  0  0  0  0  0  2 1 None

0x33 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  1 0 None

0x34 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  8 16 16 16 16  1 0 None

0x35 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  0 16 16 16 16  1 0 None

0x36 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  0 16 16 16 16  1 0 None

0x37 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  4 1 None

0x38 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  4 1 None

0x39 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  4 1 None

0x3a 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  0  0  0  0  0  4 1 None

0x3b 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  1 0 None

0x3c 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  8 16 16 16 16  1 0 None

0x3d 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  0 16 16 16 16  1 0 None

0x3e 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  0 16 16 16 16  1 0 None

0x3f 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  6 1 None

0x40 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  6 1 None

0x41 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  6 1 None

0x42 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  0  0  0  0  0  6 1 None

0x43 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  1 0 None

0x44 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  8 16 16 16 16  1 0 None

0x45 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  0 16 16 16 16  1 0 None

0x46 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  0 16 16 16 16  1 0 None

0x47 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  1 0 None

0x48 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  1 0 None

0x49 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  1 0 None

0x4a 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  0  0  0  0  0  1 0 None

0x4b 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  1 0 None

0x4c 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  8 16 16 16 16  1 0 None

0x4d 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  0 16 16 16 16  1 0 None

0x4e 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  0 16 16 16 16  1 0 None

0x4f 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  2 1 None

0x50 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  2 1 None

0x51 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  2 1 None

0x52 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  0  0  0  0  0  2 1 None

0x53 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  1 0 None

0x54 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  8 16 16 16 16  1 0 None

0x55 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  0 16 16 16 16  1 0 None

0x56 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  0 16 16 16 16  1 0 None

0x57 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  4 1 None

0x58 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  4 1 None

0x59 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  4 1 None

0x5a 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  0  0  0  0  0  4 1 None

0x5b 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  1 0 None

0x5c 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  8 16 16 16 16  1 0 None

0x5d 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  0 16 16 16 16  1 0 None

0x5e 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  0 16 16 16 16  1 0 None

0x5f 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  6 1 None

0x60 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  6 1 None

0x61 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  6 1 None

0x62 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  0  0  0  0  0  6 1 None
```

----------

## cloudsurfer

I have video working just fine. Just no direct rendering using the 2.6 kernel. I am using mm-sources. I have mmtr support, real time clock support, agpgart, my intel_agp support all built in including the section about DRM as modules and loaded. Compile the kernel. Emerge ati-drivers. opengl-update ati. All that goes fine. My /etc/modules.autoload.d/kernel-2.6 has rtc, agpgart, intel_agp, and flgrx in it. The flgrx module does not load on start up, I get an error with that which I have yet to check out as I had to head to work this morning. I have tried using both the internal agpgart module and ATI's provided driver. I have been doing this for years on other computers, but this is one of the rare times I have had trouble as this is all new hardware to me.

My only issue is not in getting display or anything, but in getting direct rendering. ATI's webpage says right on there that the ati-drivers are not for the 2.6 kernel. I am just curious why I have never seen this brought up in all the ATI driver threads I have read here.

And I will shut up now that I see someones direct rendering line saying yes.....  :Sad: 

Something to help as well for those who take pity on me. The card is not directly from ati. Its a Sapphire 9600 pro.

----------

## Wedge_

It looks like that ATI FAQ is in need of some updating  :Smile: 

 *cloudsurfer wrote:*   

>  I am using mm-sources. I have mmtr support, real time clock support, agpgart, my intel_agp support all built in including the section about DRM as modules and loaded. Compile the kernel. Emerge ati-drivers. opengl-update ati. All that goes fine. My /etc/modules.autoload.d/kernel-2.6 has rtc, agpgart, intel_agp, and flgrx in it. The flgrx module does not load on start up, I get an error with that which I have yet to check out as I had to head to work this morning.

 

mm-sources sometimes causes problems with the driver because of the new patches it contains. For example, the latest version will prevent the driver from compiling because it alters some kernel code the driver depends on. In this particular case it is relatively easy to fix, but you need to be aware that this kind of thing can happen with mm-sources and similar patchsets. Once you get home, if you could post the error you get when trying to load the module it would be helpful.

Edit:  *cloudsurfer wrote:*   

>  including the section about DRM

 

The DRM settings should be disabled - if they're builtin, the fglrx module will refuse to load. If they're compiled as modules and loaded before the fglrx module, it won't load. If they're compiled as modules and loaded after the fglrx module, I think it will disable 3D acceleration. All you need in that section of the kernel config are the /dev/agpgart and intel-agp options enabled.

----------

## cloudsurfer

Well thanks for taking my half-cocked attitude and turning it around. I will check if this works and get back to you. Sorry again, but the lack of direct rendering was really beginning to annoy me considering the amount of work I have put into this so far. It gets kinda discouraging to do a couple hours of reading and research to not get one little thing working...

----------

## Admiral LSD

Yeah, 2.6.6-mm2 is giving me grief with respect to ATi as well but every previous 2.6 release that I've tried has worked perfectly fine.

You can see what I normally get here:

https://forums.gentoo.org/viewtopic.php?t=154605&postdays=0&postorder=asc&start=50#997729

I'm trying to find more info on the changes that break the ATi drivers in 2.6.6-mm2 (there's a thread on it here.) but I'm not having much luck.

edit: I just noticed Wedge has posted a fix in that thread. Ill go check it out and report back

----------

## cloudsurfer

oooooo, I have to say, both you and Wedge rock right now. Thanks for all the clear concise info. I would rather patch ati's driver ebuild than try another kernel. I really like the mm-sources and would be very sad to have to go elsewhere, and considering what was said in that other post from Wedge, this problem is going to exist regardless once it gets moved to the rest of the kernel tree.

On that note. How can I protect ebuilds I have patched or edited? Mainly my kernel-headers get over written everytime I emerge sync because I am using 2.6 headers.

----------

## Wedge_

 *cloudsurfer wrote:*   

> On that note. How can I protect ebuilds I have patched or edited?

 

This is what the portage overlay is for. In your /etc/make.conf file, look for a line like this 

```
PORTDIR_OVERLAY=/usr/local/portage
```

 and make sure it's not commented. This lets you store ebuilds under /usr/local/portage, and they won't be affected by syncing the normal tree. So, to create an edited copy of the 3.7.6 ebuild, create the appropriate directories under /usr/local/portage: 

```
mkdir -p /usr/local/portage/media-video/ati-drivers/files
```

 then copy over the normal ebuild from /usr/portage/media-video/ati-drivers. Also copy over the contents of the /usr/portage/media-video/ati-drivers/files directory to /usr/local/portage/media-video/ati-drivers/files (this contains patches that the ebuild uses). Make the changes to the ebuild in /usr/local/portage/media-video/ati-drivers, then run 

```
ebuild /usr/local/portage/media-video/ati-drivers/ati-drivers-x.y.z.ebuild digest
```

(replace x.y.z with whatever version you use)

After that, you should be able to emerge the altered drivers by doing 

```
emerge /usr/local/portage/media-video/ati-drivers/ati-drivers-x.y.z.ebuild
```

----------

## Admiral LSD

Wedges patch appears to fix everything for me, thanks man.

edit: With the kernel-headers ebuilds a simple fix to allow Portage to install them without monkeying around in the ebuilds is to put

```
sys-kernel/linux-headers -*
```

in the /etc/portage/package.keywords file. It's an unsupported hack that won't exist for much longer (though hopefully something similar will exist afterward.) but it'll do the job in the mean time.

----------

## Wedge_

Great, I hadn't checked 3.7.6 actually worked (the older versions are faster for me).

----------

## Admiral LSD

I'm sure the older drivers would be faster here as well but 3.7.6 supports WineX whereas 3.2.8 doesn't so 3.2.8 gets the boot. The performance difference isn't really noticable in what else I play so it hasn't really been that big a deal.

----------

## cloudsurfer

Ummm, ok, I have tried, my brain is tired. I tried patching the ebuild here and here. The output from my dmesg shows some other problems trying to load the flrgx module. Have a look at my xconfig. I really don't know on this one. If anyone needs anything, feel free to instant message me on AIM.

[edit]

Oh, and the patch file is here

Should someone have a kernel source thats like the mm-sources and works with the ati drivers, I might be willing to give it a try if thats what is nessacary, but the issue is the mm-sources will be out on the main trunk after a bit and anyone running up-to-date kernel sources will run into the same issue. The reason I like the mm-sources so much is because of all the new hardware I have in this machine.

[/edit]

[further edit]

I just gave the gentoo-dev-sources a try, still getting a error loading the module:

```
Real Time Clock Driver v1.12

agpgart: Detected an Intel i875 Chipset.

agpgart: Maximum main memory to use for agp memory: 941M

agpgart: AGP aperture is 128M @ 0xe8000000

fglrx: module license 'Proprietary. (C) 2002 - ATI Technologies, Starnberg, GERMANY' taints kernel.

Unable to handle kernel paging request at virtual address f998cb50

 printing eip:

f999ba36

*pde = 01b4d067

*pte = 00000000

Oops: 0000 [#1]

PREEMPT SMP

CPU:    0

EIP:    0060:[<f999ba36>]    Tainted: P

EFLAGS: 00010246   (2.6.5-gentoo-r1)

EIP is at firegl_init+0x46/0x110 [fglrx]

eax: f99c0d60   ebx: f998cb50   ecx: 00000002   edx: f99c0d88

esi: f7542000   edi: f99c0dd0   ebp: c0380e30   esp: f7543f60

ds: 007b   es: 007b   ss: 0068

Process modprobe (pid: 4412, threadinfo=f7542000 task=f74f1840)

Stack: 0000000e 00000014 00000012 00000000 00000286 f99c0d60 f99c0d60 f992d258

       f998cb50 f997b11e f997b220 f9951000 08059720 fffffffc c0380e4c c0380e4c

       f99c0800 c01348c5 ffff0001 f7542000 40021008 08059720 4a14ffae f7542000

Call Trace:

 [<f992d258>] firegl_init_module+0xf6/0x18c [fglrx]

 [<c01348c5>] sys_init_module+0x11e/0x244

 [<c0108691>] sysenter_past_esp+0x52/0x71

```

[/further edit]

----------

## cloudsurfer

ummm, excuse me while I go and bang my head against a wall. Off to try the aa-sources and the ck-sources.

----------

## Slouch

I got almost everything to work with my ATi Radeon 9800 Pro with the 2.6.6 kernel however I get this in my XFree86 log 

(EE) fglrx(0): [agp] unable to acquire AGP, error "xf86_ENODEV"

http://blahserver.greatnow.com/atihowto.html is a guide to how far I got.

And that is the error that is probably keeping me from 3D Acceleration.

----------

## Admiral LSD

 *cloudsurfer wrote:*   

> [edit]
> 
> Oh, and the patch file is here
> 
> Should someone have a kernel source thats like the mm-sources and works with the ati drivers, I might be willing to give it a try if thats what is nessacary, but the issue is the mm-sources will be out on the main trunk after a bit and anyone running up-to-date kernel sources will run into the same issue. The reason I like the mm-sources so much is because of all the new hardware I have in this machine.
> ...

 

I have ebuilds for both ati-drivers and ati-drivers-extra that have been edited to automatically apply the page_count patch here. I know these work as I use them myself with 2.6.6-mm2 and DRI works perfectly fine now. Just untar them into your overlay and they should be available automatically.

----------

## Wedge_

@Slouch: that error usually means X can't find your AGP chipset. Check that you have support for it in your kernel, and that the kernel AGP modules are loaded along with the "fglrx" module. 

@cloudsurfer: I've never seen that error in your dmesg before. I wonder if it's something to do with the fact that you're running with SMP enabled. Some people with older SMP boards (Tyan IIRC) have never had much luck getting the drivers to work for them, although they didn't have the same problems as you're having, and that was with dual procs rather than HT. Unfortunately, if it turns out that this is an SMP problem, there probably isn't much chance of getting it fixed. You could let ATI know about it, but I'd imagine it'd be a long time before they got round to doing anything about it. It might be worth trying a kernel without SMP support just to check what happens.

----------

## Slouch

I have support for my nvidia chipset in the kernel.

----------

## Wedge_

Well, if you post your full log somewhere it would help. You need to have "UseInternalAGPGART" set to "no" in your XF86Config for things to work with the kernel AGP compiled in.

----------

## Infy

Hi,

When I was using 3.2.8 ATi drivers I got 

```
OpenGL renderer string: RADEON 9700 PRO (SSE/3DNow!)
```

But with 3.7.6 (need this 'cause I mess with WineX) it's

```
OpenGL renderer string: RADEON 9700 PRO Generic
```

Now where are my SSE and 3DNow! optimizations?

I've run emerge ati-drivers three times and yet it does nt want to enable the optimizations. 

Is there any way to get it to compile the fglrx kernel module with specific optimizations?

--

2.6.5-r1 kernel Linux (Linux is only the name of the kernel, Linux is not an operating system)

----------

## Wedge_

I believe that is down to the way the binary part of the driver was compiled (ie I don't think it can be changed short of another driver version). Lots of people have noticed that it changed from 3.2.8 to 3.7.x, but there's nothing much you can do about it AFAIK. I'm still using the older version and there's nothing really forcing you to upgrade unless you need one of the fixes the new driver provides, like the WineX thing Admiral LSD mentioned.

----------

## cloudsurfer

Well, haha!!! At least I dont have to stop using the mm-sources. I will have to give that prepatched ati-drivers a try and see if that works. My only question is, did I do the ebuild the right way? I have never done ebuilds so I donno all the functions that are available.

----------

## Wedge_

I think the way you did it will work alright. I just used the basic patch command because I couldn't remember how epatch works.

----------

## cloudsurfer

Arg, even using that ebuild in my portage overlay is causing this:

```
Real Time Clock Driver v1.12

Linux agpgart interface v0.100 (c) Dave Jones

agpgart: Detected an Intel i875 Chipset.

agpgart: Maximum main memory to use for agp memory: 941M

agpgart: AGP aperture is 128M @ 0xe8000000

fglrx: module license 'Proprietary. (C) 2002 - ATI Technologies, Starnberg, GERMANY' taints kernel.

Unable to handle kernel NULL pointer dereference at virtual address 00000000

 printing eip:

f8ea4816

*pde = 00000000

       ___      ______

      0--,|    /OOOOOO\

     {_o  /  /OO plop OO\

       \__\_/OO oh dear OOO\s

          \OOOOOOOOOOOOOOOO/

           __XXX__   __XXX__

Oops: 0000 [#1]

PREEMPT

Modules linked in: fglrx intel_agp agpgart rtc

CPU:    0

EIP:    0060:[<f8ea4816>]    Tainted: P   VLI

EFLAGS: 00010246   (2.6.6-mm2)

EIP is at firegl_init+0x46/0x110 [fglrx]

eax: f8ecace0   ebx: 00000000   ecx: 00000002   edx: f8ecad00

esi: f7739000   edi: f8ecad30   ebp: c035c280   esp: f7739f50

ds: 007b   es: 007b   ss: 0068

Process modprobe (pid: 4685, threadinfo=f7739000 task=f770b970)

Stack: 00000010 00000000 00000000 00000000 00000282 f8ecace0 f8ecace0 f8e2c249

       00000000 00000000 0000001b 0000001a 0000001c f8e95b04 f8e8411e f8e8422c

       08059138 fffffffc c035c298 c035c298 f8eca880 c0127a64 ffff0001 f7739000

Call Trace:

 [<f8e2c249>] firegl_init_module+0xe7/0x17d [fglrx]

 [<c0127a64>] sys_init_module+0x105/0x214

 [<c01054f9>] sysenter_past_esp+0x52/0x71

```

Does anyone really think this has something to do with preemt in my kernel or smp or have any other ideas....?

----------

## cloudsurfer

Ummm, lemme ask this one. If I don't have any isa slots, I dont need isa support in the kernel, right? I ask because I see this in my dmesg:

```
atkbd.c: Spurious ACK on isa0060/serio0. Some program, like XFree86, might be trying access hardware directly.

atkbd.c: Spurious ACK on isa0060/serio0. Some program, like XFree86, might be trying access hardware directly.

```

I guess I will try that when I get home tonight but I guess I am just reaching for straws here.

----------

## Wedge_

AFAIK it's fine just to ignore those atkbd messages. 

I managed to reproduce your module loading error just by enabling the "Use register arguments" option in the "Processor type and features" section of the kernel config. I think this is meant to increase performance by passing function arguments in registers rather than on the stack, and it breaks binary drivers, which obviously includes the ones from ATI and nVidia. Disable this option, recompile, and the module should hopefully start behaving itself  :Smile: 

----------

## Admiral LSD

Reverse this patch if you're running -mm to enable the option to enable/disable Register arguments:

http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.6/2.6.6-mm1/broken-out/force-config_regparm-to-y.patch

----------

## cloudsurfer

In the continueing epic of me being a pain in the ass it still does not work. Getting the same error messages after using Wedge_'s ati-drivers from my portage overlay and though I did not apply the patch from the admiral, I just went into my .config file and change the REGPARM to "n". I will be posting my .config file up here later today, I have as yet to get a chance to upload it to my server. I did try a couple other kernel sources, mainly the gentoo-dev-sources, and the aa-sources, but no luck, the flgrx module always causes an error when loading. I can try another kernel but it needs to be 2.6 because of the hardware (ASUS P4C800-e motherboard with a Promise SATA controller), and because the system was compiled using NPTL support. If there are further suggestions I am game, but I hope everyone is starting to understand why I am so frustrated by this and made my original post.

If it helps (or does not help as is the case) my video card is not from ATI, its a Sapphire 9600 pro. It uses the Rv350 chipset, which is different from the R350 on the 9800.

Please lemme know what output you need from my machine. I can repost my config files, mebbe lspci -vv, whatever you need. I just wanna get this working so I can move on the the other hardware on my system, like my scanner and digital camera, and getting my adobe products working with wine. There is still so much let to be done, but the video card is holding up the rest of the system.

----------

## evol262

FYI, your card should be supported.  Sapphire and now Visiontek make cards for ATI in much the same way as, say, PNY, Chaintek, MSI, or Asus make cards for nVidia.  Anyway, if you're worried about support, go through your fglrx generated .conf file.  Somewhere in there, I think near "Devices," though I don't remember for sure, it'll say "Unknown 3rd party card, chipset is supported."  

I've got a 9500 sort of working on a SMP dev-sources kernel, so it is possible, but I'm running on an AMD system, 2.6.5 dev-sources, Promise SATA RAID 5, just via-agp instead of intel-agp.

----------

## cloudsurfer

Getting this when I emerge ati-drivers from my portage overlay:

```
 * Building the DRM module...

make: Entering directory `/usr/src/linux-2.6.6-mm2'

  CC [M]  /var/tmp/portage/ati-drivers-3.7.6-r2/work/lib/modules/fglrx/build_mod/agp3.o

  CC [M]  /var/tmp/portage/ati-drivers-3.7.6-r2/work/lib/modules/fglrx/build_mod/nvidia-agp.o

  CC [M]  /var/tmp/portage/ati-drivers-3.7.6-r2/work/lib/modules/fglrx/build_mod/agpgart_be.o

  CC [M]  /var/tmp/portage/ati-drivers-3.7.6-r2/work/lib/modules/fglrx/build_mod/i7505-agp.o

  CC [M]  /var/tmp/portage/ati-drivers-3.7.6-r2/work/lib/modules/fglrx/build_mod/firegl_public.o

/var/tmp/portage/ati-drivers-3.7.6-r2/work/lib/modules/fglrx/build_mod/firegl_public.c:2248: warning: initialization from incompatible pointer type

/var/tmp/portage/ati-drivers-3.7.6-r2/work/lib/modules/fglrx/build_mod/firegl_public.c:2266: warning: initialization from incompatible pointer type

/var/tmp/portage/ati-drivers-3.7.6-r2/work/lib/modules/fglrx/build_mod/firegl_public.c:2273: warning: initialization from incompatible pointer type

/var/tmp/portage/ati-drivers-3.7.6-r2/work/lib/modules/fglrx/build_mod/firegl_public.c:2280: warning: initialization from incompatible pointer type

/var/tmp/portage/ati-drivers-3.7.6-r2/work/lib/modules/fglrx/build_mod/firegl_public.c:2289: warning: initialization from incompatible pointer type

  LD [M]  /var/tmp/portage/ati-drivers-3.7.6-r2/work/lib/modules/fglrx/build_mod/fglrx.o

  Building modules, stage 2.

  MODPOST

  CC      /var/tmp/portage/ati-drivers-3.7.6-r2/work/lib/modules/fglrx/build_mod/fglrx.mod.o

  LD [M]  /var/tmp/portage/ati-drivers-3.7.6-r2/work/lib/modules/fglrx/build_mod/fglrx.ko

make: Leaving directory `/usr/src/linux-2.6.6-mm2'

nostrip

```

That's right around the area of the patch:

```
--- firegl_public.c.orig        2004-05-14 21:38:53.296635464 +0000

+++ firegl_public.c     2004-05-14 21:40:28.492163544 +0000

@@ -2052,7 +2052,7 @@ static vm_nopage_ret_t vm_shm_nopage(str

     pMmPage = virt_to_page(kaddr);

 #endif /* LINUX_VERSION_CODE < 0x020400 */

-    atomic_inc(&(pMmPage->count));  /* inc usage count of page */

+    get_page(pMmPage);  /* inc usage count of page */

 #if LINUX_VERSION_CODE >= 0x020400

   //  __KE_DEBUG3("vm-address 0x%08lx => kernel-page-address 0x%p\n",
```

I believe it built, but it did have those warnings. I might take a look at that code later on, gonna reboot now that I reversed the patch for the config REGPARM. If that does not work I will emerge aa-sources again, kill my portage overlay, and try again.

My .config file is here

Talk to you all in a bit.

----------

## cloudsurfer

Ummm, its working now. Thank's all of you for your help and patience. I will continue riding the bleeding edge and see what else breaks.

----------

## Admiral LSD

Those warnings are normal, I used to get those even before the page->count breakage. As long as portage doesn't tell you the DRM module wasn't built then it's usually safe to assume it has. Looking at the output you pasted though it looks like it has, I can see fglrx.ko right at the bottom.

----------

## cloudsurfer

Just one more question, if anyone is looking. Since mm-sources will be moving the agp changes out to the main tree after a while, should we worry about making a patch for everyone to use, or just hope thta ATI will release a new driver version specifically for the 2.6 kernel by that time?

----------

## Wedge_

Given ATIs record of fixing this type of problem ( :Rolling Eyes: ), the usual procedure is for someone to submit a bug to bugs.gentoo.org with the patch attached to it, so it can be included in the official ebuilds. I'm not sure it's worth doing right now, because it doesn't affect most kernels, but once the changes get moved into the main tree it shouldn't be a problem to get that done.

----------

## Admiral LSD

At least ATi owners can take some comfort in the fact that they're having a much better time with this than nVidia owners. ATi's drivers don't seem to mind 4K stacks one bit and only need a simple patch to work with CONFIG_REGPARM whereas you need to do all kinds of voodoo to make nVidias drivers work under 2.6.6.

----------

## Sheridan

I have been lurking around this forums some time now.

Alot of very knowledgable and helpful people in here!

I just wanted to report that my current setup are working now thanks to the posts by Wedge_ and Admiral LSD.

Patching both the kernel for the REGPARM and altering the ati-drivers ebuild resulted in fully working 3d!!!

Thank you guys!!!!

-Sheridan

Asus A7N8X deluxe v1.04

AMD AthlonXP 2500+

Sapphire Radeon 9700

mm-sources 2.6.6-r5 (Yes!! it works on mm5 too!!! )

Ati-drivers 3.7.6-r1

 :Laughing: 

On a side note:

With the current ati-drivers (3.7.6) I have poor graphics quality in Neverwinter Nights. THe map view shows some very strange and "blocky" graphics at the edges. Hard to explain! But it does not look good!!!

 Can anyone confirm that this is a driver issue and not something I have borked by patching stuff I do not really know anything about   :Wink: 

What can be done about this?? downgrade to 3.2.8?

----------

