Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Failed to query surface formats" followed by "Failed to create presenter or back buffer" errors on all games tested. #758

Closed
VincentGuinaudeau opened this issue Nov 10, 2018 · 21 comments

Comments

@VincentGuinaudeau
Copy link

VincentGuinaudeau commented Nov 10, 2018

I feel like this issue is not dxvk's fault, but after a day of installing additional packages, swapping between different version of wine, nvidia driver and dxvk, the only way I managed to launch a game was by turning off dxvk. And since google failed me on this one, posting the problem here seemed the best thing to do.

Also some context, I was able to run games throught DXVK on this very same hardware 6 monts ago. But since them I wiped the OS and bumped to the new version of Ubuntu, and that is only now that I tried to play some windows game again and hit this blocking point.

The issue

For every 3D game I tried with DXVK, I wasn't able to launch the launcher / game. Deactivating DXVK make the game run but obviously the performance isn't great.
Going through the logs, I noticed every game had the same error in the dxgi.log file. Googling those error did turn up some advice from this repository but none worked (setting DXVK_FAKE_DX10_SUPPORT to 1 and VK_ICD_FILENAMES: to the vulkan file for the discrete card).

Also I can play some 2D games through proton on steam, mainly "Into the breach" and "Heat signature", which I guess don't use directX, so DXVK isn't loaded.

Software information

Games (again, this is all the 3D games I tried to run on this computer):

  • Overwatch (lutris) : pass the login window, the main launcher window open but is black and crash shortly after.
  • Titanfall2 (lutris) : A virtual desktop open, a black windows the shape of the login form of Origin open but nothing more.
  • Warframe (lutris) : the script of GloriousEggroll runs and update the game, but once the game launch only a black window open and crash shortly after.
  • Warframe (steamplay) : the only visible activity come from steam saying that the game run during a split second, no window. I couldn't locate the DXVK log files.
  • Prey (steamplay) : The game tried to open fullscreen but crash immediately. Again I couldn't find the log files.

System information

  • OS: Ubuntu 18.04, fresh install.
  • GPU: GTX 1050 mobile, PRIME is activated
  • Driver: 410.*, 396.54, 396.54.09
  • Wine version: proton 3.16-4, wine 3.18 + esync, wine 3.16.
  • DXVK version: from 0.20 to 0.90

Apitrace file(s)

  • Put a link here

Log files (from warframe lutris, but the errors are the same on the others games)

  • d3d11.log:
info:  Enabled instance layers:
info:  Enabled instance extensions:
info:    VK_KHR_surface
info:    VK_KHR_win32_surface
info:  GeForce GTX 1050:
info:    Driver: 396.54.9
info:    Vulkan: 1.1.85
info:    Memory Heap[0]: 
info:      Size: 4096 MiB
info:      Flags: 0x1
info:      Memory Type[7]: Property Flags = 0x1
info:      Memory Type[8]: Property Flags = 0x1
info:    Memory Heap[1]: 
info:      Size: 11919 MiB
info:      Flags: 0x0
info:      Memory Type[0]: Property Flags = 0x0
info:      Memory Type[1]: Property Flags = 0x0
info:      Memory Type[2]: Property Flags = 0x0
info:      Memory Type[3]: Property Flags = 0x0
info:      Memory Type[4]: Property Flags = 0x0
info:      Memory Type[5]: Property Flags = 0x0
info:      Memory Type[6]: Property Flags = 0x0
info:      Memory Type[9]: Property Flags = 0x6
info:      Memory Type[10]: Property Flags = 0xe
info:  Enabled device extensions:
info:    VK_EXT_vertex_attribute_divisor
info:    VK_KHR_descriptor_update_template
info:    VK_KHR_sampler_mirror_clamp_to_edge
info:    VK_KHR_maintenance1
info:    VK_KHR_maintenance2
info:    VK_KHR_shader_draw_parameters
info:    VK_KHR_swapchain
err:   DxvkSurface::getSurfaceFormats: Failed to query surface formats
err:   DXGI: DxgiSwapChain: Failed to create presenter or back buffer
  • dxgi.log:
