PlaneShift

Support => Technical Help: Problems BEFORE entering the game => Topic started by: cdmoreland on April 16, 2012, 03:28:20 pm

Title: 0.5.9: Common problem on Intel Chips: How can I disable GLSL?
Post by: cdmoreland on April 16, 2012, 03:28:20 pm
How do I disable GLSL so that I can get my notebook back into the game?
Title: Re: How can I disable GLSL?
Post by: RlyDontKnow on April 17, 2012, 12:38:56 am
add "Video.OpenGL.UseExtension.GL_ARB_shader_objects = false" to the planeshift.cfg
Title: Re: How can I disable GLSL?
Post by: Timil Deeps on April 17, 2012, 06:49:52 am
I don't see a "Planeshift.cfg"... I do see a "psclient.cfg", and a "pslauncher.cfg". Does the line go in one of those?
Title: Re: How can I disable GLSL?
Post by: cdmoreland on April 17, 2012, 07:10:01 am
 \\o// It is working fine, now. Thanks a lot!  :thumbup:
Title: Re: How can I disable GLSL?
Post by: cdmoreland on April 17, 2012, 07:10:56 am
Timil, it's a hidden file.
Put it below the other Video. line.
Title: Re: How can I disable GLSL?
Post by: Timil Deeps on April 17, 2012, 07:14:22 am
Thanks cdmoreland. However, I have hidden files set to show on my comp. What folder is the file in?
Title: Re: How can I disable GLSL?
Post by: cdmoreland on April 17, 2012, 07:37:44 am
It's in .PlaneShift folder= notice the "." in front
Title: Re: How can I disable GLSL?
Post by: LigH on April 17, 2012, 08:33:21 am
More generally: Not in the game's installation directory, but in the user's application data (Linux: ~/.PlaneShift | Windows: %APPDATA%\PlaneShift).
Title: Re: 0.5.9: Common problem on Intel Chips: How can I disable GLSL?
Post by: helios21 on February 02, 2013, 03:45:56 pm
Hi!

I have some news regarding Linux intel graphics users. I am using PlaneShift with Intel i5 Core Sandybridge on an ThinkPad T520. With Mesa 8.0.5 I had to disable GLSL like described here. Gfx was fluent except for spell effects which let the machine crawl down to less than one fps. This was very annoying since it disturbed role play events where other players casted spells quite a lot.

I thus reported this with Intel gfx developers:

Bug 59086 - Slow spell effects with Planeshift on Intel Sandybridge HD 3000 graphics
https://bugs.freedesktop.org/59086 (https://bugs.freedesktop.org/59086)

Kenneth Graunke fixed this already. The Intel driver was falling back to software rendering due to missing Y-tiled blits in CopyTexSubImage function that Planeshift/CS3D uses for spell effects. Result: Spell effects are fluent now. Even with four effects at the same time. At 1680x1050 (and I except the same for Full HD)!

In order to test the fix I installed Mesa 9 and with that Planeshift did not start with GLSL disabled anymore. Thus I removed the option

Code: [Select]
Video.OpenGL.UseExtension.GL_ARB_shader_objects = false
from my PlaneShift configuration file. And the game works just marvellously with GLSL enabled.

As a regression I had a gfx glitch I reported as well and Kenneth fixed already:

Bug 60172 - Planeshift: triangles where grass would be
https://bugs.freedesktop.org/60172 (https://bugs.freedesktop.org/60172)

Another gfx glitch that has been there since I started playing the game may be an CS3D issue:

Bug 60185 - Planeshift: Another gfx glitch with some black area around plants
https://bugs.freedesktop.org/60185 (https://bugs.freedesktop.org/60185)

but Kenneth wants to look into that as well.

It will take some time till the fixes will trickle to the distributions. I am currently playing Planeshift on Debian GNU/Linux Sid with Linux 3.8-rc6 and a self compiled Mesa 9.2 devel from freedesktop.org git master branch + the patches that fix the issues mentioned above. In case there is someone who wants to use these improvements and is not scared by having to compile stuff oneself, I can try to provide some instructions. (I think such a recent kernel is not needed for that.) Please tell me if you want that.

