Author Topic: The game is under the belief that direct rendering is not enabled, whe  (Read 1513 times)

clinux_rulz

  • Wayfarer
  • *
  • Posts: 9
    • View Profile
Hi all,

I have compiled the latest version of PlaneShift, in Gentoo using emerge. And when I run it I recieve the following message:

Indirect rendering may indicate a flawed OpenGL setup if you run on a local X server.

This message may not be a PlaneShift error, but a CrystalSpace error (the library used by PlaneShift.) However I think someone here would know the solution, or a quick fix.

I can prove I have direct rendering avaliable:

clinton@sempron ~ $ glxinfo | grep direct
__driCreateNewScreen - succeeded
direct rendering: Yes
clinton@sempron ~ $

The word __driCreateNewScreen - succeeded is a system message that comes from my driver, I suppose the existance of this message could cause parsing problems, if PlaneShift checks for direct rendering support through glxinfo.

clinton@sempron ~ $ glxgears
__driCreateNewScreen - succeeded
3254 frames in 5.0 seconds = 650.800 FPS
3275 frames in 5.0 seconds = 655.000 FPS
3271 frames in 5.0 seconds = 654.200 FPS
3286 frames in 5.0 seconds = 657.200 FPS
3272 frames in 5.0 seconds = 654.400 FPS

clinton@sempron ~ $

As you can see I get around 650 FPS in glxgears, its not a brillant graphics card, but its alright for a onboard one.

clinton@sempron ~ $ sudo lspci | grep VGA
01:00.0 VGA compatible controller: VIA Technologies, Inc. VT8378 [S3 UniChrome] Integrated Video (rev 01)
clinton@sempron ~ $

I have a VIA S3 UniChrome onboard video card.

I am able to play other games without any problems, like Unreal Tournament and such.

clinton@sempron ~ $ uname -r
2.6.14-gentoo-r5
clinton@sempron ~ $

The distro I\'m using is Gentoo. And I\'m running the linux kernel version 2.6.14r5.

The position of the dynamic opengl libraries in Gentoo differs to other linux systems.

mine are located in /usr/lib/opengl/via/lib for my accelerated opengl drivers.
    AND
located in /usr/lib/opengl/xorg-x11/lib for my software opengl drivers.

I have checked ldconfig to make sure the correct opengl libraries where in use, and they were, I did the following:

clinton@sempron ~ $ /sbin/ldconfig -p | grep libGL
        libGLw.so.1 (libc6) => /usr/lib/libGLw.so.1
        libGLw.so (libc6) => /usr/lib/libGLw.so
        libGLU.so.1 (libc6) => /usr/lib/libGLU.so.1
        libGLU.so (libc6) => /usr/lib/libGLU.so
        libGL.so.1 (libc6) => /usr/lib/opengl/via/lib/libGL.so.1
        libGL.so (libc6) => /usr/lib/opengl/via/lib/libGL.so
        libGL.so (libc6) => /usr/lib/libGL.so
clinton@sempron ~ $

I really don\'t know why PlaneShift thinks I don\'t have direct rendering enabled. I hope someone can help me.

Thanks in advance.
« Last Edit: February 04, 2006, 06:31:17 am by clinux_rulz »

oliver123

  • Traveller
  • *
  • Posts: 30
    • View Profile
(No subject)
« Reply #1 on: February 05, 2006, 06:57:50 pm »
What processor do you have? AFAIK you can get up to 900 fps in glxgears with indirect rendering on a modern P4 system... So 650 fps might also be possible with indirect rendering.

Maybe you could also check what happens if you force indirect rendering in glxgears (IIRC by running `LIBGL_ALWAYS_INDIRECT=1 glxgears`) and see how fast that is.

Oliver

Wired_Crawler

  • Hydlaa Citizen
  • *
  • Posts: 429
    • View Profile
(No subject)
« Reply #2 on: February 05, 2006, 07:15:33 pm »
Hello.

