Confused on Steam Play and Proton? Be sure to check out our guide.
The Witcher 3 in Wine
Page: «26/88»
  Go to:
beko Dec 3, 2017
Movement lag can be prevented by running it on own X. Gnome (for me) seems to trouble Wine on Tw3. I may add a howto tomorrow if you need one.
Shmerl Dec 3, 2017
Movement lag can be prevented by running it on own X. Gnome (for me) seems to trouble Wine on Tw3. I may add a howto tomorrow if you need one.

You probably need to disable compositing when running Wine.
andda715 Dec 3, 2017
Here is operf from my account, 51.7% in wined3d-csmt and 11% in nvidia?
wine-staging 2.21

Should I post this in the bug report or some more details needed?
12803 is Witcher3.exe :-)

CPU: AMD64 generic, speed 3799.87 MHz (estimated)
Counted CPU_CLK_UNHALTED events (CPU Clocks not Halted) with a unit mask of 0x00 (No unit mask) count 100000
CPU_CLK_UNHALT...|
  samples|      %|
------------------
  3575526 100.000 wine64-preloader
        CPU_CLK_UNHALT...|
          samples|      %|
        ------------------
          1847327 51.6659 wined3d-csmt.dll.so
           912197 25.5122 anon (tgid:12803 range:0x140001000-0x141cc7fff)
           411315 11.5036 libnvidia-glcore.so.387.34
           147552  4.1267 kallsyms
            47963  1.3414 ntdll.dll.so
            45818  1.2814 libc-2.23.so
            36251  1.0139 libGL.so.387.34
            32411  0.9065 d3d11.dll.so
            26907  0.7525 libpthread-2.23.so
             9801  0.2741 libpulsecommon-8.0.so
             9553  0.2672 nvidia
Shmerl Dec 3, 2017
It wouldn't hurt to post it in the bug, but drilling down to individual functions would be more useful.
Shmerl Dec 3, 2017
Using perf you can also build flame graphs: http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html
beko Dec 3, 2017
Movement lag can be prevented by running it on own X. Gnome (for me) seems to trouble Wine on Tw3. I may add a howto tomorrow if you need one.

You probably need to disable compositing when running Wine.
Will try but I doubt this is related (this time). IIRC I did try this before but it won't hurt to do so again. ty
Shmerl Dec 4, 2017
Looks like remaining chunk of patches by Matteo Bruni for GenerateMips is coming: https://source.winehq.org/patches/
hilpara Dec 5, 2017
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.

Thanks Shmerl! I got it working with your scripts. The only downside at the moment is, that the patches includes lot of stuff already implemented in master and requires a lot of work to get it work.
Shmerl Dec 5, 2017
Thanks Shmerl! I got it working with your scripts. The only downside at the moment is, that the patches includes lot of stuff already implemented in master and requires a lot of work to get it work.

Yeah, you'd need to skip mips patch, and surely not to apply whole staging.
Shmerl Dec 5, 2017
The water is good using Wine master now, so you don't need mips patch from staging anymore, which makes things much simpler to apply. I updated the instructions.
Shmerl Dec 6, 2017
Looks like deferred context patch isn't really needed. So amount of staging patches basically is now reduced to one. See if removing deferred context improves performance for Nvidia.
beko Dec 6, 2017
Will try but I doubt this is related (this time). IIRC I did try this before but it won't hurt to do so again. ty
Follow up: Seems to work much better.

So I'll add gsettings set org.gnome.desktop.interface enable-animations false to my startup script.
hilpara Dec 8, 2017
So my Witcher 3 worked nicely once as I wrote earlier. I wanted to play it today and now I'll get an error:
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1be00 "/home/user/build/wine-git/source/dlls/ntdll/loader.c: loader_section" wait timed out in thread 002d, blocked by 0009, retrying (60 sec). Any ideas?
hilpara Dec 8, 2017
The Witcher works still with lutris. I also made some tests with GALLIUMHUD and I don't know what to think of the results. In a village (the very first village) I have FPS around 20-26, GPU load 60 and CPU0-3 40-60. Why doesn't my GPU load go to 100 when the CPU is not limiting? CPU is i5-4440 CPU @ 3.10GHz and GPU Radeon R9 270X (I'm waiting for my RX580).
andda715 Dec 8, 2017
CPU is limiting, task manager etc doesn't show the whole truth.

Threads are continuously spawned and rescheduled on the different cores. But due to current wine implementation - singleton global shared lock, not enough of them can run in parallel (utilize your 4 cores). This together with a lot of data movement between the GPU and CPU is causing all CPUs to either a) wait for data transfers or b) wait for a mutex to be released (the global lock mentioned earlier). There is a very high activity with patches etc so this might be improved in the future. :-)

Looks like wine-csmt or wine in general is very CPU limited - read: single core performance - when running Witcher 3 at the moment.
malek69 Dec 8, 2017
Witcher 3 wine 3.0
View video on youtube.com
vs
wine 3.0 + wined3d-buffer_create
View video on youtube.com
JudasIscariot Dec 9, 2017
So my Witcher 3 worked nicely once as I wrote earlier. I wanted to play it today and now I'll get an error:
err:ntdll:RtlpWaitForCriticalSection section 0x7bd1be00 "/home/user/build/wine-git/source/dlls/ntdll/loader.c: loader_section" wait timed out in thread 002d, blocked by 0009, retrying (60 sec). Any ideas?

I think you are running into this bug.
hilpara Dec 9, 2017
Reading the bug description, I still don’t know what to do. It seams that it happens only sometimes and it‘s quite rare. I‘ll try to make a new prefix and hope that it helps.
Shmerl Dec 10, 2017
The only major remaining issues now are invisible / distorted monsters (there is a hack patch, but it's causing a freeze for radeonsi), and non optimal performance in general.
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