Doom 2016 Vulkan renderer is broken since 440 drivers ( Optimus )

I was able to play this game with Vulkan renderer at 440 series drivers just fine. But with 450.66 driver and newer releases (i’m on 455.45.01 now and problem still exists) it has visual corruptions all over the place. Game doesn’t have any of those mentioned/shown issues with OpenGL renderer and id Software’s embedded performance metrics shows with OpenGL renderer driver reports VRAM as 4096 mb like it should be , but with Vulkan renderer it reports 4342 mb’s of VRAM.

I’m running the game via SteamPlay/Proton 5.0 on an Optimus laptop with these variables:

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia __VK_LAYER_NV_optimus=NVIDIA_only steam

Nvidia bug report and screenshot that shows the issue at main menu are attached. Also video footages that shows the issue are also attached.

nvidia-bug-report.log.gz (884.1 KB)

So at further investigation , i captured some faulty frames with Renderdoc. I will attach them here.

“directional occlusion” pass setting from the advanced settings menu of the game is the culprit. When it is on ( set to low , medium or high ) and any of the anti aliasing modes that involves usage of compute shaders ( like TAA , TSSA) are set , nearly everything is black , menu also flickers.

When “directional occlusion” pass is set to on but AA modes that doesn’t involve compute shader usage like FXAA , SMAA everything looks ok.

Example image from rdc capture:

Directional occlusion on - TSSA 8X on:

https://drive.google.com/file/d/14AjCFmO4rIcE_fDVPUZrnLt8YMi3_s-j/view?usp=sharing

Directional occlusion on - FXAA on:

https://drive.google.com/file/d/14TOX-xcrgOBUK5sHwDmJbwQULEAu0JJI/view?usp=sharing

I tried recreating issue on below configuration setup but no luck so far.

Acer Predator PH315-53 + Ubuntu 20.04 LTS + Geforce GTX 1650 + Driver 450.66

I launched steam using below command –
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia __VK_LAYER_NV_optimus=NVIDIA_only steam

And then changed Graphics API to Vulkan in Doom Advanced setting section but there were no corruption observed while playing game.

Could you please confirm if there were any other settings done at your end ?

Hi @amrits

My settings are simply like this:

This one says custom but it is just high preset+ Anisotropic is set to 8X. On high settings preset , it is set to 4x by default.Setting it to 8X makes it “custom”

Enabling/disabling usage of compute shaders ( it has an option for it at advanced options menu ) sometimes affects flickering issue that happens in main menu but that flickering is not always reproducible unlike the main issue i reported.

1-) My setup:

I didn’t mess,configure any Xorg.conf. Retrieved these from usr/share/x11

xorg.conf.d.tar.gz (2.2 KB)

2-) My output of xrandr --listproviders:

Providers: number : 2

Provider 0: id: 0x44 cap: 0x9, Source Output, Sink Offload crtcs: 3 outputs: 2 associated providers: 0 name:modesetting
Provider 1: id: 0x229 cap: 0x0 crtcs: 0 outputs: 0 associated providers: 0 name:NVIDIA-G0

3-) I have options nvidia-drm modeset=1 set in /etc/modprobe.d/zz-nvidia-modeset.conf

4-) My inxi -SMGxx output:

Graphics:

Device-1: Intel HD Graphics 630 vendor: ASUSTeK driver: i915 v: kernel
bus ID: 00:02.0 chip ID: 8086:591b
Device-2: NVIDIA GP107M [GeForce GTX 1050 Mobile] vendor: ASUSTeK
driver: nvidia v: 455.45.01 bus ID: 01:00.0 chip ID: 10de:1c8d
Display: x11 server: X.Org 1.20.8 driver: modesetting,nvidia
unloaded: fbdev,nouveau,vesa tty: N/A
OpenGL: renderer: Mesa Intel HD Graphics 630 (KBL GT2)
v: 4.6 Mesa 20.3.0 - kisak-mesa PPA direct render: Yes

