Jump to content

Welcome to Obsidian Forum Community
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Photo

[Linux] Unable to start game, hangs on black screen

Linux

Best Answer thana54 , 09 May 2018 - 07:35 AM

working for me with that command:

cd "/media/stockage_hellblazer/SteamLibrary/steamapps/common/Pillars of Eternity II"

MESA_GL_VERSION_OVERRIDE=4.5 MESA_GLSL_VERSION_OVERRIDE=450 LD_PRELOAD=PillarsOfEternityII_Data/Plugins/x86_64/libSDL2-2.0.so DRI_PRIME=1 ./PillarsOfEternityII
 

Go to the full post »


  • Please log in to reply
18 replies to this topic

#1
kujeger

kujeger

    (2) Evoker

  • Members
  • 68 posts
  • Pillars of Eternity Silver Backer
  • Kickstarter Backer
  • Deadfire Silver Backer
  • Fig Backer
I reported this back in the BB as well, but figure it's OK to repost it here, along with a workaround.

Essentially, if your OS version of libSDL2 does not match the one needed by the game, the libAkSoundEngine.so library freezes
and the game gets stuck at a black screen with 100% cpu use.

A workaround is to add this line under Launch Options in steam:
 
LD_PRELOAD=$LD_PRELOAD:./PillarsOfEternityII_Data/Plugins/x86_64/libSDL2-2.0.so %COMMAND%
(Original thread: https://forums.obsid...n-black-screen/ )

edit: soulsource has another, neater workaround:

There's also another workaround: Instead of using LD_PRELOAD to force loading the libsdl2 version that's bundled along with the game, one can use a nifty feature of libsdl2, which gets explained here: https://plus.google....sts/TB8UfnDYu4U

Basically this feature allow to use the system installed libsdl2 version even if an application is statically linked against libsdl2 (the Unity player is statically linked against it...).

So, what I am doing in order to get the game running is to set the following environment variable (of course with the correct path to your system installed libsdl2):

SDL_DYNAMIC_API=/usr/lib64/libSDL2.so
My command line on Steam now looks like this:
SDL_DYNAMIC_API=/usr/lib64/libSDL2.so LC_ALL=C %command%
Edit:
Of course you can also use the same environment variable to use Steam's libsdl2, if you prefer. Just point it to
SDL_DYNAMIC_API=~/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0


Edited by kujeger, 08 May 2018 - 01:00 PM.

  • Finstairn, tinysalamander, lew21 and 1 other like this

#2
the193rd

the193rd

    (0) Nub

  • Members
  • 3 posts
  • Pillars of Eternity Backer
  • Kickstarter Backer
  • Deadfire Backer
  • Fig Backer

Thanks for the workaround, it works!



#3
Finstairn

Finstairn

    (0) Nub

  • Initiates
  • 4 posts
  • Pillars of Eternity Backer
  • Kickstarter Backer
  • Deadfire Backer
  • Fig Backer

I also had this issue until using your workaround even if the "symptom" was not the same. Now... it seems to work... but not without crashing my desktop manager (KDE).

Hm... A bit annoying. I hope it will be fixed. :)



#4
Cdiaz

Cdiaz

    Community Support Specialist

  • Developers
  • 1854 posts

Hey kujeger!

 

Thanks a ton for this info! Ill be sure to pass it along to technical support so we can get this more visible to users as well. 

 

You the best,

 

-Caleb



#5
PangaeaACDC

PangaeaACDC

    (4) Theurgist

  • Members
  • 361 posts
  • Steam:Kill it with fire!
  • Deadfire Backer

An hour left to download so don't know if this problem pops up for me, but do you know if this is a Steam-only solution and what it might be for the GOG release?

 

This is what the start.sh file looks like for the FIRST Pillars game on my end.

#!/bin/bash
# GOG.com (www.gog.com)
# Pillars of Eternity

# Initialization
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "${CURRENT_DIR}"
source support/gog_com.shlib

# Game info
GAME_NAME="$(get_gameinfo 1)"
VERSION="$(get_gameinfo 2)"
VERSION_DEV="$(get_gameinfo 3)"

# Actions
run_game() {
	echo "Running ${GAME_NAME}"
	local bin32_name="PillarsOfEternity"
	local bin64_name="PillarsOfEternity"
	local bin_path32="$CURRENT_DIR/game/"
	local bin_path64="$CURRENT_DIR/game/"
	local lib_path32="$CURRENT_DIR/game"
	local lib_path64="$CURRENT_DIR/game"
	execute_game "${bin32_name}" "${bin64_name}" "${bin_path32}" "${bin_path64}" "${lib_path32}" "${lib_path64}"
		
}