Look at this:
Quote
Originally posted by clinux_rulz
        libGL.so.1 (libc6) => /usr/lib/opengl/via/lib/libGL.so.1
        libGL.so (libc6) => /usr/lib/opengl/via/lib/libGL.so
        libGL.so (libc6) => /usr/lib/libGL.so

As You wrote, You have two versions of opengl libraries. Is /usr/lib/libGL.so symlink to one of those ?  Maybe it points to not-accelerated driver ?
"Close the world, txEn eht nepO."

clinux_rulz

  • Wayfarer
  • *
  • Posts: 9
    • View Profile
(No subject)
« Reply #3 on: February 06, 2006, 05:21:04 am »
Thanks for both your posts, I can now clarify where I stand.

Reply for oliver123:

clinton@sempron ~ $ LIBGL_ALWAYS_INDIRECT=1 glxgears
700 frames in 5.0 seconds = 140.000 FPS
633 frames in 5.0 seconds = 126.600 FPS
759 frames in 5.0 seconds = 151.800 FPS
759 frames in 5.0 seconds = 151.800 FPS
632 frames in 5.0 seconds = 126.400 FPS
759 frames in 5.0 seconds = 151.800 FPS

clinton@sempron ~ $

You can see a speed drop from 650 to about 150 when indirect rendering is used.

My onboard graphics card is not too crash hot, and I\'ve been meaning to by an actual graphics card, probably an apg8 nvidia radeon of some sort. I haven\'t got an PCIExpress port, I just missed out on that one when I got my computer.

My processor is a \"AMD Sempron 2600+ Socket A\", this normally runs at 1.8GHz, however I have clocked it down to 1.4GHz due to overheading problems. I\'ve been meaning to by some more fans, I think I might be missing a system fan. At the moment I\'m only using the fans that came with the tower. There is no way I would want to overclock it if it gets too hot at normal speed.

Speaking of which I might be mistaken, what is too hot, 60C 70C 80C? (C is celcius, I forget the conversion to farienheit).

Replay for Wired_Crawler:

Here\'s some information on where the symbolic links point to, via are my accelerated drivers, and xorg are my non-accelerated drivers.

clinton@sempron ~ $ ls -l /usr/lib/libGL.so /usr/lib/opengl/via/lib/libGL.so /usr/lib/opengl/via/lib/libGL.so.1
lrwxrwxrwx  1 root root 32 Jan 26 03:13 /usr/lib/libGL.so -> /usr/lib/opengl/via/lib/libGL.so
lrwxrwxrwx  1 root root 10 Jan 26 03:11 /usr/lib/opengl/via/lib/libGL.so -> libGL.so.1
lrwxrwxrwx  1 root root 12 Jan 19 20:45 /usr/lib/opengl/via/lib/libGL.so.1 -> libGL.so.1.2
clinton@sempron ~ $ ls -l /usr/lib/opengl/via/lib
total 404
lrwxrwxrwx  1 root root     26 Jan 26 03:12 libGL.a -> ../../xorg-x11/lib/libGL.a
lrwxrwxrwx  1 root root     10 Jan 26 03:11 libGL.so -> libGL.so.1
lrwxrwxrwx  1 root root     12 Jan 19 20:45 libGL.so.1 -> libGL.so.1.2
-rwxr-xr-x  1 root root 406824 Jan 19 23:06 libGL.so.1.2
clinton@sempron ~ $ ls -l /usr/lib/opengl/xorg-x11/lib
total 1140
-rw-r--r--  1 root root 613730 Jan 19 16:12 libGL.a
-rw-r--r--  1 root root    763 Jan 19 16:12 libGL.la
lrwxrwxrwx  1 root root     12 Jan 19 16:13 libGL.so -> libGL.so.1.2
lrwxrwxrwx  1 root root     12 Jan 19 16:13 libGL.so.1 -> libGL.so.1.2
-rwxr-xr-x  1 root root 540269 Jan 19 16:12 libGL.so.1.2
clinton@sempron ~ $ glxinfo | grep OpenGL
__driCreateNewScreen - succeeded
OpenGL vendor string: VIA Technology
OpenGL renderer string: Mesa DRI UniChrome (KM400) 20041215 x86/MMX+/3DNow!+/SSE
OpenGL version string: 1.2 Mesa 6.3
OpenGL extensions:
clinton@sempron ~ $

