LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Enabling direct rendering... (https://www.linuxquestions.org/questions/linux-hardware-18/enabling-direct-rendering-357739/)

Riddick 08-28-2005 05:35 AM

Enabling direct rendering...
 
How do I get direct rendering to work?
Quote:

ed@edslaptop:~$ glxinfo | grep "direct rendering"
direct rendering: No
ed@edslaptop:~$
I have an onboard Ati M3 card. I have tried using the ati driver,
the vesa driver and the r128 driver and that's not been enough!

When I modprobe for agpgart, it is not there, would that stop it working?

Help!

Riddick

dracolich 08-28-2005 01:00 PM

ATI cards are always a problem to get 3D working. Took me a long time to get DRI working on my laptop's radeon mobility U1. What kind of system do you have and what's the rest of the card's name? For this I'll assume Radeon.

1) First thing you'll want to do is recompile your kernel. In the video driver sections enable as built-in: AGP (provides agpgart) and DRM. Include NONE of the individual chipset drivers.
2) Next go to this site: http://dri.freedesktop.org/snapshots/
Get the latest radeon-* and in the archive folder get the latest common-*
3) Make sure ALL Mesa stuff is removed (may be tricky)
4) In /usr/X11R6/lib/modules/extensions make backups of libGLcore.a, libdri.a and libglx.a. These files will be replaced. For mine to work I had to still use the original libdri.a
5) Compile and install the common-*, then the radeon-* packages
6) Edit your xorg.conf to load "GLcore", "glx" and "dri"; in the graphics device section load the "radeon" driver; and at the bottom put:

Section "DRI"
Mode 0666
EndSection

The next time you go to check glxinfo login as root and don't grep. If direct rendering is still no, look at GL vendor. If it's SGI then you still have some Mesa stuff. When you get it working try as a user as there may be permission issues with the device in /dev. If so the easiest fix is to add the user to the group that owns the device.

Riddick 08-28-2005 02:39 PM

are you sure about the raedon and not the rage drivers?
All the rest I'm doing I'll let you know how it turns out...

Thanks,
Riddick

P.S. how do i get rid of all the MESA stuff, I'm on slackware and it doesn't
seem to be installed as a package!

Thanks again

P.P.S. /usr/X11R6/lib/modules/extensions doesn't exist,
/usr/X11/lib/modules/extensions exists but there is nothing in it!

Riddick 08-28-2005 02:49 PM

Do I also need to install OpenGL - I don't think it is...

dracolich 08-28-2005 03:16 PM

My use of the name radeon was only as an example. If yours is a rage use rage. GL support will be included with the dri packages. For the mesa stuff I'll have to look through my notes and get back. I remember one filename - libMesaGL - I think it was in /usr/X11R6/lib. Yours might be /usr/X11/lib. Like I said I'll check my notes and get back.

Again what kind of system is this? Dekstop or laptop? And do you know the full name of the ATI card? Is it a Rage something M3?

I wouldn't worry about the extensions directory being empty. But before you get too far let's answer those questions. And always before you recompile a kernel make a backup of your current one. Just cp the file to something you'll know you won't overwrite or delete. That way if your new one doesn't work as expected you can restore it.

Riddick 08-28-2005 03:39 PM

This is a DELL C600 laptop.
The name of the graphics card is:
"VGA compatible controller: ATI Technology Inc Rage Mobility M3 AGP 2x (rev 02)"

I have a backup 2.4 kernel that I'm not modifying at all that
we can always fall back on!

I'll wait for further instructions before removing mesa stuff,
and compiling those programs, alright?

Thanks, you are being very useful,

Riddick

P.S. found a libOSMesa.a and ... .so.4.0

Riddick 08-28-2005 05:08 PM

Results:

