You are not logged in.

#1 2017-02-07 02:33:48

nstgc
Member
Registered: 2014-03-17
Posts: 393

[solved] Steam Enclave won't launch with packaged wine.

[solution] After working with one of the devs, it seems as if Steam didn't create the necessary symlinks. In particular "ln -s libwine.so.1.0 libwine.so.1" and "libwine.so.1 libwine.so" both in Enclave/Wine/lib
[/solution]

This is pretty much copy and paste from http://steamcommunity.com/app/253980/di … 031583465/
The only addition is that I'm about 90% certain that the reason the game looks so messed up when using Wine other than what is provided by the game devs/pub is due to the gamma being set incorrectly (or something gamma related). So, alternatively, if I can fix that, it would be alright. I'd just miss out on Steam Cloud saves.

edit: Okay. I am 100% sure the issue is the gamma. I ran "xrandr --output DVI-I-1 --gamma 1.0:1.0:1.0" while in game and it fixed the issue for a split second before returning to messed up. So I just need to keep it from reverting back. Not that this is why the game is crashing! Ultimately, I would rather just use the game as it's shipped as opposed to trying to use my own fixes. As the Arch Wiki says "upstream knows best".

edit2: I got the game to work, and the gamma as well, however the brightness is way to low and changing the brightness in settings messes up the gamma. I did this by editing out the packaged wine in the RunGame script.

#!/bin/bash

logfile=Enclave.log.txt
exec > $logfile 2>&1

DEBUG="true"

edebug()
{
    if [ "$DEBUG"="true" ]
    then
        echo -e "DEBUG: $@"
    fi
}

store_resolution() 
{
  edebug "Storing xrand resolution"
  export G17_CURRENT_RESOLUTION=`xrandr -q | awk -F'current' -F',' 'NR==1 {gsub("( |current)","");print $2}'`
  
  export G17_OUTPUTLIST=$(xrandr | grep -e ' connected' | awk '{print $1}')
  export G17_OUTPUTLISTSIZE=$(xrandr | grep -e ' connected' | wc -l)

  edebug "$G17_OUTPUTLISTSIZE displays detected:\n$G17_OUTPUTLIST"
  
  export G17_RESOLUTIONSLIST=$(xrandr | grep ' connected' | grep -o "[0-9]\{3,\}x[0-9]\{3,\}")
  export G17_RESOLUTIONSLISTSIZE=$(xrandr | grep ' connected' | grep -o "[0-9]\{3,\}x[0-9]\{3,\}" | wc -l)

  edebug "Got $G17_RESOLUTIONSLISTSIZE resolutions..."
  if [ $G17_OUTPUTLISTSIZE == $G17_RESOLUTIONSLISTSIZE ]
  then
    edebug "Number of detected outputs matches queried number of resolutions!"
    for (( n=1; n<=$G17_RESOLUTIONSLISTSIZE; n++ ))
    do
        currentOutput=$(echo $G17_OUTPUTLIST | awk -v var="$n" '{print $var}')
        currentResolution=$(echo $G17_RESOLUTIONSLIST | awk -v var="$n" '{print $var}')
        
        edebug "Got output $currentOutput with mode $currentResolution"
    done
  else
    edebug "Number of detected outputs does not match queried number of resolutions..."
  fi
}