----------

other info:

clinton@sempron ~ $ cat /proc/acpi/thermal_zone/THRM/temperature
temperature:             56 C
clinton@sempron ~ $

My cpu temperature is 56 C, I\'m not sure if I should clock it up. 1.4GHz --> 1.8GHz it probably does not make much a difference percentage wise.
« Last Edit: February 06, 2006, 09:49:57 am by clinux_rulz »

Wired_Crawler

  • Hydlaa Citizen
  • *
  • Posts: 429
    • View Profile
(No subject)
« Reply #4 on: February 06, 2006, 11:27:05 am »
The message about \"Indirect rendering\" comes from CrystalSpace (plugins/video/canvas/openglx/glx2d.cpp, glXIsDirect() is called to check if direct rendering is enabled). You should check, which are the GL libraries CS is linked to. Find the file glx2d.so in $CRYSTAL directory and use command \"ldd glx2d.so\" to find out, to which library file it is linked. You can also try running other CS application (like walktest) - does it give the same message ?

Maybe this \"error\" message is unimportant ? Maybe Your acelerated driver just don\'t provide information, that it supports direct rendering ? Are You able to play PS ? Does it look like it is not using 3d aceleration ?
"Close the world, txEn eht nepO."

Xordan

  • Crystal Space Developer
  • Forum Addict
  • *
  • Posts: 3845
  • For God and the Empire
    • View Profile
(No subject)
« Reply #5 on: February 06, 2006, 04:53:21 pm »
The ebuilds are old and won\'t work. You should use the binaries or compile manually instead. ebuilds may be updated with next release.

clinux_rulz

  • Wayfarer
  • *
  • Posts: 9
    • View Profile
(No subject)
« Reply #6 on: February 08, 2006, 11:47:48 am »
Reply to Wired_Crawler:

Hi Wired_Crawler.

Sadly looks like glx2d.so is already using the correct libGL.so, which means that its posible that the latest VIA sources I downloaded from there offical web-site was not fully implemented.

clinton@sempron /opt/crystal/lib/crystalspace $ ldd glx2d.so
        linux-gate.so.1 =>  (0xffffe000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7eac000)
        libnsl.so.1 => /lib/libnsl.so.1 (0xb7e96000)
        libGL.so.1 => /usr/lib/opengl/via/lib/libGL.so.1 (0xb7e32000)
        libSM.so.6 => /usr/lib/libSM.so.6 (0xb7e29000)
        libICE.so.6 => /usr/lib/libICE.so.6 (0xb7e11000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0xb7d47000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0xb7d39000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb7ce6000)
        libm.so.6 => /lib/libm.so.6 (0xb7cc3000)
        libz.so.1 => /lib/libz.so.1 (0xb7cb3000)
        libstdc++.so.5 => /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/libstdc++.so.5 (0xb7bf9000)
        libgcc_s.so.1 => /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/libgcc_s.so.1 (0xb7bf1000)
        libc.so.6 => /lib/libc.so.6 (0xb7ada000)
        /lib/ld-linux.so.2 (0x80000000)
        libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0xb7ad4000)
clinton@sempron /opt/crystal/lib/crystalspace $

The games is very slow, and even on the 2d menu screen at the start, the mouse movement shows that the frame-rate must be less than 3.

I found that any temporature below 60 C is safe for my cpu, I clocked my cpu up to 1.83GHz (normal speed), and lowered the cpu voltage, to cut down on over heating.

I looked at some other dynamic libraries in the folder and gl3d.so was using the correct libGL.so too.