ed@edslaptop:~$ locate mesa
/usr/doc/glut-3.7/README.mesa
/usr/lib/perl5/5.8.7/pod/perlvmesa.pod
/usr/man/man1/perlvmesa.1.gz
/usr/X11R6/include/GL/osmesa.h
ed@edslaptop:~$ locate Mesa
/usr/X11R6/lib/libOSMesa.so.4
/usr/X11R6/lib/libOSMesa.so.4.0
/usr/X11R6/lib/libOSMesa.so
/usr/X11R6/lib/libOSMesa.a
ed@edslaptop:~$ locate MESA
ed@edslaptop:~$

If I "rm" those as root, can I continue and complie those two packages?

Thanks, Riddick

Riddick 08-28-2005 05:29 PM

...did it all and there is MESA stuff left! where do I find it.

By the way my root doesn't have "glxinfo"!

Thanks,
Riddick

voyciz 08-28-2005 05:48 PM

Riddick, I believe you need to update locate's database. It creates a db rather than search the hdd whenever you want to find something. In Slackware, "locate" is linked to "slocate", which uses "updatedb" to upgrade its database...I don't know about SuSe. Check the man page for locate and see what it says to do.

voyciz 08-28-2005 05:50 PM

...oh, and by default, /usr/X11R6/bin isn't in root's PATH, but if you use the program's full location (/usr/X11R6/bin/glxinfo, perhaps), root should be able to run it. But why run glxinfo as root, anyway?

Riddick 08-28-2005 06:02 PM

I just did that!
I deleted all those files, but there must still be something somewhere.

When I installed the two files, one said configuring and compiling kernel modules - do I need to do anything more than that, or do I have to do some sort of kernel recompile?

Need to get rid of MESA now!

Thanks for any help!

Riddick

P.S. here is the proof:

Code:

root@edslaptop:/home/ed# locate -u
root@edslaptop:/home/ed# locate mesa
root@edslaptop:/home/ed# locate MESA
root@edslaptop:/home/ed# locate Mesa
root@edslaptop:/home/ed#

Help!

dracolich 08-29-2005 06:28 AM

Sorry for the long wait. I found my notes. According to your recent posts you definitely will want the rage driver as opposed to the radeon. So you found the libOSMesa file and removed that. According to my notes you need to find three others: libGL, libGLU and libGLw. I found mine in either /usr/local/lib or /usr/X11R6/lib. The new driver will install new libGL and libGLU into /usr/X11R6/lib. Yours might go to /usr/X11/lib.

Running glxinfo as root will only be for verifying that DRI is enabled. If a user doesn't have appropriate permissions to the card in /dev glxinfo will report "direct rendering: no". That bugged me for a couple of days before I figured out it was a permissions issue.

Riddick 08-29-2005 07:15 AM

Right... I have a question now... Those installation scripts say:

The script will use the following XFree86 directory:

/usr/X11R6

is that correct or shall I redirect them to /etc/X11 ?

I got rid of the files you said from /usr/X11R6 and now I get

ed@edslaptop:~$ glxinfo
glxinfo: error while loading shared libraries: libGLU.so.1: cannot open shared object file: No such file or directory
ed@edslaptop:~$

even after re running both installations scripts!

Also the rage driver fail to install the kernel modules:
Code:

make DRM_MODULES=r128.o modules
make[1]: Entering directory `/home/ed/rage128-20050718-linux.i386/dripkg/drm/linux-core'
make -C /lib/modules/2.6.12.5/source  SUBDIRS=`pwd` DRMSRCDIR=`pwd` modules
make[2]: Entering directory `/usr/src/linux-2.6.12.5'
  Building modules, stage 2.
  MODPOST
make[2]: Leaving directory `/usr/src/linux-2.6.12.5'
make[1]: Leaving directory `/home/ed/rage128-20050718-linux.i386/dripkg/drm/linux-core'
FATAL: Error inserting r128 (/lib/modules/2.6.12.5/kernel/drivers/char/drm/r128.ko): Unknown symbol in module, or unknown parameter (see dmesg)

Dmesg says:

Code:

