New to Vulkan and DXVK - trouble using them with latest Wine

Questions about Wine on Linux
BenoitSmith
Newbie
Newbie
Posts: 1
Joined: Wed Nov 07, 2018 9:57 am

New to Vulkan and DXVK - trouble using them with latest Wine

Post by BenoitSmith »

Greetings,

I use Linux Mint 17.3, and my graphics card is a NVidia GeForce GTX 960 (supported with the proprietary driver). I'm trying to enable Vulkan with Wine 3.19 Staging:

- Updating the driver to 396.54.

- Installing the packages libvulkan, libvulkan:i386 and vulkan-utils.

- Checking vulkaninfo, of which the output seemed to inform me that Vulkan was well supported.

- Install some game in a specific WINE prefix.

- Install DXVK 0.70 into that prefix, according to doitsujin's instructions (I used the verb file).

- Configuring the prefix so that the DXVK libraries are used.

Nevertheless, running the game only gave me an output ending with this:

Code: Select all

00ea:err:vulkan:wine_vk_init Failed to load Wine graphics driver supporting Vulkan.
00ea:err:module:LdrInitializeThunk "winevulkan.dll" failed to initialize, aborting
00ea:err:module:LdrInitializeThunk Initializing dlls for L"[main_exe_for_the_game]" failed, status c0000142
(full output here: https://pastebin.com/8njW01Kt)

Given that the problem seems linked to Vulkan support through WINE, I'd just like to know whether I missed something in the process, or did something wrong.

Any piece of enlightenment would be greatly appreciated!

Best regards
User avatar
dimesio
Moderator
Moderator
Posts: 13202
Joined: Tue Mar 25, 2008 10:30 pm

Re: New to Vulkan and DXVK - trouble using them with latest

Post by dimesio »

My guess would be that your Wine package was not compiled with Vulkan support. Mint 17.3 is based on Ubuntu 14.04, which does not provide the needed libvulkan headers. https://packages.ubuntu.com/search?keyw ... vulkan-dev
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: New to Vulkan and DXVK - trouble using them with latest

Post by Bob Wya »

@BenoitSmith

Also you don't troubleshoot Wine Vulkan issues by running a D3D10/D3D11 Windows game straight-away (especially not one from the accursed Ubisoft!)
Baby steps! 8)

First you check you can run the native:

Code: Select all

vulkaninfo
vulkancube
(32-bit and 64-bit Vulkan Cube demo ideally)

Then you test the 32-bit and 64-bit Windows Vulkan utilities.

Code: Select all

winetricks vulkansdk
wine start 'C:\VulkanSDK\1.1.73.0\Bin\cube.exe'
wine start 'C:\VulkanSDK\1.1.73.0\RunTimeInstaller\x86\vulkaninfo.exe'
wine start 'C:\VulkanSDK\1.1.73.0\RunTimeInstaller\x64\vulkaninfo.exe'
with a clean 64-bit WINEPREFIX. Obviously those paths will change for newer versions of the SDK.

Make sure your winetricks version is up-to-date (another regular Ubuntu issue): see Github: Winetricks/winetricks.
This has a guide for updating winetricks (and keeping it up-to-date automatically).

Obviously you'd have to update to Ubuntu 18.04 (aka Linux Mint 19) to take advantage of any Vulkan support (as this API layer is very new).

I've an Nvidia Geforce 970M graphics card. The Nvidia driver support for Vulkan is excellent, with the current Vulkan beta driver: 396.54.09.
Being enjoying playing Crysis 1 & 2, GTA V, etc. with DXVK. I've been waiting years to play Crysis on Linux! 8)

Bob
Monsieur_Smith
Level 2
Level 2
Posts: 21
Joined: Sat Oct 17, 2009 7:56 am

Re: New to Vulkan and DXVK - trouble using them with latest

Post by Monsieur_Smith »

Thank you very much! (and sorry for the account-switching, I just found my old username again...).

Actually, I just found 'libvulkan-dev' and 'libvulkan-dev:i386' packages in the repositories, so I installed them, hoping that would make the difference...

vulkaninfo gave me a long output: https://pastebin.com/D31u4QSj

vulkancube doesn't seem to have been installed in my system, but vulkan-smoketest gave me a nice cloud of 3D teacups ;-)
Image

I successfully switched to a manually-updated winetricks, installed VulkanSDK in a clean prefix. Then the bad things started:

- Output of " WINEPREFIX=<my_prefix> wine start 'C:\VulkanSDK\1.1.73.0\Bin\cube.exe' ":

Code: Select all

0009:fixme:exec:SHELL_execute flags ignored: 0x00000100
002b:err:vulkan:get_vulkan_driver Wine was built without Vulkan support.
002b:err:vulkan:wine_vk_init Failed to load Wine graphics driver supporting Vulkan.
002b:err:module:attach_dlls "winevulkan.dll" failed to initialize, aborting
002b:err:module:attach_dlls Initializing dlls for L"C:\\VulkanSDK\\1.1.73.0\\Bin\\cube.exe" failed, status c0000142
- Output of " WINEPREFIX=<my_prefix> wine start 'C:\VulkanSDK\1.1.73.0\RunTimeInstaller\x86\vulkaninfo.exe' ":
Image

- Output of " WINEPREFIX=<my_prefix> wine start 'C:\VulkanSDK\1.1.73.0\RunTimeInstaller\x64\vulkaninfo.exe' ":
Image
User avatar
dimesio
Moderator
Moderator
Posts: 13202
Joined: Tue Mar 25, 2008 10:30 pm

Re: New to Vulkan and DXVK - trouble using them with latest

Post by dimesio »

Monsieur_Smith wrote: Actually, I just found 'libvulkan-dev' and 'libvulkan-dev:i386' packages in the repositories, so I installed them, hoping that would make the difference...
The headers are needed to compile Wine with Vulkan support. They won't do anything for Wine that was compiled without Vulkan support, and if you are using the WineHQ Trusty packages, those were built without Vulkan support.

As Bob Wya said, you really need to upgrade to Mint 19 for this.
Monsieur_Smith
Level 2
Level 2
Posts: 21
Joined: Sat Oct 17, 2009 7:56 am

Re: New to Vulkan and DXVK - trouble using them with latest

Post by Monsieur_Smith »

Hi,

Once again, thank you for your support. Please rest assured I haven't given up on that case. The thing is, my double upgrade wasn't without bad events, and now I have to re-configure PulseAudio from the ground in my new Linux Mint 19 environment, before I resume tweaking my graphics. When I do, I'll let you know about my results.

Best regards,

Benoît
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: New to Vulkan and DXVK - trouble using them with latest

Post by Bob Wya »

Monsieur_Smith wrote:Hi,

When I do, I'll let you know about my results.
Just no more screenshots of terminal output, please! :roll:

Logs should be posted in text format (not as an image).
See: WineHQ FAQ: 10.1.1 How can I get a debugging log (a.k.a. terminal output)?

You can transfer a log file, into your main DE clipboard, easily enough with:

Code: Select all

sudo apt-get install xclip # install xclip - IF not already installed

cat ~/log.txt  | xclip -i -selection clipboard # Copy contents of a log file in HOME to your clipboard
For longer logs - something like a Github Gist.
My current favoured tool for automating the process of posting Gists is: Github: defunkt / gist.
This is a ruby script that stores a Github OAuth token to enable direct posting of log files (etc.) to new Github Gists.
Powerful and surprisingly easy to use as well! 8)

Thanks
Bob
Monsieur_Smith
Level 2
Level 2
Posts: 21
Joined: Sat Oct 17, 2009 7:56 am

Re: New to Vulkan and DXVK - trouble using them with latest

Post by Monsieur_Smith »

OK, sorry for the annoyance, and thank you from the hints!
Monsieur_Smith
Level 2
Level 2
Posts: 21
Joined: Sat Oct 17, 2009 7:56 am

Re: New to Vulkan and DXVK - trouble using them with latest

Post by Monsieur_Smith »

Once again, thank you for the helpful replies! After completing my upgrade to Linux Mint 19 and reinstalling vulkan-tools, I reiterated the testing protocol you suggested to me. Here are the results:

- Output of vulkaninfo: https://pastebin.com/r51Xbwh2

- Output of vulkan-cube: a grey, spinning cube bearing the Lunar logo.

After installing vulkaninfo through the latest winetricks:

- Output of WINEPREFIX=<my_prefix> wine start 'C:\VulkanSDK\1.1.73.0\Bin\cube.exe': a white window and a mean alert box: "Failed to load textures".

WINEPREFIX=<my_prefix> wine start 'C:\VulkanSDK\1.1.73.0\RunTimeInstaller\x86\vulkaninfo.exe' and
WINEPREFIX=<my_prefix> wine start 'C:\VulkanSDK\1.1.73.0\RunTimeInstaller\x64\vulkaninfo.exe' seem to give the same output as vulkaninfo on Linux, but how could I copy and paste an output given inside Wine?

Best regards,

Benoît
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: New to Vulkan and DXVK - trouble using them with latest

Post by Bob Wya »

Monsieur_Smith wrote:...but how could I copy and paste an output given inside Wine?
By reading the WineHQ FAQ - which I've linked to already??

But to spell it out:

Code: Select all

export WINEDEBUG=+vulkan

WINEPREFIX=... wine start 'C:\VulkanSDK\1.1.73.0\Bin\cube.exe' &>~/wine_vuikan_sdk_cube_log.txt

WINEPREFIX=... wine start 'C:\VulkanSDK\1.1.73.0\RunTimeInstaller\x86\vulkaninfo.exe' &>~/wine_vuikan_info_log.txt
There is no "inside" Wine about it (unless you run: wine cmd)...
You can simply redirect or pipe the Wine terminal output, the same way as any other Linux terminal utility...

Bob
Monsieur_Smith
Level 2
Level 2
Posts: 21
Joined: Sat Oct 17, 2009 7:56 am

Re: New to Vulkan and DXVK - trouble using them with latest

Post by Monsieur_Smith »

Thank you. And yes, I meant the content of the 'cmd' terminal opened in the Wine desktop. Redirecting that output is what I failed to guess previously - sorry about that.

So here are:

- the log produced by vulkan-cube: https://pastebin.com/mWH3S7eF

- the content of the Vulkan info produced by wine start... x86\vulkaninfo.exe: https://pastebin.com/QEbKmgsZ

- the log produced by wine start... x86\vulkaninfo.exe: https://pastebin.com/GRLfhUTG

- the content of the Vulkan info produced by wine start... x64\vulkaninfo.exe: https://pastebin.com/eEAhXQwV

- the log produced by wine start... x64\vulkaninfo.exe: https://pastebin.com/EeKsbScY

Hope this helps!

Best regards,

Benoît
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: New to Vulkan and DXVK - trouble using them with latest

Post by Bob Wya »

@ Benoît

Something is very out-of-date on your system:

Code: Select all

Device Properties and Extensions :
==================================
GPU0
VkPhysicalDeviceProperties:
===========================
	apiVersion     = 0x401046  (1.1.70)
	driverVersion  = 1661829120 (0x630d8000)
	vendorID       = 0x10de
	deviceID       = 0x1401
	deviceType     = DISCRETE_GPU
	deviceName     = GeForce GTX 960
I would expect to see:

Code: Select all

Device Properties and Extensions :
==================================
GPU0
VkPhysicalDeviceProperties:
===========================
        apiVersion     = 0x401055  (1.1.85)
        driverVersion  = 1661829696 (0x630d8240)
        vendorID       = 0x10de
        deviceID       = 0x1401
        deviceType     = DISCRETE_GPU
        deviceName     = GeForce GTX 960
Possibly you need to install the contents of this PPA: Proprietary Development GPU Drivers ?
Also make sure you also have:

Code: Select all

sudo apt install libvulkan1 libvulkan1:i386 
This presumes that the Ubuntu 18.04 winehq-staging packages aren't built against obsolete Vulkan dev headers... :roll:

Bob
Monsieur_Smith
Level 2
Level 2
Posts: 21
Joined: Sat Oct 17, 2009 7:56 am

Re: New to Vulkan and DXVK - trouble using them with latest

Post by Monsieur_Smith »

Well, I could have sworn that my NVidia driver seemed up-to-date in my driver manager... :oops: Anyway, I updated it, checked that the libvulkan* libraries were installed, and below are the latest logs. The "apiVersion" properties seem fine this time, yet the 'wine start... vulkan-cube.exe' keeps giving me a white window and a 'Failed to load textures' box.

Also, does it matter that the "Vulkan Instance Version" obtained through vulkaninfo in an xterm (1.1.82) is different from the one obtained through "wine cmd" (1.1.73)?