info:  D3D11CreateDevice: Probing D3D_FEATURE_LEVEL_11_0
info:  D3D11CreateDevice: Using feature level D3D_FEATURE_LEVEL_11_0
info:  D3D11CreateDevice: Probing D3D_FEATURE_LEVEL_11_0
info:  D3D11CreateDevice: Using feature level D3D_FEATURE_LEVEL_11_0

If you need additional information I'll be happy to oblige.

@doitsujin
Copy link
Owner

doitsujin commented Nov 10, 2018

I'm not entirely sure but afaik the combination of Vulkan and PRIME might not work on Nvidia GPUs, so you're out of luck for now. The issue here is that Vulkan itself works on your Nvidia card, but it cannot render to a window.

@VincentGuinaudeau
Copy link
Author

VincentGuinaudeau commented Nov 10, 2018

Thanks for the quick reaction. I wasn't expecting that on a week-end.

I don't use any software other than the nvidia driver if that is what you are thinking about. no bumblebee, bbswitch or prime-select.

When a was talking about prime, this was only to say that I made sure to switch to the dedicated card, and turn on the prime synchronization (vsync all the way between the dedicated card to the screen).

Also, as I mentioned above, I was able to play Overwatch and Titanfall on Ubuntu 16.04 six month prior with roughly the same configuration. I just can't pin-point what is different here.

@VincentGuinaudeau
Copy link
Author

Also, would that mean that I can't use any vulkan application ? Event natively ?

I'm installing Dota 2 to make the test, but looking of a quicker way to do that.

@Leopard1907
Copy link
Contributor

I'm on Mint 18.3 with Gtx 1050 and Intel HD combo. DXVK and other Vulkan games ( RoTR , DOOM etc ) works for me.

Testing with Dota2 is a good start but i think you might be missing some Vulkan libs on your setup.

Try that ;

sudo apt-get install libvulkan1
sudo apt-get install libvulkan1:i386
sudo apt-get install vulkan-utils

@VincentGuinaudeau
Copy link
Author