Thanks,
Title: Re: 0.5.9: Common problem on Intel Chips: How can I disable GLSL?
Post by: LigH on February 02, 2013, 05:38:21 pm
\\o// All hail Kayden! :flowers:
Title: Re: 0.5.9: Common problem on Intel Chips: How can I disable GLSL?
Post by: helios21 on March 17, 2013, 01:19:46 pm
The fixes I talked about made it upstream. Spell effects work nicely. Everything else is fluent, except for houses with lots of stuff in it, like our guild house, and if spell effect like flame spire is zoomed it quite closely.

I started to experiment with the settings a bit, and reducing texture quality from "Highest" to "High" and especially reducing shaders from "Highest" to "Medium" seemed to have helped with speed a lot.

Currently testing with almost full HD resolution on Debian Sid with mesa from git.

Thanks,
helios21
Title: Re: 0.5.9: Common problem on Intel Chips: How can I disable GLSL?
Post by: Rigwyn on March 18, 2013, 05:13:40 am
Thanks Helios!

I ran into the same problem on a similar machine - Ivy bridge Core I5-3330 -w Intel HD Graphics. I'm running Ubuntu 12.04 LTS 64bit.

Solution for adding Mesa 9.0.3 to Ubuntu 12.04 is below:

Assuming system is already up to date, add the ppa for Intel drivers to your repository:

user@derp:~$ sudo apt-add-repository ppa:glasen/intel-driver
[sudo] password for user:
You are about to add the following PPA to your system:
 Updated versions of Intel graphics driver.

For Ubuntu 10.04, 10.10 and 11.04 driver version 2.15 will be installed. If you're using Ubuntu 11.10 aka Oneiric Ocelot, driver-version 2.17 will be installed. For Ubuntu 12.04 version 2.20 will be installed. This version allows runtime-switching of the accel method via xorg.conf (UXA or SNA). As standard the old "UXA" acceleration is used. To use "SNA" you have to create a xorg.conf-file with the following content:

Section "Device"
   Identifier   "Card0"
   Driver   "intel"
   Option   "AccelMethod" "sna"
EndSection

Warning :