default() {
  run_game
}

# Options
define_option "-s" "--start" "start ${GAME_NAME} [default]" "run_game" "$@"

# Defaults
standard_options "$@"


#6
kujeger

kujeger

    (2) Evoker

  • Members
  • 68 posts
  • Pillars of Eternity Silver Backer
  • Kickstarter Backer
  • Deadfire Silver Backer
  • Fig Backer

An hour left to download so don't know if this problem pops up for me, but do you know if this is a Steam-only solution and what it might be for the GOG release?
 
This is what the start.sh file looks like for the FIRST Pillars game on my end.

#!/bin/bash
# GOG.com (www.gog.com)
# Pillars of Eternity

# Initialization
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "${CURRENT_DIR}"
source support/gog_com.shlib

# Game info
GAME_NAME="$(get_gameinfo 1)"
VERSION="$(get_gameinfo 2)"
VERSION_DEV="$(get_gameinfo 3)"

# Actions
run_game() {
	echo "Running ${GAME_NAME}"
	local bin32_name="PillarsOfEternity"
	local bin64_name="PillarsOfEternity"
	local bin_path32="$CURRENT_DIR/game/"
	local bin_path64="$CURRENT_DIR/game/"
	local lib_path32="$CURRENT_DIR/game"
	local lib_path64="$CURRENT_DIR/game"
	execute_game "${bin32_name}" "${bin64_name}" "${bin_path32}" "${bin_path64}" "${lib_path32}" "${lib_path64}"
		
}

default() {
  run_game
}

# Options
define_option "-s" "--start" "start ${GAME_NAME} [default]" "run_game" "$@"

# Defaults
standard_options "$@"