As a last note , ( not sure if it makes any difference or sense ) but a screenshot from NV x-server settings. I wonder why it says X Screens:Screen 256 and Display Devices:None

the render is broken on my system too 1050 4GB only in offload mode
i you swtich to nvidia only the game will become playable so it’s an issue with nvidia offload(and maybe the 1050 4GB) and not whole render

Thanks for checking out. So GTX 1050 4 GB is problematic and repro tries should have done on such hw.

@amrits Maybe you want to check that out.

Any advancement on this?

With another Nvidia user ( Pascal GTX 1060 desktop) we are able to reproduce the issue.

To put it simply ; on Optimus setups app profiles doesn’t seem to be applying.On a desktop system (or any other unaffected system) modifying binary driver as to look for randombinary.exe instead of DOOMx64vk.exe will reproduce the issue. This behaviour also explains why issue below happens too. Same issue.

@amrits

Issue here is solved without changing driver.

On same driver ( 460.67) i can repro the issue if i launch the game with:

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia __VK_LAYER_NV_optimus=NVIDIA_only

However if i launch the game like this:

__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=bla

I can’t repro the issue.

Issue seems to be rooted from __GLX_VENDOR_LIBRARY_NAME=nvidia

Proton 5.13-6 , Nvidia driver 460.67, Intel HD 630+GTX 1050 Optimus setup, on-demand mode

Nice find. Does this also happen if you set

__GLX_VENDOR_LIBRARY_NAME=nvidia

but omit

__VK_LAYER_NV_optimus=NVIDIA_only

(setting both should be superfluous but working)

While i didn’t try this yet ( not at home currently) i would expect result to be same ( problematic) because in this state i would have to point nvidia icd to game in order to utilize NV gpu with it. Doom 2016 doesn’t offer any gpu selection and uses first available adapter. Which on many up to date multi gpu systems that means either using igpu or lavapipe. Which pointing out NV icd should have similar result to what NV only optimus layer does.

http://us.download.nvidia.com/XFree86/Linux-x86_64/460.67/README/primerenderoffload.html

https://github.com/KhronosGroup/Vulkan-Loader/pull/553

Will try with pointing icd method anyway, for testing sake.

@aplattner So, does NV QA people were able to repro and spot the root cause for this issue?

It seems like this issue is kinda widespread and on affected systems ( it does affect desktop systems too ) it causes any app specific driver workaround to not apply.

So more than a Doom 2016 specific problem, it is a general issue.

We were able to duplicate issue locally and engineering team is working for the fix.
I will keep updated and let you know once fix is available.

Awesome news. Thanks!

Issue has been debugged and fix will be incorporated in upcoming driver release.

Issue is fixed in the newly launched 470.42.01 Beta.

I can confirm issue got fixed on my end with 470.42.01 driver.

Running the game with Vulkan backend and
_NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia __VK_LAYER_NV_optimus=NVIDIA_only

on on-demand mode ( Prime render offload,hybrid ) doesn’t have visual issues posted above.

It is weird why a GL var caused it tho. Is there any explanation about why this bizarre issue happened? And it would also be weird if this is also only limited to most Prime render offload systems and some desktop systems too. On a desktop, NV only system __GLX_VENDOR_LIBRARY_NAME=nvidia also should be passed by driver itself.

It’s an app profile thing, fixed by this entry in the changelog:

  • Fixed a bug that could prevent the driver from applying application profiles when running applications through Proton or Wine on a PRIME Render Offload configuration.

I know, with another user we already reached to that conclusion and also possible solution idea came from that.

I just wanted to know why this issue was somehow specific to some systems ( for example Amrits here was not able to reproduce any of those issues with similar setups ) and how this same issue affected this person who claims he is on a desktop system.

The changelog description calls out PRIME Render Offload because that is the primary use-case where users would be expected to specify __GLX_VENDOR_LIBRARY_NAME=nvidia. The solution will take care of the issue for all affected configurations, even those without PRIME Render Offload.

1 Like

Thanks for the clarification.