So Dota 2 do start, even with the -vulkan option (I didn't push further than the menu).

However, I seem to be missing the vulkan-utils package :

$ sudo apt install vulkan-utils
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 vulkan-utils : Depends: vulkan-tools but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

...

The following information may help to resolve the situation:

# grasshopper noise

Well, time for a deep dive in dependency hell...

@Leopard1907
Copy link
Contributor

Vulkan-utils is not essential afaik , you can skip that.

libvulkan parts were important.

@VincentGuinaudeau
Copy link
Author

Ok. So this get use back to square one, since I already had those two packages.

I trying to get my hand on some Vulkan demos to be sure that Vulkan does run on my system.

@Leopard1907
Copy link
Contributor

I wonder about something , can you boot any DXVK using title on Intel GPU?

@VincentGuinaudeau
Copy link
Author

Hummm... So apparently I talked too fast. In the Options, Dota 2 report running on OpenGl, despite the use of the -vulkan parameter.

screenshot from 2018-11-10 20-37-52

So this does point to a borked vulkan install. I'm gonna try to reinstall some packages, but if anyone as a better idea as to what could be the cause or what to target I'm listening.

@VincentGuinaudeau
Copy link
Author

VincentGuinaudeau commented Nov 10, 2018

@Leopard1907 I turn off the nvidia card, rebooted and launched Warframe.

The game does launch, but DXVK report a failure to create the vulkan Instance.

DxvkInstance::createInstance: Failed to create Vulkan instance

So it definitly sound like a something is missing in my vulkan installation. I'll start digging.

PS : Fun fact, the nvidia settings refuse to start, because the driver didn't loaded. Gess I'll try reinstalling the driver.

@doitsujin
Copy link
Owner

Do you have the Vulkan driver for your Intel GPU installed?
Not sure if that is needed for PRIME though.

@Leopard1907
Copy link
Contributor

Yep , it shows you are missing something.

Also Vulkan driver needed for Mesa package though.

Can you try to use Padoka Ppa for updating it. That will automatically install missing parts for Mesa.

@VincentGuinaudeau
Copy link
Author

VincentGuinaudeau commented Nov 10, 2018

I didn't install any mesa drivers. Should I do that along the nvidia-drivers ?

Lutris's wiki mention instaling mesa-vulkan-drivers mesa-vulkan-drivers:i386. Will this be enough ?

@doitsujin
Copy link
Owner

Yeah, that should work. It may cause additional issues, but might be worth trying regardless.

@Leopard1907
Copy link
Contributor

Leopard1907 commented Nov 10, 2018

That is not harmful, do that.

I also have Padoka PPA on my system with graphics driver ppa and development graphics ppa since i sometimes try lightweight games on Intel chip.

@VincentGuinaudeau
Copy link
Author

VincentGuinaudeau commented Nov 11, 2018

So after switching to the intel card I was unable to switch back. I had to do a complete reinstall of the system.

I just finished installing everything, and the situation is the same. You can find below the list of packages related to vulkan that are installed (in green) and available (in white)

image

@Leopard1907 What does this ppa provide ? newer version of mesa ? Or some other packages I should install ?

I'm not interested in using only my Intel card, mainly because I don't need the extra battery, and also after seeing what happens after switching the PRIME profile.

@Anti-Ultimate
Copy link

Anti-Ultimate commented Nov 11, 2018

@VincentGuinaudeau There's currently a bug on Ubuntu where Vulkan cannot grab the device with nvidia-drm.modeset=1 activated (which is the default on Ubuntu)

Usually running a Vulkan utility (such as vulkaninfo) as sudo solves this issue during the current session.

@VincentGuinaudeau
Copy link
Author

@Anti-Ultimate well this is not activated by default on ubuntu (at least for me), because I had to do it in order to activate PRIME synchronization. I followed this post advice to activate it, but drop the driver number to make it work.

By commenting this config line, doing a sudo update-initramfs -u and rebooting, I was able to make vulkan work apparently.

Now this isn't a perfect solution for me, because this will cause tearing in game, and I will have to rebooting each time I want to change between a vulkan game and a non vulkan game if I want to turn on vsync on the others games. This is especially important for 2D games who don't have an internal framecap and will happily run at thousands of FPS without vsync.

So I'm interrested by your workaround, but as stated above I can't install vulkan-utils, which provide vulkaninfo.

If the important part is running a vulkan app as root, could I substitute vulkaninfo for something else ? Or do you have a solution for this package problem ?

@Anti-Ultimate
Copy link

Basically any application which uses Vulkan should work, but I wouldn't use anything that saves configs etc.

You might still wanna fix the broken vulkan-utils install though.

@VincentGuinaudeau
Copy link
Author

Found it. The vulkan-tools package is marked as a replacement for vulkan-utils, explaining why apt won't let me install vulkan-utils, since it depends on vulkan-tools so there is a conflict.

So vulkan-tools is apparently the way to go when using the graphics-drivers/ppa ppa.

And your workaround seem to work !!! running vulkaninfo as a normal user fail (core dumped) when the program start to probe the nvidia card. Running as root work, and then running as a normal user then work too !!

And low and behold, games work too 🎉 ! It only seem like the rest of the windows can't be focused without causing long and repeated freezes for the whole system (even with the simplest app such as vulkan-cube) but I'll take it.

Thank everyone for your patience and dedication. And @doitsujin, you may ear this regularly, but without what you do, AAA gaming on linux would be a joke right now. Your work give more freedom of choice to millions of gamers and you should be proud of that. Keep it up 👍.

@doitsujin
Copy link
Owner

Closing then, and hopefully Ubuntu can fix whatever they screwed up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants