# kernel 2.6.11 and x11-drm

## Liquid

I want to update the kernel to 2.6.11 but x11-drm fail to compile, with 2.6.10 work fine.

Someone else had the same problem?

----------

## kon

I have mach64 and i have some problem.

This is solution for mach64

ls -l /usr/src | grep lr

#I see: lrwxrwxrwx   1 root root   22 íÁÒ 13 22:50 linux -> linux-2.6.11-gentoo-r3

cd /tmp

wget http://dri.freedesktop.org/snapshots/mach64-20050312-linux.i386.tar.bz2

tar -xvjpf mach64-20050312-linux.i386.tar.bz2

cd dripkg/drm/linux-core/

make -f Makefile mach64.o

#Now we have drm.ko and mach64.ko

cp drm.ko /lib/modules/`uname -r`/kernel/drivers/char/drm/

cp mach64.ko /lib/modules/`uname -r`/kernel/drivers/char/drm/

rm /etc/modules.d/x11-drm

modules-update

depmod -a

modprobe mach64

#Works fine for me

----------

## mikemcquaid

Compiles fine for me, then when I try and modprobe it:

```
sa80 linux-core # modprobe mach64

FATAL: Error inserting mach64 (/lib/modules/2.6.11-gentoo-r2/kernel/drivers/char/drm/mach64.ko): Unknown symbol in module, or unknown parameter (see dmesg)
```

Checked dmesg, get these lines:

```
mach64: Unknown symbol drm_get_dev

mach64: Unknown symbol drm_cleanup_pci
```

Any ideas?

 :Shocked: 

----------

## kon

see   depmod mach64

see   depmod drm

do you "cp drm.ko /lib/modules/`uname -r`/kernel/drivers/char/drm/" and depmod -a ?

do you remove old modules "rmmod mach64 && rmmod drm" ?

do you kill X before make experiments ?

may be "modprobe  drm" before "modprobe mach64" ?

----------

## mikemcquaid

Still no joy  :Sad: 

----------

## k_max

 *kon wrote:*   

> I have mach64 and i have some problem.
> 
> This is solution for mach64
> 
> ls -l /usr/src | grep lr
> ...

 

don't forget to

```
wget http://dri.freedesktop.org/snapshots/common-20050312-linux.i386.tar.bz2
```

it builds drm.ko and mach64.ko in dripkg/drm/linux-core/ after compiling. so just mkdir /lib/modules/{your_current_kernel_version}/kernel/drivers/char/drm, copy this *.ko files in there, 'depmod -ae' and 'modprobe mach64'. it will load mach64.ko and drm.ko automatically. works for me  :Wink: 

----------

## agnitio

I'm having the same problem although I'm using the radeon module. I tried emerging the cvs-version through fluidportage but with the same result, a whole bunch of errors about deprecated functions.

Not that I can see any major differences between the updated code and the one included in the kernel but it just feels better to be up to date.  :Smile: 

----------

## sekopaa

 *mikearthur wrote:*   

> Compiles fine for me, then when I try and modprobe it:
> 
> ```
> sa80 linux-core # modprobe mach64
> 
> ...

 

The mach64/drm modules seem to conflict with the Direct Rendering Manager in the 2.6.11 kernels. Disable the DRM in the kernel and the error goes away...

```

$ cd /usr/src/`uname -r`

$ make menuconfig

Device Drivers  --->

   Character devices  --->

      < > Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)

$ make && make modules_install
```

Then reinstall the mach64/drm modules as described above.

[edit]I just noticed that in addition you may also have to disable the console and/or VGA, VESA framebuffer support as well... When I did this 3D acceleration worked...

```

Device Drivers  --->

   Graphics Support --->

      < >   VGA 16-color graphics support

      < >   VESA VGA graphics support

      Console display driver support  --->

         < > Framebuffer Console support
