The Witcher 3 in Wine
Page: «50/178»
  Go to:
hilpara Dec 1, 2017
Could you help me to start the Witcher from commandline. I have installed witcher with lutris and from there I can start it without problems. If I try to start it from command line using the exact same prefix and same wine version (2.21 staging) it just crashes with the following output:

WINEPREFIX=/home/user/Games/the-witcher-3-wild-hunt/ wine start witcher3.exe 
fixme:winediag:start_process Wine Staging 2.21 is a testing version containing experimental patches.
fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org.
wine: cannot find L"C:\\windows\\system32\\winemenubuilder.exe"
err:wineboot:ProcessRunKeys Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (2)
fixme:exec:SHELL_execute flags ignored: 0x00000100
[user@user-arch x64]$ fixme:module:load_dll Loader redirect from L"wined3d.dll" to L"wined3d-csmt.dll"
err:winediag:wined3d_dll_init Setting multithreaded command stream to 0x1.
err:winediag:wined3d_dll_init Setting maximum allowed wined3d GL version to 4.5.
wine: Unhandled page fault on read access to 0x00000000 at address 0x7f607455b4b1 (thread 002e), starting debugger...


What would be the "right" way to start it?
Shmerl Dec 1, 2017
Quoting: hilparaCould you help me to start the Witcher from commandline.

I made a few helper scripts to run Wine (make sure $HOME/bin is in your path):

$HOME/bin/wine_env.sh
#!/bin/bash

export wine_dir=${wine_dir:-"wine-devel"}
export wine_bin=${wine_bin:-"wine"}

export WINEVERPATH=${WINEVERPATH:-"/opt/${wine_dir}"}
export PATH=${WINEVERPATH}/bin:$PATH 
export WINESERVER=${WINEVERPATH}/bin/wineserver
export WINELOADER=${WINEVERPATH}/bin/${wine_bin}
export WINEDLLPATH=${WINEVERPATH}/lib/wine/fakedlls
export LD_LIBRARY_PATH="${WINEVERPATH}/lib:${LD_LIBRARY_PATH}"


$HOME/bin/wine_run.sh
#!/bin/bash

# Overrides and settings:
#
# WINEVERPATH to use custom location of Wine
# WINEPREFIX to set what prefix to use

if [[ "$1" == 32 ]]; then
   wine_bin='wine'
   shift
else
   wine_bin='wine64'
fi

source $(dirname ${BASH_SOURCE[0]})/wine_env.sh

echo "Wine env:"
echo "WINEPREFIX=${WINEPREFIX}"
echo "WINEVERPATH=${WINEVERPATH}"
echo "WINESERVER=${WINESERVER}"
echo "WINELOADER=${WINELOADER}"
echo "WINEDLLPATH=${WINEDLLPATH}"
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}"
echo "==========================================="

$wine_bin $@  


Now let's say your prefix for the Witcher 3 is: /opt/games/wine/prefixes/witcher3, and you installed the game in /opt/games/wine/prefixes/witcher3/drive_c/the_witcher_3

You can make a launcher script like this:

tw3_launch.sh
#!/bin/bash

export wine_dir=${wine_dir:-"wine-master"}
export WINEPREFIX=/opt/games/wine/prefixes/witcher3
export WINEDEBUG=-all

cd $WINEPREFIX/drive_c/the_witcher_3/bin/x64

wine_run.sh witcher3.exe


It will use Wine from /opt/wine-master

Change wine_dir variable to something else to use some other Wine that you put in /opt

You don't need to split it all that way if you don't want to, but the above should give you an idea.
beko Dec 1, 2017
Roleback to Wine Staging 2.20.

It's simply broken in 2.21 (for me + nvidia at least)
Shmerl Dec 3, 2017
Quoting: GuestNew Józef Kucia patches in winegit

Yep, also a few patches by Matteo Bruni. I think those should replace mips patches in staging.
Shmerl Dec 3, 2017
There are also a bunch of pending patches by Józef Kucia here: https://source.winehq.org/patches/
Shmerl Dec 3, 2017
Nope. Unfortunately those patches by Matteo Bruni don't replace mips patches from staging - without using the later, Witcher 3 gets black spots on the water again. Staging now needs a major deep rebase to catch up.
mrdeathjr Dec 3, 2017
Quoting: ShmerlThere are also a bunch of pending patches by Józef Kucia here: https://source.winehq.org/patches/

Very interesting patch set but dont seems affects DX11, stay focus mainly for DX8-DX9 clip planes (only left henri verbeet aprove)

However very interesting patch set

^_^
Ehvis Dec 3, 2017
Had an opportunity to mess with TW3 for the weekend. I built wine git + the patches Shmerl listed in his howto. Had to make a bunch of changes to get those to apply (and remove the audio patch entirely).

System was a i7 4790+GTX 970. Game appeared to render flawlessly, but I only did the start bit until entering the town so I could do some repeated running around. FPS was pretty low regardless of resolution and settings. What made the game practically unplayable was the horrid input lag. Sometimes Geralt kept running for several seconds after releasing the key. The odd thing was, during that time I was perfectly able to rotate the view.

I used the Wine fps debug to check some runs around the town and got about 15-20 FPS, CPU load 250%-270% and GPU load 50%-60%. So heavily CPU bound, as expected. I also experienced occasional lag spikes. Especially in cut scenes where it even caused the lip desyncing.

To get a better idea about what Wine was doing, I also built "Oprofile 1.2.0" and did some profiling. However, I don't think my understanding of that system is good enough to draw any definitive conclusions. However, what it appears to show was the following:
- ~30%-35% of the time spent in wined3d
- ~35%-40% of the time spent in witcher3.exe
- ~6%-8% of time spent in nvidia opengl lib.

The Wine wiki says "If more than 5% CPU time are spent in wined3d this is suspicious.", so this result appears to suggest that something is not going right in wined3d. However, the time results for wined3d.dll kept switching between two function: shader_glsl_generate_ffp_fragment_shader and shader_arb_load_constants_f. I'm not really sure what I should make of that. However, I do find it odd that the first one could be hit so often, since I wouldn't expect the generation of shaders to go on continuously. Unless, of course, this exactly the problem that only happens on nvidia.

I tried to analyse using the "callgraph" feature, but this suggested that most of the time was spent for witcher3.exe in a function called "ntdll.dll:enumerate_key", which seems highly unlikely.

Anyway, maybe these results can prod the TW3 owners to try some more in depth testing and maybe comparing some profiling results between Mesa and Nvidia.
Shmerl Dec 3, 2017
Quoting: EhvisHad an opportunity to mess with TW3 for the weekend. I built wine git + the patches Shmerl listed in his howto. Had to make a bunch of changes to get those to apply (and remove the audio patch entirely).

Yep, I'll update the instructions, but now there is no way to consistently apply that to Wine master. Staging needs a catch up.
Shmerl Dec 3, 2017
Quoting: EhvisTo get a better idea about what Wine was doing, I also built "Oprofile 1.2.0" and did some profiling.

Is oprofile better than let's say regular perf?
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register


Or login with...
Sign in with Steam Sign in with Google
Social logins require cookies to stay logged in.