Prime Render Offloading on a VM/Host Hotswap System

Extremely niche topic, I know, but this appears to be a very distro-specific thing so I was hoping to pick everyone’s brains.

I currently have a system with and AMD gpu (FX440) and an nvidia gpu (RTX4070). The nvidia drivers load at boot but are not grabbed by wayland or gnome because I have removed the nvidia platform egl spec and turned off modesetting for the nvidia driver. This lets me dynamically detach and reattach the nvidia gpu between the VM guest and the linux host without unloading the DM. I’m on the second-most-recent subversion of nvidia-g06-550.

But! Prime render offloading does not work. Attempting to run a vulkan application causes a segmentation fault. Attempting to run a a glx-related program results in the error:

X Error of failed request: BadAlloc (insufficient resources for operation)

(Yes I know I’m on wayland but I don’t know of any useful egl tests). There are several topics on r/VFIO about how to manage this precise setup, and the two major seem to be:

  1. Specify the VK ICD file in environment variables.

Neither of my two tumbleweed systems, one of which is a functioning optimus laptop, has the nvidia ICD. This is very confusing.

  1. Specify the vendor (nvidia) egl spec in environment variables.

Specifically, /usr/share/glvnd/egl_vendor.d/10_nvidia.json. Leaving this file causes wayland to attach a process to the nvidia card, which defeats the purpose of this exercise. And prime offloading for glx still doesn’t work.

The other issue is the presence of 10_nvidia_wayland.json in the egl vendor spec directory. This file doesn’t seem to do anything, as its presence does not bind any processes to the nvidia card and I get the same error when trying to offload a glx-related application.

The main thing that confuses me is the lack of a VK ICD. Even without it, when nvidia is driving a display I can run vulkan applications with offloading. But since it’s not there, when nvidia isn’t driving a display I can’t specify it in the environment variables to be loaded manually. This also seems like an unusual opensuse thing, so I was hoping someone here would have some insight.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.