I will look for walktest and see what it says soon.

Replay to Xordan:

Hi Xordan,

I updated my ebuilds with \"emerge sync\", and my whole portage tree was updated to the lastest ebuild.

I updated the portage system from a Gentoo 2005r1 system, not the Gentoo 2006 although it shouldn\'t make a difference.

Are the lastest ebuilds too old?

If so, I guess I will download the latest source compile it.

But wait, I isn\'t it Crystal Space, not Plane Shift, that is having the problem. I only have 64 Kilo bits/sec (8 Kb/sec) of bandwidth avaliable to me at the moment (quota is eaten up), I don\'t want to download too much.

I do thing that anything that uses Crystal Space will not work on my machine at the moment, but I will test walktest to see if this is so.

------------

Anthor option I have is to modify glx2d.cpp that is in my ebuilds source repository, and compile it manually.

What I can do is replace the parts that use glXIsDirect() with either 1, or true, or TRUE. And once I recompile Crystal Space, it would believe I have direct rendering, and infact I actually do.

This may be the wrong way of doing it, and maybe I should change or add the function glXIsDirect to the source code for my libGL.so for via. Except I couldn\'t find the source for this, I could only find the source for my via drm drivers (which I compiled my self to get 3d acceleration working).

Anyway thanks for your replys. I will keep trying things untill I get it going. It maybe that I need a later version of Crystal Space.

clinux_rulz

  • Wayfarer
  • *
  • Posts: 9
    • View Profile
(No subject)
« Reply #7 on: February 08, 2006, 11:54:52 am »
BTW my Crystal Space version is 0.99_pre20050823 which is a snapshot for 23rd of August 2005 (23-08-2005), which I though was fairly recent. I could be wrong.

And also I have the same version of Crystal Space, Plane Shift, and Gentoo on my laptop, and on my laptop it works fine.

But on my desktop, is were it fails, and is what my other posts above this post refer to.

------

Other things too.

if I go:

# planeshift --video=software

I get silky smooth performance for the menu (not sure what the game would be like tho), although I still want the game to pick up on my direct rendering.

When I try to play the game it comes up with the message \"The server is not running or not reachable\", once I get DRI working in the game, I think I can solve this last problem on my own.
« Last Edit: February 08, 2006, 12:43:06 pm by clinux_rulz »

Wired_Crawler

  • Hydlaa Citizen
  • *
  • Posts: 429
    • View Profile
(No subject)
« Reply #8 on: February 08, 2006, 08:55:02 pm »
Your CS version is too old. I think \"current\" version of PS would not even compile with it. My advice - wait until You have full bandwidth back and build everything from sources. It is also possible, that new binary distribution will be released soon...
"Close the world, txEn eht nepO."

clinux_rulz

  • Wayfarer
  • *
  • Posts: 9
    • View Profile
(No subject)
« Reply #9 on: February 09, 2006, 09:53:29 am »
Hi Wired_Crawler,

I think I will take your advise, maybe my lastest ebuild (although source based) is too old compared to the lastest avaliable sources.

It will be another 6 days until I get my bandwidth back. I think its worth the wait.

When I tried CS\'s walktest, I got the same warning as plane shift gave which was kinda expected.

My ebuild version of Plane Shift did compile with my version of Crystal Space, so that means I must have an old source version of Plane Shift (note: that my ebuilds are source code based ones not binary ones and they compile for my machine).

My version of Plane Shift is crystal blue 0.3.011.

Ironically I choose Gentoo, because I thought it was the most up to date source distrobution. Too bad it wasn\'t update with this. But its true that Gentoo packages aren\'t well tested yet on all platforms. I rather like the structure of gentoo, and I hope this will change in the future.

clinux_rulz

  • Wayfarer
  • *
  • Posts: 9
    • View Profile
(No subject)
« Reply #10 on: February 21, 2006, 12:36:54 pm »
Hello all again,

Well I have downloaded and compiled the lastest Crystal Space. And I haven\'t yet downloaded and compiled the lastest PlaneShift, around 120mb is a little big of a download for me now.

Anyway I ran walktest and a new and familar problem arised. I\'ve seen this problem before and managed to work around it. I don\'t feel like solving it now, as I\'m about to go back to uni and there a bit of work ahead of me yet ...

Atleast I know its now using my accelerated opengl drivers even tho I now have a new problem to solve. The following demonstrates the new problem:

clinton@sempron ~ $ walktest
__driCreateNewScreen - succeeded
  WARNING! Crystal Space performs better in 24 or 32 bit display mode!
0000:   f210f110  00010000  000304e2  43ffffff
0010:   44000cff  10499d00  11000000  12230a20
0020:   15000000  23000000  24000000  34010020
            .                      .                      .
            .                      .                      .
0e80:   3dba2e8c  3f800000  ffffffff  3e480000
0e90:   3d980000  432c0000  00000000  3dba2e8c
0ea0:   3f800000  ffffffff  3e500000  3c0000ad
0eb0:   432c0000  4187fff0  3dba2e8c  3f800000
0ec0:   ffffffff  3e500000  3d980000  432a0000
0ed0:   4187fff0  3dba2e8c  3f800000  ffffffff
0ee0:   3e480000  3d980000  ee120f00  ee120f00
0ef0:   f210f110  00010000  cccccccc  cccccccc
******************************************
fire_buffer: DRM_VIA_PCICMD returned -22
Aborted
clinton@sempron ~ $

The \"__driCreateNewScreen - succeeded\" that I also see in glxinfo, tells me that 3d acceleration is working now. However there is still something not implemented quite right in my graphics drivers. I am using a ok, but not so greate on-board graphics card, and I am going to get a fully linux compatiable 3d graphics card. So I wander even if I really want this problem solved, since I will be using a different card soon.
I will have $1100 avaliable to spend on a graphics card, but I don\'t plan on spending more than $400, I think I can get something decent arround that $300 to $400 (Austrialian dollars).

Anyway thanks for all your help. You guys have sorta solved my problem, even tho another has arised.

Bye for now. :)
« Last Edit: February 21, 2006, 12:40:05 pm by clinux_rulz »

clinux_rulz

  • Wayfarer
  • *
  • Posts: 9
    • View Profile
(No subject)
« Reply #11 on: February 21, 2006, 12:52:10 pm »
PS. I googled \"fire_buffer: DRM_VIA_PCICMD returned\", and found out that I needed to install the lastest DRM from the cvs. Anyone with that same \"fire_buffer: DRM_VIA_PCICMD returned -22\" problem, just update your DRM.

Bye again. ;)

clinux_rulz

  • Wayfarer
  • *
  • Posts: 9
    • View Profile
(No subject)
« Reply #12 on: February 21, 2006, 06:25:16 pm »
Hey all, guess what ...

I migrated to Modular Xorg from Monolithic Xorg, and now Crystal Space & PlaneShift works with full 3d acceleration.

I guess the new Modular Xorg had the later DRM drivers to solve my new fire_buffer problem. Kick ass. :D

Thanks for all your help. ;)

Xordan

  • Crystal Space Developer
  • Forum Addict
  • *
  • Posts: 3845
  • For God and the Empire
    • View Profile
(No subject)
« Reply #13 on: February 21, 2006, 06:47:47 pm »
Nice :tup:

clinux_rulz

  • Wayfarer
  • *
  • Posts: 9
    • View Profile
planeshift thinks direct rendering is not enabled (solved)
« Reply #14 on: February 22, 2006, 06:26:07 am »
-------------------------------------------------
Ignore this post, its just here to change the subject title to have the word \" (solved) \" on the end, like in the Gentoo Forums.
-------------------------------------------------
hmm ... it didn\'t work, I guess I can\'t change the subject title. Ow well. :)
« Last Edit: February 22, 2006, 06:27:41 am by clinux_rulz »