restore_resolution() 
{
   sleep 2
   edebug "Restoring resolution (global screen)."
   local active_output=$(xrandr | grep -e " connected [^(]" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/")
   xrandr -s $G17_CURRENT_RESOLUTION
   
   if [ $G17_OUTPUTLISTSIZE == $G17_RESOLUTIONSLISTSIZE ]
   then
     edebug "Restoring resolution of each output"
     for (( n=1; n<=$G17_RESOLUTIONSLISTSIZE; n++ ))
     do
        currentOutput=$(echo $G17_OUTPUTLIST | awk -v var="$n" '{print $var}')
        currentResolution=$(echo $G17_RESOLUTIONSLIST | awk -v var="$n" '{print $var}')
        
        edebug "Calling: xrandr --output $currentOutput --mode $currentResolution"
        xrandr --output $currentOutput --mode $currentResolution
     done
   fi
   edebug "Finished restoring resolution"
}

restore_gamma_brightness()
{
edebug "Search for Video Adapters"
export NUMBEROFADAPTERS=$(xrandr -q | awk '/ connected/ {print $1}' | wc -l)
edebug "$NUMBEROFADAPTERS displays was found"
for (( n=1; n<=$NUMBEROFADAPTERS; n++ ))
    do
    E_VIDEOADAPTER=$(xrandr -q | awk '/ connected/ {print $1}' | awk -v var="$n" ' FNR == var {print}')
	xrandr --output $E_VIDEOADAPTER --brightness 1
	xrandr --output $E_VIDEOADAPTER --gamma 1.0:1.0:1.0 
	edebug "Gamma and brightness was restored for $E_VIDEOADAPTER"
    done

}
check_if_running_and_restore()
{
gameIsRunning=$(ps cax | awk '/Enclave.exe/ {print $0}')
while [ -z "$gameIsRunning" ] ; do
gameIsRunning=$(ps cax | awk '/Enclave.exe/ {print $0}')
edebug "Game is not running"
edebug "$gameisRunning"
sleep 1
done
edebug "Game is running"
edebug "$gameisRunning"
restore_gamma_brightness
}

startDir="$( cd "$(dirname "$0")" ; pwd -P )"
gameDir="$startDir/Game/"
# wineBinDir="$startDir/Wine/bin"
# wineLibDir="$startDir/Wine/lib"
# wineConfig="$startDir/Wine/prefix/.config"
wineBinDir="/usr/bin"
wineLibDir="/usr/lib32"
wineConfig="/home/krovoc/.wine"

edebug "********************STARTING Enclave********************"
edebug "curernt variables are:"
edebug "PATH: $PATH"
edebug "pwd: `pwd`"
edebug "startDir: $startDir"
edebug "gameDir: $gameDir"
edebug "wineBinDir: $wineBinDir"
edebug "wineConfig: $wineConfig"
edebug "wine binary shoult be at: $wineBinDir/wine"
edebug "done!"
edebug "*********************************************************"

echo "Starting the game now..."
export G17_WINESERVER="wineserver"
export G17_WINELOADER="wine"
export G17_WINEPREFIX="$wineConfig" 
    
export PATH="$wineBinDir:$PATH"
edebug "adding wineBinDir to PATH, PATH is now: $PATH"

export LD_LIBRARY_PATH="$wineLibDir:$LD_LIBRARY_PATH"
edebug "adding wineLibDir to LD_LIBRARY_PATH, LD_LIBRARY_PATH is now: $LD_LIBRARY_PATH"

edebug "entering game directory using cd $gameDir"
cd "$gameDir"

#edebug "Store resolution"
#store_resolution 


if [ ! -f "already_launched" ]; then
touch "already_launched"
export CURRENT_RESOLUTION=$(xrandr -q | awk '/ connected primary/ {print $4}' | awk ' FNR == 1 {print}')
export W=$(echo $CURRENT_RESOLUTION| awk -F 'x' '{ print $1}')
if [[ ! $W =~ ^-?[0-9]+$ ]]; then
export CURRENT_RESOLUTION=$(xrandr -q | awk '/ connected primary/ {print $3}' | awk ' FNR == 1 {print}')
export W=$(echo $CURRENT_RESOLUTION| awk -F 'x' '{ print $1}')
if [[ ! $W =~ ^-?[0-9]+$ ]]; then
export CURRENT_RESOLUTION=$(xrandr -q | awk '/ connected/ {print $3}' | awk ' FNR == 1 {print}')
export W=$(echo $CURRENT_RESOLUTION| awk -F 'x' '{ print $1}')
if [[ ! $W =~ ^-?[0-9]+$ ]]; then
export CURRENT_RESOLUTION=$(xrandr -q | awk '/ connected/ {print $4}' | awk ' FNR == 1 {print}')
export W=$(echo $CURRENT_RESOLUTION| awk -F 'x' '{ print $1}')
fi
fi
fi
export W=$(echo $CURRENT_RESOLUTION| awk -F 'x' '{ print $1}')
export H=$(echo $CURRENT_RESOLUTION| awk -F 'x' '{ print $2}' | awk -F '+' '{ print $1}')
sed -i "16s/.*/VID_MODE=$W $H 32 60/" environment.cfg
fi

edebug "calling wine Enclave.exe ..."
# env WINEARCH=win32 wine Enclave.exe &
env wine Enclave.exe &
edebug "Restoring gamma first time"
check_if_running_and_restore
sleep 5
edebug "Restoring gamma second time"
restore_gamma_brightness
sleep 5
edebug "Restoring gamma third time"
restore_gamma_brightness
wait;

edebug "Game was closed"
edebug "Restoring gamma after game closed"
restore_gamma_brightness

#edebug "Restore resolution"
#restore_resolution

#################

I just baught the game. Install it, run it. Doesn't run at all. It doens't crash either. I have to kill it with htop, or killall RunGame. Nothing what so ever in dmesg. I varify the game data, everythings okay. I go to the directory to see what is going on. I see "RunGame" so I ./RunGame. Nothing happens so I interupt it with ctrl+C. I see a "RunWinetricks" bash script, which I attempt to run, but it fails with

g17_wine cmd.exe /c echo '%ProgramFiles%' returned empty string, error message 'g17_wine: error while loading shared libraries: /btrfs/raid0/games/native/steam/common/Enclave/Wine/lib/libwine.so.1: file too short'

No luck there it seems. So I try using my default Steam bottle from CrossOver 16.0.0. The game excepts no input and the colors are all screwed up. I then try my default Wine from my the Arch repository. No special prefix. From WineHQ it looks like it shouldn't need anything except vanilla Wine. The game excepts input, and while technically playable, the colors are so God-awful I can't think of ever wanting to play it like that. I then try to use the version of wine that comes with the game,  but I get the same "libwine.so.1: file too short" message.

edit: I tried steam-native (Run with with Arch specific stuff and native libs), steam-runtimes(Arch specific stuff and Steam's built in libs) and steam (no tweaks, strait Steam). All give the same result. The terminal output is "adding process xxxx for game ID 253980" with xxxx being an ever increasing number. That is until I interupt it, which also kills Steam. I searched for missing native libs with

$ cd ~/.local/share/Steam/ubuntu12_32
$ file * | grep ELF | cut -d: -f1 | LD_LIBRARY_PATH=. xargs ldd | grep 'not found' | sort | uniq

but that shows I have everything.

edit2: I disabled the Overlay, but am still getting the following error logs:

ERROR: ld.so: object '/home/krovoc/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
pid 5400 != 5398, skipping destruction (fork without exec?)
pid 5399 != 5398, skipping destruction (fork without exec?)
DEBUG: ********************STARTING Enclave********************
DEBUG: curernt variables are:
DEBUG: PATH: /usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
pid 5402 != 5398, skipping destruction (fork without exec?)
DEBUG: pwd: /home/krovoc/.local/share/Steam/SteamApps/common/Enclave
DEBUG: startDir: /home/krovoc/.local/share/Steam/SteamApps/common/Enclave
DEBUG: gameDir: /home/krovoc/.local/share/Steam/SteamApps/common/Enclave/Game/
DEBUG: wineBinDir: /home/krovoc/.local/share/Steam/SteamApps/common/Enclave/Wine/bin
DEBUG: wineConfig: /home/krovoc/.local/share/Steam/SteamApps/common/Enclave/Wine/prefix/.config
DEBUG: wine binary shoult be at: /home/krovoc/.local/share/Steam/SteamApps/common/Enclave/Wine/bin/g17_wine
DEBUG: done!
DEBUG: *********************************************************
Starting the game now...
DEBUG: adding wineBinDir to PATH, PATH is now: /home/krovoc/.local/share/Steam/SteamApps/common/Enclave/Wine/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
DEBUG: adding wineLibDir to LD_LIBRARY_PATH, LD_LIBRARY_PATH is now: /home/krovoc/.local/share/Steam/SteamApps/common/Enclave/Wine/lib:/home/krovoc/.local/share/Steam/ubuntu12_32:/home/krovoc/.local/share/Steam/ubuntu12_32/panorama:/usr/lib/steam:/usr/lib32/steam:/home/krovoc/.local/share/Steam/ubuntu12_32:/home/krovoc/.local/share/Steam/ubuntu12_64:/home/krovoc/.local/share/Steam/SteamApps/common/Enclave:/home/krovoc/.local/share/Steam/SteamApps/common/Enclave/bin
DEBUG: entering game directory using cd /home/krovoc/.local/share/Steam/SteamApps/common/Enclave/Game/
DEBUG: calling wine Enclave.exe ...
DEBUG: Restoring gamma first time
ERROR: ld.so: object '/home/krovoc/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/krovoc/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/krovoc/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/krovoc/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
g17_wine: error while loading shared libraries: /home/krovoc/.local/share/Steam/SteamApps/common/Enclave/Wine/lib/libwine.so.1: file too short
pid 5404 != 5398, skipping destruction (fork without exec?)
ERROR: ld.so: object '/home/krovoc/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/krovoc/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
pid 5407 != 5398, skipping destruction (fork without exec?)
DEBUG: Game is not running
DEBUG: 
ERROR: ld.so: object '/home/krovoc/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/krovoc/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/krovoc/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
pid 5411 != 5398, skipping destruction (fork without exec?)
DEBUG: Game is not running
DEBUG: 
ERROR: ld.so: object '/home/krovoc/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/krovoc/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/krovoc/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
pid 5415 != 5398, skipping destruction (fork without exec?)
DEBUG: Game is not running
DEBUG: 
ERROR: ld.so: object '/home/krovoc/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/krovoc/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/krovoc/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
pid 5419 != 5398, skipping destruction (fork without exec?)
DEBUG: Game is not running
DEBUG: 
ERROR: ld.so: object '/home/krovoc/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
.
.
.
...

ad nauseam

edit3:
CPU -- i7-4930k
GPU -- nVidia 950 (drivers 375.26)

edit4: I copied the contents of Enclave/Game to Enclave in my Windows Steam library (Since in Arch Linux of course) and run it as a Windows Steam game in my generic Steam bottle with more or less same result as before.

Also, it seems as if my game play timer is running up despite not being in game. At this rate I won't be eligible for a refund. Yes. A refund on a $1 purchase. It's the principal of the thing.

edit4: I think the gamma is just messed up when I launch it without the regular launcher.

Last edited by nstgc (2017-02-07 15:15:52)

Offline

Board footer

Powered by FluxBB