kobject_register failed for drm (-17)
 [<c0230259>] kobject_register+0x49/0x80
 [<c0131db5>] mod_sysfs_setup+0x55/0xb0
 [<c0132eb7>] load_module+0x7c7/0xa70
 [<c014cd68>] do_mmap_pgoff+0x468/0x770
 [<c013320a>] sys_init_module+0x7a/0x1a0
 [<c0103185>] syscall_call+0x7/0xb
r128: Unknown symbol drm_cleanup_pci
ed@edslaptop:~$

Thanks.
In conclusion there are 3 problems:
1. where do i tell the scripts to install
2. what happened to the thing that breaks glxinfo, and where does it go looking for it?
3. what's wrong with the kernel modules installation for the rage?

Thanks,
Riddick

dracolich 08-29-2005 08:15 AM

I think I just found an important key to this puzzle from a SuSE forum:

Quote:

On Wednesday 24 September 2003 05:52, Nick LeRoy wrote:
> I have a Dell Inspiron 4000 with a Mobility M3, and, for the life of me, I
> can't get DRI working on it.

This chipset needs the GATOS driver. I don't know the status of the GATOS
driver support in 8.2, but I don't think it works out of the box. My Inspiron
5000 didn't get hardware acceleration out of the box with 8.1 or 8.2. I
applied the patches when I was running 8.1 and it worked fine. I didn't
bother when I updated that machine to 8.2.

Look here:

http://gatos.sourceforge.net/ati.2.php
I guess the rage package is not what your card needs. I wouldn't worry about the glxinfo output. Thats because the libGLU file is not there anymore. If that actually needs to be replaced find the mesa package on your install CD or get a binary package that you can extract from.

You did make sure your kernel has agp and drm didn't you?

Riddick 08-29-2005 08:36 AM

kernel has agp and drm built in.
I'm going to recompile without rage support.

So the GATOS driver above is the DRI package for M3s is that right?
I'm going to get it and see...
So: It seems to be the right thing, but it's for XFree86 versions of X,
versions 4.2.0 and 4.3.0... and I think I have XOrg... what shall I do!

I'm a bit confused - what should I be doing now?
Should the common dri package be installed?
What do i need to do in terms of GATOS?
How do I install GATOS!

Thanks for your continuous help,
Don't give up on me yet!
Riddick

As a second thought, is it not possible to use VESA and MESA to get 3d acceleration?

dracolich 08-29-2005 12:47 PM

It's true that using mesa with the vesa or fb driver will enable GLX but it won't enable hardware accelleration. If you try to run anything in GL mode it'll be painfully slow.

This GATOS driver is different from the other so the common dri thing won't be necesary. I'm not familiar with it so I don't know about building and installing it. The page did make reference to part of it being included with x.org. The drm-kernel section says the module is not required because the cvs version of x.org 7 and the linux kernel will setup the card properly.

It can't hurt to try using the latest xfree version. The worst that can happen will be the driver prevents X to start. Any time that happens (for any reason) you can always edit the xorg.conf and set it to load the generic vga or svga driver until you fix it.

Riddick 08-30-2005 02:29 AM

so I guess the real question here is:
what version of XFree do I have? 4.3.0?

The whole GATOS thing looks a bit out of date!

Thanks,
Riddick

dracolich 08-30-2005 07:22 AM

As you mentioned before you have Xorg. It's the successor to XFree86.

I've done some serious googling now that I know your card and have found a couple of things

http://www.thinkwiki.org/wiki/ATI_Rage_Mobility_M3

Maybe you can get a newer rage driver for xorg?

And from http://tuxmobil.org/graphic_linux.html

Quote:

ATI Rage Mobility M3/128
DELL Inspiron 5000e
works with Xi Graphics patch , fully accelerated support is provided at 8, 16, and 24 bits per pixel. This LGD also supports Xi Graphic's Dual View feature in the Single Logical Screen mode.
The Xi Graphics project is commercial so it's not free. The link to a patch is dead.

