Vulkan behaving incorrectly after upgrading to Fedora 35

Hello,

After upgrading to Fedora 35 from Fedora 34 I noticed that my games (which I run through wine) were using lavapipe. Since I didn’t know what to do, I removed lavapipe’s icd files from usr/share/vulkan, but that didn’t solve the issue (gpu utilisation was still 0%).

I then tried reinstalling the nvidia driver, but this too didn’t solve the problem.
I noticed that running either

vkcube
__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only vkcube 
__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=non_NVIDIA_only vkcube

gives me the same output, namely

MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

Selected GPU 1: NVIDIA GeForce GTX 1050 Ti, type: 2

What’s strange is that launching The Witcher 3 through wine and DXVK shows 0% gpu utilisation regardless of the parameters I add.

I also noticed that glxgears doesn’t seem to have this issue. Running

glxinfo | grep vendor correctly reports the intel GPU, and adding __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia will show the nvidia GPU.

So this issue looks limited to vulkan only.

I have attached the nvidia bug report. I am using Gnome 41 on x11 and nvidia driver 495.44 from rpmfusion.

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

Does

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia vkcube

work?

Hello,

I had to create a new account since the old one was made with a temporary mail that expired, sorry for the inconvenience.

Yes, it does work in that vkcube runs and nvidia-smi shows the corresponding process. But it still shows:

MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

Selected GPU 1: NVIDIA GeForce GTX 1050 Ti, type: 2

But this also happened when I ran the commands I mentioned in my first message.

Ok. Does

__VK_LAYER_NV_optimus=NVIDIA_only __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia vkcube

only use the nvidia ulkan layer, i.e. the mesa warning is suppressed?
Seems something is wrong with env variable processing. Do you remember which driver version you had in F34?

No, it’s the same output.

It was 470.74, since Fedora 34 never had the 495.xx drivers (I checked it on rpmfusion).

Edit: I did more testing, and discovered some new things.

Running “wine witcher3.exe” from the terminal gives me this:

info: D3D11CoreCreateDevice: Probing D3D_FEATURE_LEVEL_11_0
info: D3D11CoreCreateDevice: Using feature level D3D_FEATURE_LEVEL_11_0
info: Device properties:
info: Device name: : Intel(R) HD Graphics 630 (KBL GT2)
info: Driver version : 21.2.5

So it seems like it’s running on the igpu (which explains the terrible performance).

Now if I run DXVK_FILTER_DEVICE_NAME=“1050” wine witcher3.exe then this will make it run on the dgpu. Using “__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only” won’t change anything i.e. the game will still use the intel gpu.

But the vkcube issue persists. Regardless of the parameters, it seems to run on the nvidia card exclusively.

The ticket on rpmfusion’s bugzilla was closed, and they said it was a problem with the vulkan loader. (https://bugzilla.rpmfusion.org/show_bug.cgi?id=6123).

There is another user which seems to have a problem with vulkan, but I don’t know if it’s the same. (https://bugzilla.rpmfusion.org/show_bug.cgi?id=6128)

And then there is another issue that I encounter with Firefox in wayland that might be of interest. Basically when launching Firefox on wayland, it gets killed by SIGSEGV. And there is a problem with the Gpu, because about:support shows this string:

(#0) Error	No GPUs detected via PCI
(#1) Error	glxtest: process failed (received signal 11)

Another person made a thread on reddit about it - reddit.com/r/Fedora/comments/qlsycu/totem_cheese_crashing_in_wayland_after_updating, so it seems like it’s an issue that affects multiple users.