That depends on GOG's packaging for the game, but if there's similar problem you could possibly add something like this to the top of the script:
export LD_PRELOAD=$LD_PRELOAD:./PillarsOfEternityII_Data/Plugins/x86_64/libSDL2-2.0.so
(you'd have to make sure the path to libSDL2-2.0.so matches)
  • PangaeaACDC, karora and Cdiaz like this

#7
soulsource

soulsource

    Crystalmancer of the Obsidian Order

  • Members
  • 19 posts
  • Xbox Gamertag:soulsource
  • Pillars of Eternity Silver Backer
  • Kickstarter Backer

There's also another workaround: Instead of using LD_PRELOAD to force loading the libsdl2 version that's bundled along with the game, one can use a nifty feature of libsdl2, which gets explained here: https://plus.google....sts/TB8UfnDYu4U

 

Basically this feature allow to use the system installed libsdl2 version even if an application is statically linked against libsdl2 (the Unity player is statically linked against it...).

 

So, what I am doing in order to get the game running is to set the following environment variable (of course with the correct path to your system installed libsdl2):

SDL_DYNAMIC_API=/usr/lib64/libSDL2.so

My command line on Steam now looks like this:

SDL_DYNAMIC_API=/usr/lib64/libSDL2.so LC_ALL=C %command%

Edit:

Of course you can also use the same environment variable to use Steam's libsdl2, if you prefer. Just point it to

SDL_DYNAMIC_API=~/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0

Edited by soulsource, 08 May 2018 - 12:18 PM.

  • Darren Monahan, vv221 and shmerl like this

#8
kujeger

kujeger

    (2) Evoker

  • Members
  • 68 posts
  • Pillars of Eternity Silver Backer
  • Kickstarter Backer
  • Deadfire Silver Backer
  • Fig Backer

There's also another workaround: Instead of using LD_PRELOAD to force loading the libsdl2 version that's bundled along with the game, one can use a nifty feature of libsdl2, which gets explained here: https://plus.google....sts/TB8UfnDYu4U
 
Basically this feature allow to use the system installed libsdl2 version even if an application is statically linked against libsdl2 (the Unity player is statically linked against it...).
 
So, what I am doing in order to get the game running is to set the following environment variable (of course with the correct path to your system installed libsdl2):

SDL_DYNAMIC_API=/usr/lib64/libSDL2.so
My command line on Steam now looks like this:
SDL_DYNAMIC_API=/usr/lib64/libSDL2.so LC_ALL=C %command%
Edit:
Of course you can also use the same environment variable to use Steam's libsdl2, if you prefer. Just point it to
SDL_DYNAMIC_API=~/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0

Ah, I'd totally forgotten about that feature. I'll update my post, it's a much nicer workaround.

#9
shmerl

shmerl

    (3) Conjurer

  • Members
  • 113 posts
  • Deadfire Backer
  • Fig Backer

Thanks for the workaround! Why is the game statically linking SDL in the binary??



#10
Jamila

Jamila

    (1) Prestidigitator

  • Members
  • 37 posts

In my case, I had to launch the game like this:

MESA_GL_VERSION_OVERRIDE=4.5 MESA_GLSL_VERSION_OVERRIDE=450 LD_PRELOAD=./game/PillarsOfEternityII_Data/Plugins/x86_64/libSDL2-2.0.so DRI_PRIME=1 ./game/PillarsOfEternityII

To get over the game using OpenGL 3.0 but demanding 3.2 or higher and using system libSDL2. Moreover I had to compile wayland and wayland-egl, because libSDL2 supplied with the game is linked againts these libraries. This was rahther unexpected, as I do not use Wayland.



#11
soulsource

soulsource

    Crystalmancer of the Obsidian Order

  • Members
  • 19 posts
  • Xbox Gamertag:soulsource
  • Pillars of Eternity Silver Backer
  • Kickstarter Backer

Thanks for the workaround! Why is the game statically linking SDL in the binary??

It's not the game itself, it's the Unity player. The game code actually tries to dynamically load libsdl2 (what afaik is the only option to use native libraries in C#), what fails if the libsdl version it tries to load differs from the one Unity is statically linked against.

Still, I'd also like to know the reasoning behind Unity being linked statically. The libsdl2 ABI is supposed not to change, so there should be no reason to ever statically link against it...


  • elguavas likes this

#12
soulsource

soulsource

    Crystalmancer of the Obsidian Order

  • Members
  • 19 posts
  • Xbox Gamertag:soulsource
  • Pillars of Eternity Silver Backer
  • Kickstarter Backer

In my case, I had to launch the game like this:

MESA_GL_VERSION_OVERRIDE=4.5 MESA_GLSL_VERSION_OVERRIDE=450 LD_PRELOAD=./game/PillarsOfEternityII_Data/Plugins/x86_64/libSDL2-2.0.so DRI_PRIME=1 ./game/PillarsOfEternityII

To get over the game using OpenGL 3.0 but demanding 3.2 or higher and using system libSDL2. Moreover I had to compile wayland and wayland-egl, because libSDL2 supplied with the game is linked againts these libraries. This was rahther unexpected, as I do not use Wayland.

If you use the SDL_DYNAMIC_API environment variable instead of LD_PRELOAD, you can just tell libsdl to load your system libsdl2 (the one in /usr/lib64 or similar), which should not be linked against wayland, so you won't need to install it.

Edit: I haven't tried this though, no idea if the game code has the path to ./game/PillarsOfEternityII_Data/Plugins/x86_64/libSDL2-2.0.so hardcoded somewhere, in which case it will probably fail before SDL_DYNAMIC_API ever gets used.


Edited by soulsource, 08 May 2018 - 11:00 PM.


#13
Cxpher

Cxpher

    (1) Prestidigitator

  • Members
  • 9 posts
  • Steam:Cxpher

Use this in your launch options for Arch Linux Steam for PoE II

 

SDL_DYNAMIC_API=/usr/lib64/libSDL2.so LC_ALL=C %command%

 
It's better.


#14
thana54

thana54

    (0) Nub

  • Initiates
  • 2 posts
  • Deadfire Backer
  • Fig Backer

Hi,

When starting the game via steam or directly from PoEII folder, i get the window's framing, but nothing else (no gauntlet cursor, no sound, no video). Alt-tab is still useable, and i must kill the process.

 

Tried via terminal too:

./PillarsOfEternityII --help
Set current directory to /media/stockage_hellblazer/SteamLibrary/steamapps/common/Pillars of Eternity II
Found path: /media/stockage_hellblazer/SteamLibrary/steamapps/common/Pillars of Eternity II/PillarsOfEternityII
Mono path[0] = '/media/stockage_hellblazer/SteamLibrary/steamapps/common/Pillars of Eternity II/PillarsOfEternityII_Data/Managed'
Mono path[1] = '/media/stockage_hellblazer/SteamLibrary/steamapps/common/Pillars of Eternity II/PillarsOfEternityII_Data/Mono'
Mono config path = '/media/stockage_hellblazer/SteamLibrary/steamapps/common/Pillars of Eternity II/PillarsOfEternityII_Data/Mono/etc'
Preloaded 'libdiscord-rpc.so'
Preloaded 'ScreenSelector.so'
Preloaded 'libAkFlanger.so'
Preloaded 'libAkHarmonizer.so'
Preloaded 'libAkPitchShifter.so'
Preloaded 'libAkSoundEngine.so'
Preloaded 'libAkStereoDelay.so'
Preloaded 'libAkTremolo.so'
Preloaded 'libMcDSP.so'
Preloaded 'libSDL2-2.0.so'
Preloaded 'libsteam_api.so'
Player data archive not found at `/media/stockage_hellblazer/SteamLibrary/steamapps/common/Pillars of Eternity II/PillarsOfEternityII_Data/data.unity3d`, using local filesystem

Check 3 times the game integrity. No luck.

 

I'm currently downloading again the game.

 

OS: Debian Linux

Kermel: 4.16.0.1-amd64

Graphics: Nvidia gtx 1060

Attached Files


Edited by thana54, 09 May 2018 - 02:20 AM.


#15
lew21

lew21

    (1) Prestidigitator

  • Members
  • 7 posts
  • Deadfire Silver Backer
  • Fig Backer

Have you tried the workaround from https://forums.obsid...n-black-screen/ ? Works for me.



#16
Jamila

Jamila

    (1) Prestidigitator

  • Members
  • 37 posts

 

In my case, I had to launch the game like this:

MESA_GL_VERSION_OVERRIDE=4.5 MESA_GLSL_VERSION_OVERRIDE=450 LD_PRELOAD=./game/PillarsOfEternityII_Data/Plugins/x86_64/libSDL2-2.0.so DRI_PRIME=1 ./game/PillarsOfEternityII

To get over the game using OpenGL 3.0 but demanding 3.2 or higher and using system libSDL2. Moreover I had to compile wayland and wayland-egl, because libSDL2 supplied with the game is linked againts these libraries. This was rahther unexpected, as I do not use Wayland.

If you use the SDL_DYNAMIC_API environment variable instead of LD_PRELOAD, you can just tell libsdl to load your system libsdl2 (the one in /usr/lib64 or similar), which should not be linked against wayland, so you won't need to install it.

Edit: I haven't tried this though, no idea if the game code has the path to ./game/PillarsOfEternityII_Data/Plugins/x86_64/libSDL2-2.0.so hardcoded somewhere, in which case it will probably fail before SDL_DYNAMIC_API ever gets used.

 

I think it just loads everything from Plugins directory.



#17
thana54

thana54

    (0) Nub

  • Initiates
  • 2 posts
  • Deadfire Backer
  • Fig Backer
✓  Best Answer

working for me with that command:

cd "/media/stockage_hellblazer/SteamLibrary/steamapps/common/Pillars of Eternity II"

MESA_GL_VERSION_OVERRIDE=4.5 MESA_GLSL_VERSION_OVERRIDE=450 LD_PRELOAD=PillarsOfEternityII_Data/Plugins/x86_64/libSDL2-2.0.so DRI_PRIME=1 ./PillarsOfEternityII
 



#18
bublor

bublor

    (0) Nub

  • Initiates
  • 1 posts
  • Steam:bublor

Sorry folks to kick an old thread back up, however I am running Open Suse 15.0, and I had to run using this bash script, it will launch the steam app, and then I can run the game.  so in a file called Steam_Start.sh, I added this code to launch steam.  I think it's pretty much the same as the others, but compact?   Hopefully this can help anyone else using Open Suse( I would be curious if it also worked with other distro's ).

 

#!/bin/bash
 
STEAM_RUNTIME_PREFER_HOST_LIBRARIES=0 steam


#19
Drudenhaus

Drudenhaus

    (0) Nub

  • Initiates
  • 3 posts
  • Steam:Drudenhaus
  • Pillars of Eternity Backer
  • Kickstarter Backer
  • Lords of the Eastern Reach Backer
  • Deadfire Backer
  • Fig Backer

Thanks for the info here. I was able to run the game with the launch option:

 

SDL_DYNAMIC_API=/usr/lib64/libSDL2-2.0.so.0 %command%

 

I also had to rebuild mesa with USE=wayland on my Gentoo box.







Also tagged with one or more of these keywords: Linux

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users