All versions since 2.15 of the Intel-driver only support KMS. If you've deactivated KMS e.g. by adding the option "i915.modeset=0" to the file "/etc/default/grub", please reactivate KMS by deleting this option.
 More info: https://launchpad.net/~glasen/+archive/intel-driver
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmp6FqVuW/secring.gpg' created
gpg: keyring `/tmp/tmp6FqVuW/pubring.gpg' created
gpg: requesting key XXXXXXXX from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp6FqVuW/trustdb.gpg: trustdb created
gpg: key XXXXXXXX: public key "Launchpad PPA for Stefan Glasenhardt" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
user@derp:~$



Next, open Synaptic package manager and click the reload button. ( or take similar steps with other software installer app )

Next type in "mesa" in the quick filter and sort by version. Upgrade the packages below to version 9.0.3 or above and click Apply. ( I had 9.0.2 )

    libgl1-mesa-dri-lts-quantal
    libgl1-mesa-glx-lts-quantal
    libglapi-mesa-lts-quantal

That's it.
Title: Re: 0.5.9: Common problem on Intel Chips: How can I disable GLSL?
Post by: helios21 on March 23, 2013, 08:46:01 am
Rigwyn, thanks for letting everyone know. My offer still stands if someone wants to get mesa from git to explain how I did it and how I got Planeshift to use it while the rest of the system is using pre-packaged mesa. But I think for all Ubuntu users your solution is easier :). And well, after Debian Wheezy is released, following the Testing suite might give that updates pretty soon.
Title: Re: 0.5.9: Common problem on Intel Chips: How can I disable GLSL?
Post by: Rigwyn on March 23, 2013, 06:14:06 pm
I'm all ears. With Mesa 9.0.3 spell effects still reduce frame rate dramatically as you pointed out and last I checked, a 9.1 or 9.2 ppa was not available for ubuntu ( aside from an experimental ppa which I was nervous about trying. )
Title: Re: 0.5.9: Common problem on Intel Chips: How can I disable GLSL?
Post by: helios21 on March 24, 2013, 05:05:07 am
Well basically I followed Preparing mesa sources in http://pkg-xorg.alioth.debian.org/howto/build-mesa.html (http://pkg-xorg.alioth.debian.org/howto/build-mesa.html):

Code: [Select]
martin@merkaba:~/Spielen/Planeshift/spell-effects-slow/mesa.git> ./configure --prefix=/usr \                       
              --enable-driglx-direct \
              --enable-gles1 \
              --enable-gles2 \
              --enable-glx-tls \
              --with-dri-driverdir=/usr/lib/dri \
              --with-egl-platforms='drm x11' \
              --with-dri-drivers=i965 \
              --disable-gallium-llvm \
              --with-gallium-drivers=""


Code: [Select]
martin@merkaba:/opt/PlaneShift> cat pslaunch
#!/bin/bash

cd $(dirname $0)
# http://x.debian.net/howto/build-mesa.html
export LIBGL_DRIVERS_PATH=/home/martin/Spielen/Planeshift/spell-effects-slow/mesa.git/lib/
export LD_LIBRARY_PATH=/home/martin/Spielen/Planeshift/spell-effects-slow/mesa.git/lib/:libs/:$LD_LIBRARY_PATH
export EGL_DRIVERS_PATH==/home/martin/Spielen/Planeshift/spell-effects-slow/mesa.git/lib/
exec ./pslaunch.bin $@

Basically you need to adapt the path to what you chose to build Mesa in. Just add the "lib/" directory to that path. You can also first try it out without changing the start script, by just setting these environment variables in a shell and then start planeshift, but I think there may have been an issue with it, cause I AFAIR one of those variables is being set by the original pslaunch script already. Cannot check right now, cause I seem to have no original copy in there anymore. In any case, I suggest you to cp -p pslaunch pslaunsch-safe-original or so before editing the script.

This change to the script has survived the last updates. Does not seem to be touched often by PlaneShift developers, likely no reason to.

Well then start Planeshift as usual. If all went well, spell effects will be a *complete* difference for you :).

I´d suggest a more generic location for mesa.git directory inside your home directory. Cause you can use this not only for Planeshift. You can try other games with it as well.

In case you want to update your mesa against latest stuff, you can also use git pull together with the autoreconf, ./configure and make steps again.

In case of latest mesa you can also list all branches with git branch -a and then select one by doing

Code: [Select]
git checkout -b localbranchaneme origin/remotebranchname
I always used latest mesa and it worked, but there may be times where latest mesa git is broken.

In case of problems, just ask. The good thing with this approach is: You do not break your desktop in case anything goes wrong, cause you don´t replace mesa globally. Also building own mesa packages takes more time. I tried it initially and yes, I had issues some issues with my KDE compositing desktop using my own packages (for whatever reasons).

I go with this approach since I mentioned it here and it just works nicely :)

Ciao,
Title: Re: 0.5.9: Common problem on Intel Chips: How can I disable GLSL?
Post by: helios21 on May 11, 2013, 01:27:47 pm
Hi!

Anyone using Intel mesa drivers on Linux, I recommend to upgrade to Mesa 9.1.2. I just compiled mesa 9.1 branch (git commit 1e043ebe034b6e33b4c5228770db397b22fd26e0) from source, and wow is this a difference!

I always had the feeling that the colors were to dark. Especially in houses, were sometimes even items were almost not distinguishable like a carpet on the ground, almost complete black. Well scratch that: Its vibrant colors now :).
Title: Re: 0.5.9: Common problem on Intel Chips: How can I disable GLSL?
Post by: helios21 on May 11, 2013, 01:59:28 pm
Well, faced some four GPU hangs in about on hour of playing. So there might be some stability issues with that version.
Title: Re: 0.5.9: Common problem on Intel Chips: How can I disable GLSL?
Post by: LongArmLugh on November 30, 2013, 05:17:09 pm
Which one is "the other video. line."? There are lots of video lines in the readme. I don't know where to put the code.