# PRIME setup- Usage of VK\_KHR\_present\_id extension causes presentation failure on 525.85.05 driver with vkd3d-proton master

**URL:** <https://forums.developer.nvidia.com/t/prime-setup-usage-of-vk-khr-present-id-extension-causes-presentation-failure-on-525-85-05-driver-with-vkd3d-proton-master/240536>\
**Category:** Linux\
**Created:** [January 24, 2023, 10:49pm UTC](https://forums.developer.nvidia.com/t/prime-setup-usage-of-vk-khr-present-id-extension-causes-presentation-failure-on-525-85-05-driver-with-vkd3d-proton-master/240536 "2023-01-24T22:49:44Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![VulkanGuy](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vulkanguy/32/11251_2.png) [@VulkanGuy](https://forums.developer.nvidia.com/u/VulkanGuy)\
**Post date:** [January 24, 2023, 10:49pm UTC](https://forums.developer.nvidia.com/t/prime-setup-usage-of-vk-khr-present-id-extension-causes-presentation-failure-on-525-85-05-driver-with-vkd3d-proton-master/240536/1 "2023-01-24T22:49:44Z")

</div>

Hi; when an Optimus/Prime system is used with vkd3d-proton ( D3D12 to Vulkan translation layer that is used in Valve’s Proton and can be used on Wine as well ) with master branch of it, games fails to render anything on screen.

Using `VKD3D_DISABLE_EXTENSIONS=VK_KHR_present_id` environment variable makes the DX12 games renders correctly with vkd3d-proton.

When apps fails to render , log that is grabbed with `VKD3D_CONFIG=vk_debug` contains `0198:err:dxgi_vk_swap_chain_recreate_swapchain_in_present_task: Failed to create swapchain, vr -3.`.

When `VKD3D_DISABLE_EXTENSIONS=VK_KHR_present_id` is used, apps renders correctly and log from `VKD3D_CONFIG=vk_debug` contains `0198:info:dxgi_vk_swap_chain_recreate_swapchain_in_present_task: Got 3 swapchain images` instead of failure.

Can be easily reproduced within Steam with any DX12 game and using Proton Experimental as Proton build. Proton Experimental ships a fairly close to vkd3d-proton master build.

A further note; Nvidia actually tried to fix issues with that extension in 525.78.01 with `Fixed a bug where usage of VK_KHR_present_id could cause applications to crash with Xid 32 errors. ` . With 525.78.01 and newer apps doesn’t crash anymore when that extension is used but has presentation problems mentioned/explained above.

Nvidia bug report log:

[nvidia-bug-report.log](https://forums.developer.nvidia.com/uploads/short-url/pIMTXiRb6ryVRzgv6nRtBkobSaI.log) (20.2 MB)

---

<div class="post-metadata">

**Author:** ![amrits](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/amrits/32/14043_2.png) [@amrits](https://forums.developer.nvidia.com/u/amrits)\
**Post date:** [January 30, 2023, 10:19am UTC](https://forums.developer.nvidia.com/t/prime-setup-usage-of-vk-khr-present-id-extension-causes-presentation-failure-on-525-85-05-driver-with-vkd3d-proton-master/240536/2 "2023-01-30T10:19:17Z")

</div>

I have filed a bug 3958879 internally for tracking purpose.  
Shall try to reproduce issue locally and get back to you if require any additional information.

---

<div class="post-metadata">

**Author:** ![amrits](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/amrits/32/14043_2.png) [@amrits](https://forums.developer.nvidia.com/u/amrits)\
**Post date:** [February 10, 2023, 10:53am UTC](https://forums.developer.nvidia.com/t/prime-setup-usage-of-vk-khr-present-id-extension-causes-presentation-failure-on-525-85-05-driver-with-vkd3d-proton-master/240536/3 "2023-02-10T10:53:27Z")

</div>

I am seeing similar issue in Metro Exodus game where as soon as intro video ends, the game Metro Exodus turns into black screen completely.  
However I am getting XId 13 & 109 in dmesg logs where as your bug report doesn’t have such logs.

Acer Nitro AN515-45 + AMD Eng Sample: 100-000000300-40\_Y + Ubuntu 20.04.5 LTS + kernel 5.15.0-58-generic + NVIDIA GeForce RTX 3080 Laptop GPU + Driver 525.85.05

Can you confirm if you are also seeing similar behavior with Metro Exodus game and request you to share another bug report after repro state.

---

<div class="post-metadata">

**Author:** ![VulkanGuy](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vulkanguy/32/11251_2.png) [@VulkanGuy](https://forums.developer.nvidia.com/u/VulkanGuy)\
**Post date:** [February 10, 2023, 11:38am UTC](https://forums.developer.nvidia.com/t/prime-setup-usage-of-vk-khr-present-id-extension-causes-presentation-failure-on-525-85-05-driver-with-vkd3d-proton-master/240536/4 "2023-02-10T11:38:37Z")

</div>

1-) I don’t have that game.

2-) Metro Exodus is a Linux native game that uses Vulkan unless you force it to use Proton which then will use DX12 and therefore vkd3d-proton. Additionally Windows build of Metro Exodus has both DX11 and DX12. So you have to make sure you’re using DX12 as well as it won’t repro on DX11.

3-) Proton version is crucial. Vkd3d-proton in Proton Stable won’t repro the issue, you need Proton Experimental.

4-) A fairly small DX12 game and a free one:

https://store.steampowered.com/widget/1836450

@amrits

---

<div class="post-metadata">

**Author:** ![VulkanGuy](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vulkanguy/32/11251_2.png) [@VulkanGuy](https://forums.developer.nvidia.com/u/VulkanGuy)\
**Post date:** [February 12, 2023, 7:07pm UTC](https://forums.developer.nvidia.com/t/prime-setup-usage-of-vk-khr-present-id-extension-causes-presentation-failure-on-525-85-05-driver-with-vkd3d-proton-master/240536/5 "2023-02-12T19:07:32Z")

</div>

Even more easier reproductions steps ( no game download is needed ):

1-) [build: add demos as extra option · Iglu47/vkd3d-proton@0111835 · GitHub](https://github.com/Iglu47/vkd3d-proton/actions/runs/4147765351)

Download needed vkd3d\_proton\_demos from here.

2-) Add either ( problem is visible with either of them ) gears.exe or triangle.exe to Steam as a non Steam game. Click Add non Steam Game to Steam button in top left of Steam library view, select one of those demo exes. After that right click to that entry in Steam library-Properties-Force a Steam compatibility tool. Select Proton Experimental there.

3-) Make sure you launch them on Nvidia gpu by checking with nvidia-smi. If needed use NV prime render offload vars or vk icd filenames env variables.

4-) Run. Notice how they’re just not rendering anything. Close the demo.

5-) Add this as a launch option in Steam for the demo entry you’ve manually added.

` VKD3D_DISABLE_EXTENSIONS=VK_KHR_present_id %command%`

Run the deo and see how it renders correctly now.

---

<div class="post-metadata">

**Author:** ![amrits](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/amrits/32/14043_2.png) [@amrits](https://forums.developer.nvidia.com/u/amrits)\
**Post date:** [March 6, 2023, 2:57pm UTC](https://forums.developer.nvidia.com/t/prime-setup-usage-of-vk-khr-present-id-extension-causes-presentation-failure-on-525-85-05-driver-with-vkd3d-proton-master/240536/6 "2023-03-06T14:57:16Z")

</div>

@VulkanGuy  
Unfortunately, I am still not able to repro this issue so far on multiple setups as mentioned below after following repro steps mentioned in last comment.  
Both applications (gears and triangle) are rendering correctly.

Acer Nitro AN515-45 + AMD Ryzen 7 5700G with Radeon Graphics + Ubuntu 22.04.1 LTS + NVIDIA GeForce RTX 3080 + Driver 525.89.02 — prime setup  
Dell Alienware m17 + Intel(R) Core™ i7-8750H CPU @ 2.20GHz + Ubuntu 20.04 LTS + NVIDIA GeForce RTX 2060 + Driver 525.85.05 – prime setup  
HP OMEN by HP 25L Gaming Desktop GT15-0xxx + Ubuntu 20.04 LTS + NVIDIA GeForce RTX 3080 + Driver 525.85.05

---

<div class="post-metadata">

**Author:** ![VulkanGuy](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vulkanguy/32/11251_2.png) [@VulkanGuy](https://forums.developer.nvidia.com/u/VulkanGuy)\
**Post date:** [March 6, 2023, 7:50pm UTC](https://forums.developer.nvidia.com/t/prime-setup-usage-of-vk-khr-present-id-extension-causes-presentation-failure-on-525-85-05-driver-with-vkd3d-proton-master/240536/7 "2023-03-06T19:50:22Z")

</div>

Can you answer this question? Did you try it with Proton Experimental+ were you on hybrid mode aka both igpu and gpu are active?

---

<div class="post-metadata">

**Author:** ![VulkanGuy](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vulkanguy/32/11251_2.png) [@VulkanGuy](https://forums.developer.nvidia.com/u/VulkanGuy)\
**Post date:** [March 7, 2023, 10:30pm UTC](https://forums.developer.nvidia.com/t/prime-setup-usage-of-vk-khr-present-id-extension-causes-presentation-failure-on-525-85-05-driver-with-vkd3d-proton-master/240536/8 "2023-03-07T22:30:47Z")

</div>

Btw few more notes:

Behaviour described above gets worse on 530 driver; i have to disable extension on vkd3d-proton 2.8 now, on 525 it worked on 2.8 but failed on master. Now with 530 it even fails on vkd3d-proton 2.8

---

<div class="post-metadata">

**Author:** ![amrits](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/amrits/32/14043_2.png) [@amrits](https://forums.developer.nvidia.com/u/amrits)\
**Post date:** [March 8, 2023, 11:14am UTC](https://forums.developer.nvidia.com/t/prime-setup-usage-of-vk-khr-present-id-extension-causes-presentation-failure-on-525-85-05-driver-with-vkd3d-proton-master/240536/9 "2023-03-08T11:14:27Z")

</div>

I am using Proton Experimental + Hypbride mode only on my test system.

---

<div class="post-metadata">

**Author:** ![VulkanGuy](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vulkanguy/32/11251_2.png) [@VulkanGuy](https://forums.developer.nvidia.com/u/VulkanGuy)\
**Post date:** [March 8, 2023, 11:20am UTC](https://forums.developer.nvidia.com/t/prime-setup-usage-of-vk-khr-present-id-extension-causes-presentation-failure-on-525-85-05-driver-with-vkd3d-proton-master/240536/10 "2023-03-08T11:20:59Z")

</div>

[https://us.download.nvidia.com/XFree86/Linux-x86\_64/530.30.02/README/optimus.html](https://us.download.nvidia.com/XFree86/Linux-x86_64/530.30.02/README/optimus.html)

[https://us.download.nvidia.com/XFree86/Linux-x86\_64/530.30.02/README/randr14.html](https://us.download.nvidia.com/XFree86/Linux-x86_64/530.30.02/README/randr14.html)  
[https://us.download.nvidia.com/XFree86/Linux-x86\_64/530.30.02/README/primerenderoffload.html](https://us.download.nvidia.com/XFree86/Linux-x86_64/530.30.02/README/primerenderoffload.html)

Are you using an [X.org](http://X.org) conf like mentioned in the second link? I don’t as docs says there is no need to so i use Prime Render Offload env vars.

> A second alternative is to use PRIME render offload, such that the integrated graphics device is used to drive the X screen, but the NVIDIA GPU is used on a per-application basis to accelerate rendering of specific applications. For details, see [Chapter 35, _PRIME Render Offload_](https://us.download.nvidia.com/XFree86/Linux-x86_64/530.30.02/README/primerenderoffload.html)

---

<div class="post-metadata">

**Author:** ![amrits](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/amrits/32/14043_2.png) [@amrits](https://forums.developer.nvidia.com/u/amrits)\
**Post date:** [March 8, 2023, 1:03pm UTC](https://forums.developer.nvidia.com/t/prime-setup-usage-of-vk-khr-present-id-extension-causes-presentation-failure-on-525-85-05-driver-with-vkd3d-proton-master/240536/11 "2023-03-08T13:03:26Z")

</div>

I also tried without Xorg.conf file and using Prime Render Offload env vars but no luck in repro.  
Could you please share repro video once for reference so that I can compare steps tried on my setup.

---

<div class="post-metadata">

**Author:** ![VulkanGuy](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vulkanguy/32/11251_2.png) [@VulkanGuy](https://forums.developer.nvidia.com/u/VulkanGuy)\
**Post date:** [March 8, 2023, 2:02pm UTC](https://forums.developer.nvidia.com/t/prime-setup-usage-of-vk-khr-present-id-extension-causes-presentation-failure-on-525-85-05-driver-with-vkd3d-proton-master/240536/12 "2023-03-08T14:02:43Z")

</div>

[![](https://global.discourse-cdn.com/nvidia/original/3X/3/9/39b00c37c9576a0589d004530cc592037d21a793.jpeg "VK\_KHR\_present\_id issue") ](https://www.youtube.com/watch?v=rB-B_Lbu-es)

@amrits

---

<div class="post-metadata">

**Author:** ![generix](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/generix/32/16024_2.png) [@generix](https://forums.developer.nvidia.com/u/generix)\
**Post date:** [March 9, 2023, 11:49am UTC](https://forums.developer.nvidia.com/t/prime-setup-usage-of-vk-khr-present-id-extension-causes-presentation-failure-on-525-85-05-driver-with-vkd3d-proton-master/240536/13 "2023-03-09T11:49:44Z")

</div>

Looking at your logs, you’re using the “intel” DDX for the igpu, does it still reproduce when using the recommended “modesetting” DDX instead?

---

<div class="post-metadata">

**Author:** ![VulkanGuy](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vulkanguy/32/11251_2.png) [@VulkanGuy](https://forums.developer.nvidia.com/u/VulkanGuy)\
**Post date:** [March 20, 2023, 10:33pm UTC](https://forums.developer.nvidia.com/t/prime-setup-usage-of-vk-khr-present-id-extension-causes-presentation-failure-on-525-85-05-driver-with-vkd3d-proton-master/240536/14 "2023-03-20T22:33:56Z")

</div>

I did not deliberately set it to be that way. I have no configs in place to do that, i’m just using Prime Render Offload.

Besides; per readme what i do is a supported use case aka no fiddling.

> Configure the X Server

On systems with both an integrated GPU and an NVIDIA discrete GPU, the [X.Org](http://X.Org) X server version 1.20.7 and newer will automatically use NVIDIA’s PRIME render offload support if the system BIOS is configured to boot on the iGPU and no other explicit configuration files are present. Note that some Linux distributions (such as Ubuntu) may configure the X server differently. Please refer to your distribution’s documentation for details.

[https://us.download.nvidia.com/XFree86/Linux-x86\_64/530.30.02/README/primerenderoffload.html](https://us.download.nvidia.com/XFree86/Linux-x86_64/530.30.02/README/primerenderoffload.html)

I sadly don’t have time to fiddle with my system as of now and it is clear that a driver issue is in play rather than config as with 530 driver situation is worse.

---

<div class="post-metadata">

**Author:** ![an9949an](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@an9949an](https://forums.developer.nvidia.com/u/an9949an)\
**Post date:** [March 20, 2023, 10:58pm UTC](https://forums.developer.nvidia.com/t/prime-setup-usage-of-vk-khr-present-id-extension-causes-presentation-failure-on-525-85-05-driver-with-vkd3d-proton-master/240536/15 "2023-03-20T22:58:21Z")

</div>

This issue was unable to reproduce on stable proton because it had workaround for this case which was reverted by this commit (probably because it was reported as fixed in 525.78.01):

> <https://github.com/HansKristian-Work/vkd3d-proton/commit/d2c876211f1e4bd7d4177cc8f0102aabd2b7402d>
>
> This reverts commit ac7e7de701ad336887c1cb38f8adc4e588005962.
> 
> Works on latest s…table and latest Vulkan betas, little reason to keep
> this workaround around.
> 
> Signed-off-by: Hans-Kristian Arntzen \<post@arntzen-software.no\>

So, previously vkd3d was disable this vulkan extensions for nvidia driver by default.

---

<div class="post-metadata">

**Author:** ![VulkanGuy](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vulkanguy/32/11251_2.png) [@VulkanGuy](https://forums.developer.nvidia.com/u/VulkanGuy)\
**Post date:** [March 20, 2023, 11:01pm UTC](https://forums.developer.nvidia.com/t/prime-setup-usage-of-vk-khr-present-id-extension-causes-presentation-failure-on-525-85-05-driver-with-vkd3d-proton-master/240536/16 "2023-03-20T23:01:41Z")

</div>

With 530 driver problem also exposes itself in vkd3d 2.8 for me, with 525 latest it is only observable on vkd3d-proton master.

---

<div class="post-metadata">

**Author:** ![an9949an](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@an9949an](https://forums.developer.nvidia.com/u/an9949an)\
**Post date:** [March 20, 2023, 11:14pm UTC](https://forums.developer.nvidia.com/t/prime-setup-usage-of-vk-khr-present-id-extension-causes-presentation-failure-on-525-85-05-driver-with-vkd3d-proton-master/240536/17 "2023-03-20T23:14:05Z")

</div>

As I can see in commit I mentioned above it check the major driver version to be 525 and enable workaround if yes. So, on 530 driver it don’t enabled on any vkd3d version.  
It’s mean that probably nothing new was broken in 530.

---

<div class="post-metadata">

**Author:** ![VulkanGuy](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vulkanguy/32/11251_2.png) [@VulkanGuy](https://forums.developer.nvidia.com/u/VulkanGuy)\
**Post date:** [March 20, 2023, 11:17pm UTC](https://forums.developer.nvidia.com/t/prime-setup-usage-of-vk-khr-present-id-extension-causes-presentation-failure-on-525-85-05-driver-with-vkd3d-proton-master/240536/18 "2023-03-20T23:17:47Z")

</div>

Ah, right. I did miss that part.

> <https://github.com/HansKristian-Work/vkd3d-proton/pull/1477>
>
> Various users are reporting vr -3 errors on swapchain creation and there is no f…ix or known workaround.

There is currently a pending PR/draft for disabling it for any NV driver.

---

<div class="post-metadata">

**Author:** ![tjwmmd2](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/tjwmmd2/32/437424_2.png) [@tjwmmd2](https://forums.developer.nvidia.com/u/tjwmmd2)\
**Post date:** [March 25, 2023, 10:45pm UTC](https://forums.developer.nvidia.com/t/prime-setup-usage-of-vk-khr-present-id-extension-causes-presentation-failure-on-525-85-05-driver-with-vkd3d-proton-master/240536/19 "2023-03-25T22:45:41Z")

</div>

Hello! The bug still exists in driver “VIDIA-SMI 525.89.02 Driver Version: 525.89.02 CUDA Version: 12.0”.

It affects most/all DirectX 12 games running via VKD3D. The symptom: They hang at startup, freezing the entire computer for a few minutes at a time so that not even the mouse cursor can render, and then the game rolls smoothly for a little while, until it suddenly freezes the computer again.

But be aware… VKD3D coded a workaround to disable the broken Vulkan extensions in NVIDIA’s driver. So if you want to troubleshoot the issue and reproduce it internally, you need to build VKD3D from source and remove both of the bugfixes mentioned below:

> <https://github.com/HansKristian-Work/vkd3d-proton/issues/1389#issuecomment-1483937991>
>
> After recent proton updates I have black screen in all dx12 games (tested in cyb…erpunk, deep rock galactic, little nightmares 2). Game works (i hear the sound, even see in nvidia-settings that GPU busy and vram used) but no image. The same situation with Proton Ge 7.44+ .
> DirectX11 games work without issues, older proton versions also work as expected.
> 
> The problem can be fixed by adding launch options: \`VKD3D\_DISABLE\_EXTENSIONS=VK\_KHR\_present\_id,VK\_KHR\_present\_wait %command%\`.
> 
> Probably this is the \[commit\](https://github.com/HansKristian-Work/vkd3d-proton/commit/d2c876211f1e4bd7d4177cc8f0102aabd2b7402d) which produce such behavior.
> 
> Here is the \[issue\](https://github.com/ValveSoftware/Proton/issues/6472) on proton repo with detailed sysinfo and discussion.

There are two fixes for NVIDIA bugs there. The Vulkan present id/wait hang, and some queue/work related hang. Those bugs will be masked by VKD3D if you don’t remove those workarounds. :)

---

<div class="post-metadata">

**Author:** ![VulkanGuy](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/vulkanguy/32/11251_2.png) [@VulkanGuy](https://forums.developer.nvidia.com/u/VulkanGuy)\
**Post date:** [May 2, 2023, 11:11am UTC](https://forums.developer.nvidia.com/t/prime-setup-usage-of-vk-khr-present-id-extension-causes-presentation-failure-on-525-85-05-driver-with-vkd3d-proton-master/240536/20 "2023-05-02T11:11:23Z")

</div>

As a FYI; i won’t be able to test this issue further for any new potential fixes etc since i’ve built a desktop PC with AMD gpu and gave away my laptop ( device i reproduced the issue on ) to my brother with Windows installed in it.

So asking to people in the Github thread linked above for further testing would be better.

[Next page](https://forums.developer.nvidia.com/t/prime-setup-usage-of-vk-khr-present-id-extension-causes-presentation-failure-on-525-85-05-driver-with-vkd3d-proton-master/240536.md?page=2)
