Linux FAQ for Frozenbyte games

New version (v4) for Trine
Change log includes:
- Installer now creates all the necessary folders (so /home/user/my/own/dir/Trine will work ok)
- No longer crashes on videos if sounds are disabled
- Graphics rendering is now sharper (no blurriness)
- Game should be able to create all the necessary files and folders under the profile. The save game issues should be gone.
- Fixes a sound-related crash bug
- Better log output; if shaders encounter errors, more info is provided in the log file
- Intel graphics solutions will get an error message instead of crash (the games won't run on Intel graphics, sorry!)
- Checks for S3TC support and if not found, gives an error message (still the same incorrectly named "Shader Model 3.0 required" error), and outputs proper info in the log file
- libxml and libasound libraries have been removed from the package and should now be found from the system libraries instead (the installer does not remove previous version's files though so double-check that if you continue to have issues with these)
- Tweaks the Cg shaders a bit

New version should be able to install on top of the old one (with the above caveat about the libraries).
Ubuntu 11.10 installer issue
The new Ubuntu 11.10 Oneiric Ocelot causes a few issues with the games, but these can be solved.

In Oneiric Ocelot, the ia32-libs have been replaced by the multiarch repositories. This makes the installer fail with the following output (example):
./shadowgroundsUpdate1.run: error while loading shared libraries: libglade-2.0.so.0: wrong ELF class: ELFCLASS64
For the fix:
1. Download the 32bit Glade library from http://packages.ubuntu.com/oneiric/i386/libglade2-0/download
2. Open it with archive manager, extract the file usr/lib/libglade-2.0.so.0.0.7
3. Put it in Shadowgrounds' lib32 folder.
4. Rename it to libglade-2.0.so.0
Check this forum thread for more info (thanks to everybody who helped!).
Ubuntu 11.10 signal 11 issue
If the Launcher works fine but the game doesn't start, and you get this error:
Got signal 11 at 0x1 from 0xb77eeb97
Then the most likely solution is to delete (or rename) the "libasound.so.2" file in the libd32 folder. Thanks Micha!
Linux system requirements
Check out the Linux system requirements here. Please note that there are several issues with graphics drivers and libraries, and it's hard to give a 100% guarantee of your system being able to run the games - however, if you encounter problems, please go to the forums and you will most likely get some help.
Question not listed here? Go to the forums!
If you have a problem that's not listed here, or doesn't get solved with these suggestions, please go to the Frozenbyte Community and post there. Please include as much info about your system as you can (mainly the graphics card and distribution version).
For Ubuntu installer troubles:

1. Download an installer
2. Give the installer permissions (right-click, Permissions - and check "Allow executing file as program")
3. Double-click the installer, it should show the game and have an Install button
4. Install the game and then run it
NVIDIA graphics cards:

If the game doesn't run, here's the usual fix for NVIDIA cards (we'll update this as we go, please bear with us):
- Install new graphics drivers (the Software Center in Ubuntu is good to find the drivers)
- Reboot the computer
- After reboot, if you have an NVIDIA card and installed the X.org drivers,
 run "nvidia-xconfig" in the terminal (or "sudo nvidia-xconfig")
- Reboot again if needed

Arch Linux 64-bit problem
If you experience this problem:
./trine-launcher64: error while loading shared libraries: libx86.so.1:
cannot open shared object file: No such file or directory

Then the fix is to "install the package 'libx86' and 'libx86emu' from the Arch Linux repositories
so that x86 emulation can properly occur for any needed libraries.

Thanks Clayton for the fix! (Possibly works for other Linux distributions too.)
Installer issues (permissions)

If you get an error like this (for example running openSuse 11.4 or any other distro):
Trine.64.run: Trine.64.run: cannot run abinary file
The solution is:
chmod +x Trine.64.run
./Trine.64.run
Linux mouse issues (sensitivity/jumping)

There's a command/option called "mouse_sensitivity" in the game. This can be accessed through the game console by pressing F8 and writing "/mouse_sensitivity 1.0000" (without the quotes). This can help a bit with sensitivity issues - note that you may need to restart the game for the change to take effect.
Also, if your mouse keeps jumping to the center of the screen, you may be running a program such as "unclutter" (see bug thread here).
The solution is to run this in the terminal before launching the games:
export SDL_MOUSE_RELATIVE=0
Or:
killall unclutter
Thanks Mike!
Linux mouse cursor not clicking/displayed

It's possible sometimes that the mouse cursor disappears (for example during the loading screen when the Start button appears). If grabbing the mouse with Ctrl+G doesn't work, then one thing to try is to delete the ~/.frozenbyte/trine/ directory and then starting the game from launcher. If you are using a 64-bit distribution you could try manually starting the 32-bit game binary (trine-bin32).

Shadowgrounds save games
Linux savegames can now be found here (user-created, thanks Vincent!). More help with savegames in this forum thread.
Installing the "Linux way"
You should be able to extract the files with Unzip, e.g. "unzip Trine.64.run".
Installing the game for all users on the system
By default, Trine is installed for the current user. If you would wish to install the game for all users, you can check out this thread for more information (essentially just copy the game files from the install dir and give them the permissions you want).
Open source drivers

Trine and the Shadowgrounds games may not work with open source drivers because the games need S3TC support and this can cause trouble.
The same goes for the Mesa drivers. There is ongoing development in these areas and it is likely that the games will eventually run, but this cannot be guaranteed at this point.
Sorry!
Crash if surround sound is enabled

If your system is good and you use a surround sound setup, the game may crash very early in the flower loading screen (due to the setting "format = AL_FORMAT_51CHN32" in /etc/openal/alsoft.conf).

One potential fix is to rename/delete libopenal.so.1 file from the game's lib32/lib64 folder. This should make the game use the system-provided file instead.

Fatal error: Renderer initialization failure

If you get an error like:

Fatal error: Renderer initialization failure.
See the log for details.

And the log outputs things such as:

ERROR: OpenGL 2.0 required
ERROR: ARB_framebuffer_object required
ERROR: Your graphics card cannot run this game. You can try updating your drivers.

and if your system has a good graphics card, then the issue could be related to various libraries. Trine ships with GLEW 1.5.4 and anything under 1.5.1 will most likely cause trouble.
Additionally, libstdc++.so.6 may be the culprit. Removing that from the game's libraries should do the trick (see this thread).

ZLIB error

If you get an error like this:

./trine-launcher32: ./lib32/libz.so.1: version `ZLIB_1.2.3.3' not found (required by /usr/lib/libxml2.so.2)

The solution is most likely to remove the libz.so.1 file from lib32 directory under the game. After that you may also need to remove /.frozenbyte/trine and launch the game from trine-launcher so that the correct files and permissions are created.

Error during install

If you get an error like this:

Exception caught: failed to open file ./Trine-1.64.run: Failed to fstat zip-file %s

Then the installer files have probably got corrupted at some point - try to download the game again.

Running the Shadowgrounds games in 64-bit Linux

If you get an error with Shadowgrounds/Shadowgrounds Survivor, such as:
./ShadowgroundsBeta12.run: No such file or directory
It could be many things, but one user had his problems solved by installing
the package "ia32-libs". It allows the execution of 32-bit programs on a 64-bit architecture.
Thanks to Greg for pointing this out!
PhysX

It seems the binary for Trine uses RPATH in order to load shared libs from ./lib32/ one of which is libPhysXloader.so.1 Then in turn libPhysXloader.so calls dlopen() to open other PhysX libs that are included in the lib32 folder like libNxCooking.so.
The problem is that libPhysXloader.so.1 does not call dlopen with just "libNxCooking.so", it puts the whole "/usr/lib/PhysX/v2.3.8/libNxCooking.so" meaning that the files in lib32 (or lib64) aren't used, and the game will exit complaining that it can't create a PhysX SDK.
I have worked around this issue by copying the PhysX related libs from ./lib32 into /usr/lib/PhysX/v2.8.3.
Thanks Alex!
Sound problems
If you experience this problem (possibly on at least Fedora 14 x86_64):
[x]$ ./trine-launcher
ALSA lib pcm.c:2104snd_pcm_open_conf) Cannot open shared library /usr/lib/alsa-lib/libasound_module_pcm_pulse.so
ALSA lib pcm.c:2104snd_pcm_open_conf) Cannot open shared library /usr/lib/alsa-lib/libasound_module_pcm_pulse.so
ALSA lib pcm.c:2104snd_pcm_open_conf) Cannot open shared library /usr/lib/alsa-lib/libasound_module_pcm_pulse.so
AL lib: alsa.c:344: Could not open playback device 'default': No such file or directory
AL lib: oss.c:179: Could not open /dev/dsp: No such file or directory
Then the fix is to
Copy /lib64/libasound.so.2 to your trine/lib64/ install.

Thanks GTCoupe for the fix! (Possibly works for other Linux distributions too if they encounter this issue.)

Alternatively, you may get this error:
$ ./trine-launcher64
ALSA lib dlmisc.c:236:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/alsa-lib/libasound_module_pcm_pulse.so
Got signal 11 at 0xbac6 from 0xbac6
The fix may be to delete or rename the lib32/libvorbis.so.0 and lib64/libvorbis.so.0 files in the Trine folder.
Signal 11 error
If you get an error like this:
~/Programs/trine$ ./trine-bin64
Got signal 11 at (nil) from (nil)
./trine-bin64[0x433c98]
/lib/libc.so.6(+0x33c20)[0x7fc99aa99c20]
Aborted
Or like this:
~/trine$ ./trine-launcher
./trine-launcher32: ./lib32/libxml2.so.2: no version information available (required by /usr/lib/libglade-2.0.so.0)
Got signal 11 at (nil) from (nil)
./trine-bin32[0x8078188]
[0x594410]
Aborted
Suggested solutions:
padsp ./trine-launcher
- Enable sounds or disable video

This problem can also occur if you have an Intel graphics card/chipset, which may not be enough to run the game(s), or an ATi/AMD or NVIDIA graphics card that doesn't support the required features.

It's also possible that your system has some conflicts in general - a reinstall might help (such was the case in this thread)

The games do not run on mesa drivers older than 7.11 (which has not yet been released officially at the time of this writing).

Game fails to start

If you get an error like this:

WARNING: Unable to set to given video mode 800x600x0 (windowed), trying to set closest.
ERROR: Unable to set video mode 800x600x32 (windowed).
ERROR: Failed to initialize renderer
ERROR: Unable to set fullscreen mode

It's likely that this is caused by messed up antialiasing settings. Launch the Trine Launcher and look at the antialiasing setting, and make sure it's either Disabled or 2x/4x/8x (sometimes it can be empty, which can cause this issue).

Is the native version faster than running the games through Wine?
The native versions should run a lot better than using Wine - one user reported that the native Trine ran at 66 frames per second and 38 frames on Wine. (The game has a max fps cap of 66, so it might've hit that too). Any more information is welcome, so please get in touch.
How's the general performance of Trine?
Trine is a bit more demanding than the Shadowgrounds games. Trine is also rather GPU-intensive so the CPU doesn't matter as much. It is advised to update your graphics card drivers (for example some older NVIDIA drivers may not perform too well). You can enable the framerate meter by opening the game console (with the F8 key) and writing:
/show_fps 1

A related command:

/render_max_fps 0

Here's a few user stories about how the game runs:

I realized my GeForce 210 can't really hold this game with full screen mode and on the native resolution of 1680x1050. I get around 11 FPS avg. (Note: 1280x720 resolution helps a lot here - see thread.)
I have a 9600 GT. The game runs fairly well (over 30 FPS) with 1920x1080 resolution and VSync enabled. Everything is turned on/set to very high except for Anti-aliasing and Anisotropic filtering. Only some very limited slowdowns are present. I use the proprietary nVidia driver.
I'm experiencing great performance on Linux, settings max, 1440x900 and getting 66 FPS average (note: 66 is max by default) in linux. NVIDIA 260 GTX.
Gnome performance issues

While this hasn't been proven with the SG games or Trine, sometimes it's possible for the system to idle the CPU a bit too much.

To fix this, install a CPU frequency scaler applet to the Gnome panel and set the mode to "Performance" before launching the games. "On demand" setting may cause the frequency to jump up and down, causing issues with some games.

Fullscreen / Windowed, and grabbing the mouse cursor
You can't minimize the games or tab out (sorry!), however you can use Alt+Enter to toggle between Fullscreen/Windowed mode, and you can use Ctrl+G to grab or release the mouse cursor.
Libraries to remove if the games don't launch
If the games don't run, you can try removing the following libraries (this may be the case for e.g. Fedora 16). Please note that all games also require the PhysX libraries (i.e. libNxCooking.so, libNxCharacter.so in the lib32 directory) - if the PhysX libraries are missing the game may start but you may experience odd physics-based behavior.

Libraries:

Trine
libvorbis.so.0
libstdc++.so.6
libGLEW.so.1
libm.so.6
libz.so.1
Shadowgrounds
libvorbis.so.0
libstdc++.so.6
libGLEW.so.1
libm.so.6
libz.so.1l
ibxml2.so.2
Shadowgrounds Survivor
libvorbis.so.0
libstdc++.so.6
libGLEW.so.1
libm.so.6
libz.so.1l
ibxml2.so.2
The games don't work on Fedora 16
Some Fedora 16 users have reported issues installing/running the games. The Mumble RPMs will help with these so check it out.
libglade problem (GtkVBox)
If you get an error like this:
/Trine.32.run
(Trine.32.run:14198): libglade-WARNING **: unknown property `orientation' for class `GtkVBox'
...
(Trine.32.run:14198): libglade-WARNING **: unknown property `create_folders' for class `GtkFileChooserDialog'
./Trine.32.run: symbol lookup error: ./Trine.32.run: undefined symbol: gdk_pixbuf_new_from_stream
This probably happens because you have an old distribution, and an old version of GTK. Unfortunately the installer requires something (the new_from_stream error) which is not in the old version of GTK. You can either update to a newer distribution or try this manual install procedure:
mkdir ~/trine (to create a directory where you want to install. Default is ~/trine
cd ~/trine
unzip /path/to/Trine.64.run (unzip the installer)
Give executable permissions:
chmod +x trine-bin trine-bin32 trine-bin64 trine-launcher trine-launcher32 trine-launcher64 createShortcuts.sh removeShortcuts.sh
./createShortcuts.sh menu desktop (Create menu and desktop shortcuts)
./trine-launcher (Start the game with the launcher)
What binary file should I launch?
Here's a great explanation by allquixotic from our forums:

Trine ships as a dual 32-bit / 64-bit distribution. Here's the breakdown of the executable files once you unpack:

./trine-launcher is a script that first auto-detects your distro's architecture (32-bit or 64-bit), and then calls either ./trine-launcher32 or ./trine-launcher64 depending on the result. Basically, it will adapt to whichever architecture (out of x86 or amd64) you're using. When you click "OK" in the launcher to start the game, the launcher calls ./trine-bin below -- see below for a description.

./trine-bin a script that first auto-detects your distro's architecture, and then calls either ./trine-bin32 or ./trine-bin64. trine-bin32 and trine-bin64 are the game executables themselves.

Basically, unless something is very wrong with your distro, it is impossible to inadvertently run the 32-bit version on a 64-bit distro, or vice versa, as long as you use trine-launcher or trine-bin, and let the autodetection do its magic.

But if you think the autodetection is wrong, then just run the appropriate file ending in "32" or "64" depending on which architecture your distro is.

To see your architecture, run this in a terminal:

uname -a
and see if it mentions "x86_64" or "i386" or "i686". If it says "x86_64", it's 64-bit; anything else and it's 32-bit.

How to uninstall the Linux versions?

If you wish to uninstall the Linux versions, it's relatively simple. For a terminal-way of this:

- go into the Trine folder, e.g.: cd ~/games/trine/
- remove shortcuts: sh removeShortcuts.sh
- remove the game-folder: rm -rf ~/games/trine/
- remove profile and stuff: rm -rf ~/.frozenbyte/trine