Also, in your xorg.conf file make sure you have certain things: snippets from http://www.rserve.biz/gentoo/kilrathi/xorg.conf

Quote:

Section "Module"
Load "GLcore"
Load "dbe"
Load "dri"
Load "extmod"
Load "glx"
Load "pex5"
Load "record"
Load "xie"
Load "v4l"
Load "freetype"
EndSection
The important ones here are GLcore, dri and glx. Freetype is for fonts I think. And try without dbe (Double Buffering Extension). pex5, record, xie and v4l I've never used. Probably for video capture.

Quote:

Section "Monitor"
Identifier "Generic LCD Panel 1024x768"
VendorName "Unknown"
ModelName "Unknown"
HorizSync 31.5-48.5
VertRefresh 40-70
#Specific modelines for this model
Modeline "1400x1050" 113.89 1400 1432 1552 1752 1050 1053 1056 1084 -hsync -vsync
EndSection

Section "Device"
Identifier "ATI|Rage Mobility M3 AGP 2x"
Driver "r128"
BoardName "ati"
VideoRam 8192
Option "EnablePageFlip" "true"
Option "AGPFastWrite" "true"
Option "AGPMode" "2"
EndSection

Section "Screen"
Identifier "Screen0"
Device "ATI|Rage Mobility M3 AGP 2x"
Monitor "Generic LCD Panel 1024x768"
DefaultDepth 16
Subsection "Display"
Depth 32
Modes "1024x768"
EndSubSection
Subsection "Display"
Depth 24
Modes "1024x768"
EndSubSection
Subsection "Display"
Depth 16
Modes "1024x768"
EndSubSection
Subsection "Display"
Depth 8
Modes "1024x768"
EndSubSection
EndSection

Section "DRI"
Mode 0666
EndSection
Leave out that Modeline entry from the mointor section, and for each "Display" subsection you can add more resolutions. I use
Modes "1024x768" "800x600" "640x480"

Note: You might need to put the ati rage kernel module back in.

Riddick 08-31-2005 04:20 AM

You've been amazing thanks for all this:
so apparently the r128 driver should be OK - no?
Shall I uninstall all the "common" and "rage" DRI packages,
and reinstall XOrg?

I've been loading all of those in xorg.conf

When you say newer rage driver - do you mean from the DRI website?
Is that related to the Kernel module?
Where will I find that!

Do I need the XiG graphics things to have acceleration? It doesn't look like the thing I need.

This seems interesting, but can I still run my KDE on it?
http://www.xig.com/Pages/Summit/Series/LX-Platinum.html

Let me know what is the best way to proceed!

Thanks, you've been amazing so far!
Riddick

dracolich 08-31-2005 07:59 AM

Thanks! Your patience has been equally helpful. :) The common and dri things will not be necessary. What do you mean by "loading those in xorg.conf"? There should be no reason to reinstll xorg. If you need to restore the mesa files you just get a mesa package for that. I'm not sure if a single driver like r128 can be upgraded by itself. The wiki link I pasted had r128 underlined as a hyperlink. See where that goes. The xig thing looks like accelleration for a professional environment, hence the commercial license. It's not what you're looking for.

Once we finally figure this out it won't matter which window manager you use: KDE, Gnome, Fluxbox, XFCE, etc. They all run on top of X, which is where hardware is setup. So if 3D works in KDE it'll also work in, say, FVMW.

Try the r128 driver again using the xorg.conf snippets as a guide and see what you get. If it's still not right post the "modules" and "graphics device" sections of your xorg.conf. As I mentioned way back at the beginning of this, ATI is a pain to get 3D working due to poor vendor support and proprietary drivers.

I should probably mention that with the radeon mobility card in my laptop, with 16MB RAM and dri enabled, performance is not suitable for large 3D apps. Doom Legacy in a window is fine, but X crashes trying to run a 3D app full screen.