```

----------

## agnitio

I did not have the Direct Rendering Manager activated in my kernel while compiling. x11-drm still failed referring to a bunch of deprecated functions. I'm on a mobility radeon m6.

----------

## sekopaa

 *agnitio wrote:*   

> I did not have the Direct Rendering Manager activated in my kernel while compiling. x11-drm still failed referring to a bunch of deprecated functions. I'm on a mobility radeon m6.

 

I don't know about the mobility radeon m6, is the chipset mach64?

Have you tried:

 (1) Enabling the DRM in the kernel with the ATI Radeon support.

 (2) Enabling the ATI radeon driver under Graphics support (and not compiling x11-drm)

?

----------

## sge_kane

 *agnitio wrote:*   

> I did not have the Direct Rendering Manager activated in my kernel while compiling. x11-drm still failed referring to a bunch of deprecated functions. I'm on a mobility radeon m6.

 

Same for me here using gentoo-dev-sources-2.6.11-r6.... just that I am on mobility radeon m9...

Any solution yet??

----------

## scourage

I just went through trying to install the mach64 from the DRI site with the Vanilla 2.6.12-rc4 kernel.  I tried DRM, no DRM, frame buffer, no frame buffer, kabooki dance and chicken-bones.  Nothing could get it to work.  If anybody knows how to get it working, or a fix for the API change, that would be cool.  Otherwise rolling back to the 2.6.10 kernel may be the answer.

Cheers, 

Bob

----------

## eccerr0r

I get this when attempting to load drm.ko, and seems even though it failed, modprobe thinks it passed?

```
kobject_register failed for drm (-17)

 [<c01be251>] kobject_register+0x51/0x60

 [<c012ad68>] mod_sysfs_setup+0x58/0xc0

 [<c012bd6d>] load_module+0x6bd/0x940

 [<c012c047>] sys_init_module+0x57/0x230

 [<c0141ea0>] sys_munmap+0x40/0x70

 [<c01025cf>] syscall_call+0x7/0xb

```

with this failure, it causes mach64.ko to fail with missing symbols since drm isnt really loaded...

----------

## bltngshp

ThankYouThankYouThankYouThankYouThankYouThankYouThankYouThankYouThankYouThankYouThankYouThankYouThankYouThankYouThankYouThankYou

After reading many different things on how to get dri working I finally have direct rendering working with the mach64 based Rage Mobility in my Sony PCG-z505ls with a 2.6.11-r11 gentoo-source kernel. Where the modules I needed reside and where I needed to put them was the last piece of the puzzle. This is what I did:

```
# emerge -C x11

# USE="insecure-drivers sdk" emerge x11
```

I then watched the director's cut of The Lord of the Rings trilogy, and was back just in time to watch the emerge finish...

And because I hate having to remember things I updated my package-use file and added the needed options to my xorg.conf

```
# cat /etc/portage/package.use

x11-base/xorg-x11 insecure-drivers sdk

# cat /etc/X11/xorg.conf

.

.

.

Section "DRI"

    Mode    0666

EndSection
```

Now for the kernel...

```
#cd /usr/src/linux && make menuconfig

Device Drivers  --->

   Character devices  --->

      <M>  /dev/agpgart (AGP Support)

            <M> ATI chipset support

            <M> Intel 440LX/BX/GX, I8xx and E7x05 chipset support

      < > Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) 
```

If you are using a PCI based card then I recommend still enabling the AGP support for your northbridge and video card. From what I've read the kernel will first load these modules and attempt to run the card from them and then fall back on the PCI bus when AGP fails. This just ensures that you're not missing necessary modules.

```
# mount /boot && make clean && make && make modules && make modules_install && make install

# shutdown -r now
```

After I rebooted I made sure I could still load X11 in 2D. If you can't startx at this point then you have more problems then just getting the mach64 module.

```
# startx

# glxinfo | grep rendering

direct rendering: No

# exit
```

Now to get the modules:

The only thing in my /usr/src directory at this point is the source code for my kernel and a symbolic link pointing to it. From what I've gathered; where you 've extracted the dripkg folder to IS important, also the order you extract the common and the mach64 IS important.

```
# cd /usr/src

# wget  http://dri.freedesktop.org/snapshots/mach64-20050707-linux.i386.tar.bz2

# wget  http://dri.freedesktop.org/snapshots/common-20050707-linux.i386.tar.bz2

# tar -xvjpf common-20050707-linux.i386.tar.bz2 

# tar -xvjpf mach64-20050707-linux.i386.tar.bz2 

# cd dripkg/drm/linux-core/

# make -f Makefile mach64.o
```

Now the part the I was missing:

```
# mkdir /lib/modules/2.6.11-gentoo-r11/kernel/drivers/char/drm/ 

# cp drm.ko /lib/modules/2.6.11-gentoo-r11/kernel/drivers/char/drm/ 

# cp mach64.ko /lib/modules/2.6.11-gentoo-r11/kernel/drivers/char/drm/

# modules-update

# depmod -ae

# modprobe mach64

# startx

# glxinfo | grep rendering

direct rendering: Yes
```

And now we are so happy we do the dance of joy.

BTW framebuffer and splash support are enabled and working as intended.

Also, I take no credit for these instructions. I didn't write them, I just followed them.

----------