- the log produced by vulkan-cube: https://pastebin.com/x5jdWjve

- the content of the Vulkan info produced by wine start... x86\vulkaninfo.exe: https://pastebin.com/2ZXMGnLU

- the log produced by wine start... x86\vulkaninfo.exe: https://pastebin.com/ynLRUT3R

- the content of the Vulkan info produced by wine start... x64\vulkaninfo.exe: https://pastebin.com/eFgAXALE

- the log produced by wine start... x64\vulkaninfo.exe: https://pastebin.com/UYiLvCPA
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: New to Vulkan and DXVK - trouble using them with latest

Post by Bob Wya »

Monsieur_Smith wrote:Well, I could have sworn that my NVidia driver seemed up-to-date in my driver manager... :oops: Anyway, I updated it, checked that the libvulkan* libraries were installed, and below are the latest logs. The "apiVersion" properties seem fine this time, yet the 'wine start... vulkan-cube.exe' keeps giving me a white window and a 'Failed to load textures' box.
...
Ahh, sorry... I should have double checked the full path works correctly.
For some reason some Vulkan demos don't pick up the full working path, even when you run them with:

Code: Select all

wine start 'C:\VulkanSDK\1.1.73.0\Bin32\cube.exe'
This is a known issue.

So in this instance you have to move the working directory first:

Code: Select all

cd "${WINEPREFIX:-${HOME}/.wine}/drive_c/VulkanSDK/1.1.73.0/Bin32"
wine cube.exe
Otherwise your terminal output is looking fine now!
You should be good to go with some DXVK testing (once you've verified that the Vulkan cube demo works now).

You obviously don't want to use an obsolete version of DXVK, now that your graphics driver and wine versions are up-to-date!

The winetricks Git Master has the latest DXVK version:

Code: Select all

winetricks dxvk92
which will install DXVK 0.92 to your current WINEPREFIX.

See also: Github: Winetricks/winetricks README: Installing + Updating (sections).

Don't forget to install my handy winetricks BASH completion script! 8)

Bob
Monsieur_Smith
Level 2
Level 2
Posts: 21
Joined: Sat Oct 17, 2009 7:56 am

Re: New to Vulkan and DXVK - trouble using them with latest

Post by Monsieur_Smith »

Yes, once in the working directory (Bin or Bin32), the cube shows well. Thank you!

About the DXVK version: I chose 0.70 after reading that later versions were only compatible with the latest versions of the NVidia driver - I assumed that those were 410.xx or 415.xx... Do you confirm that the latest DXVK version works with the 396.54 driver?
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: New to Vulkan and DXVK - trouble using them with latest

Post by Bob Wya »

Monsieur_Smith wrote:Yes, once in the working directory (Bin or Bin32), the cube shows well. Thank you!

About the DXVK version: I chose 0.70 after reading that later versions were only compatible with the latest versions of the NVidia driver - I assumed that those were 410.xx or 415.xx... Do you confirm that the latest DXVK version works with the 396.54 driver?
Just no... Don't use old DXVK versions, unless you have a known regression.
The pace of development of DXVK is such that a version from last month may totally suck compared to the latest release!

Since I've guided you to the latest Nvidia Vulkan beta driver, 396.54.09, all is good on your end. 8)
Just keep checking on the DXVK Wiki: Driver support page...
Don't ask me what Nvidia is doing with their version numbering order... It's really broken at the moment. :roll:

With this setup...
You should be able to play most of the newer Steamplay (Proton) titles, which leverage DXVK/Vulkan.

Note: some of these need protontricks.
A simple python wrapper for winetricks, since each Steam game is allocated it's own, independent WINEPREFIX.

The main benefit of Steamplay are that:
  • games you play, all count as Linux games, in the Valve Steam statistics.
  • Proton has a lot of performance enhancements over regular Wine/ Wine Staging
  • you use the native Linux Steam client
The original Crysis for example, which was always a bit of turkey with regular Wine Staging (and required a patch just to run at all)...
Now runs stupidly well with Steamplay and a single protontricks override.

See: protondb.

Make sure you select the newest version of Proton (16-4 I think) in the Steamplay section (bottom) of the native Linux Steam Client settings menu.
This might require joining the Steam client beta.

Bob
Monsieur_Smith
Level 2
Level 2
Posts: 21
Joined: Sat Oct 17, 2009 7:56 am

Re: New to Vulkan and DXVK - trouble using them with latest

Post by Monsieur_Smith »

Thank you so much for the guidance!
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: New to Vulkan and DXVK - trouble using them with latest

Post by Bob Wya »

np 8)