Riddick 08-31-2005 10:35 AM

By loading I mean most of those modules were already in my xorg.conf

I had doubts about KDE because of XiG, but if we're
not using it then it's no issue!

The main usage for this 3D acceleration will be for 3ddesk... we'll see what performance we get!

so: should I get MESA back? I guess I should...

Will try the new org.conf setup, and let you know!
Thanks again,

Riddick

Riddick 09-03-2005 08:49 AM

That xorg.conf doesn't make a difference!
shall I get MESA again?

3ddeskd says: glXIsDirect failed, no Direct Rendering possible!

Tell me how to proceed!

Remember that glxinfo is still broken because of the files we deleted!

Riddick

dracolich 09-04-2005 06:48 AM

I looked at the 3ddesk thing the other day. It's gonna need hardware accelleration to run at a smooth speed. To be honest I wouldn't trust it to not crash with my ATI chip.

At this point I would reinstall the mesa stuff to get the libGLU file back. That's the file that provides the information for glxinfo to report: no GLU, no glxinfo info. Next time you try to remove the mesa files, just move or rename them instead of delete them - put them in your ~ or put a _ in front of the name.

I think the way I would do it is to download new packages. According to your username info you're using both Suse and Slackware. The Slackware package browser, http://slackware.it/en/pb/searchfile...ring=mesa&w=on ,
has the x11 packages. It may even be a newer version than what you have now. Check /var/log/packages to see your current version - something like x11-6.8.1-i486-1.tgz. Get all the x11 packages and run (as root)

upgradepkg --install-new x11*.tgz

If they're the same version use installpkg. This will restore the mesa things. If there's a newer version of the r128 driver it would be there too.

BTW: could you post your "modules" and "graphics device" sections of xorg.conf

Riddick 09-04-2005 05:09 PM

Right - I am working this week but then I'm going back to Rome and
I will give you my full attention, although I will keep checking back
and seeing what I can do.

Let's take it for said that I am on the Slackware current setup.

Hard deleting was a bit silly.. yes; can I use the
"slackupdate.sh" script to update X?

My current xorg.conf file is here:

http://www.bits.bris.ac.uk/wellconnected/xorg.conf

Thanks for everything!
I will try to get to a net cafe and download the relevant X files.

Thanks again,
Riddick

Riddick 09-04-2005 05:14 PM

Double post!
I guess I could use this to thank you again for bearing with me.
If 3ddesk doesn't work it's not a big issue, but it is a good way of testing if it's worked!

Excellent!

Riddick

dracolich 09-04-2005 07:33 PM

I learned the hard way about deleting files myself. :D I still make the mistake from time to time and it's always a pain to restore the files. (I recently accidentally deleted my entire kde directory!)

I'm not familar with that update script. The xorg.conf file looks ok. A couple of points, though:

Load "pex5"
Load "record"
Load "xie"

I haven't seen these until I found the example for you. It should be safe to comment them out and see what happens.

#Specific modelines for this model
Modeline "1400x1050" 113.89 1400 1432 1552 1752 1050 1053 1056 1084 -hsync -vsync

Another option I'm not familiar with. Maybe comment that too.

And for the grahics device section, keep those other card identifying options handy. You might not need them but if you do...

Thank you for bearing with me too. This has been a real chin-scratcher. A typical ATI 3D problem. It was a year before I figured mine out. I tried every guide I found with no success and finally got lucky one day with a Google search. I guess what works for one person won't necesarily work for another.

Riddick 09-06-2005 03:02 AM

I reinstalled the X11 packages from my Slackware current CDs amd it worked!!!
3ddeskd running at only texturesize 256 (instead of 1024)
but it's fullscreen and it's goooooood.

Thanks for bearing with me.

I wil send out my xorg.conf out to the people who asked for it,
the others with C600s!

I can't believe we succeeded!

Thanks so much!

Riddick


All times are GMT -5. The time now is 07:55 PM.