Feel free to post back here, if you get stuck along the way!

Bob
Monsieur_Smith
Level 2
Level 2
Posts: 21
Joined: Sat Oct 17, 2009 7:56 am

Re: New to Vulkan and DXVK - trouble using them with latest

Post by Monsieur_Smith »

Hi,

Did anyone succeed in making Wine 4.0 (final, not Staging) and DXVK work together? I'm trying right now (using all of the hints given earlier in this topic), and it looks more difficult than I expected, to the point that I consider reverting back to Wine 3.21.

Best regards,

Benoît
Monsieur_Smith
Level 2
Level 2
Posts: 21
Joined: Sat Oct 17, 2009 7:56 am

Re: New to Vulkan and DXVK - trouble using them with latest

Post by Monsieur_Smith »

Something's gotten wrong since updating Wine to 4.0. Here are:

- the content of the Vulkan info produced by wine start... x86\vulkaninfo.exe: https://pastebin.com/U8HE3Mxj

- the log produced by wine start... x86\vulkaninfo.exe: https://pastebin.com/PtPEen8F

- the content of the Vulkan info produced by wine start... x64\vulkaninfo.exe: https://pastebin.com/4ZTkVfxA

- the log produced by wine start... x64\vulkaninfo.exe: https://pastebin.com/Ntyz9g4D
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: New to Vulkan and DXVK - trouble using them with latest

Post by Bob Wya »

@Monsieur_Smith

It looks like you aren't using an up-to-date version of Vulkan and/or the proprietary Nvidia Drivers.

Ideally you'd want:
  • (native Linux) vulkan loader ≥1.1.88
  • Nvidia proprietary driver 415.22.05 (current Vulkan beta driver ) or 415.27
If that doesn't help, then perhaps Wine built/linked against an earlier Vulkan version?

Bob
Monsieur_Smith
Level 2
Level 2
Posts: 21
Joined: Sat Oct 17, 2009 7:56 am

Re: New to Vulkan and DXVK - trouble using them with latest

Post by Monsieur_Smith »

So the requirements have risen since last November? And does that mean I may have to compile the latest Vulkan loader myself?
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: New to Vulkan and DXVK - trouble using them with latest

Post by Bob Wya »

Monsieur_Smith wrote:So the requirements have risen since last November? And does that mean I may have to compile the latest Vulkan loader myself?
See: winevulkan: Update vk.xml to 1.1.94.

This PPA would probably cover things: Ubuntu PPA: vkd3d patched.

Bob
Monsieur_Smith
Level 2
Level 2
Posts: 21
Joined: Sat Oct 17, 2009 7:56 am

Re: New to Vulkan and DXVK - trouble using them with latest

Post by Monsieur_Smith »

I just upgraded the graphics driver to 415.27 and the Vulkan loader to 1.1.97 RC 1 (following the PPA you linked). Error messages can still be found. Here are the resultat:

- the content of the Vulkan info produced by wine start... x86\vulkaninfo.exe: https://pastebin.com/KCQwUbbb

- the log produced by wine start... x86\vulkaninfo.exe: https://pastebin.com/mcT0YFi5

- the content of the Vulkan info produced by wine start... x64\vulkaninfo.exe: https://pastebin.com/WhUDwnTA

- the log produced by wine start... x64\vulkaninfo.exe: https://pastebin.com/s3PynNhU
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: New to Vulkan and DXVK - trouble using them with latest

Post by Bob Wya »

@Monsieur_Smith

Oops...
I forgot to mention that Wine (or Wine Staging) would need to rebuilt against the updated vulkan headers, from that PPA!
As the WineHQ Ubuntu Wine packages will be built against: Package libvulkan-dev 1.1.70.

Also you shouldn't go straight to testing Wine's Vulkan support.
It is important to test the native Linux Vulkan functionality/support first.
This can be done with the native Linux tools: vulkaninfo and the vulkancube demo.

Bob
Locked