Seamless GPU passthrough on Qubes OS with VirtualGL

do you have a guide for external GPUs via thunderbolt? Or is it very similar to GPU passthrough on internal GPUs?

I do not have a guide, my case died :frowning:

it works the same, but once you modify the grub config to hide the device, it won’t boot without the case connected (you would have to remove the according new parameters to boot without it, it’s annoying)

1 Like

died? oh dear? Did u bring it back to life?

No, I don’t know what’s wrong with this Razor Core X external GPU case, but the GPU does not show up when I connect it to a computer.

Does Steam with VirtualGL works for anyone?
The vglrun steam crashes for me but other apps work fine.
I’ve tried archlinux and debian templates - same issue.

Anyone here using an AMD GPU?
Got passthrough working, and virtualGL installed.

My grub:

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian
GRUB_CMDLINE_LINUX_DEFAULT=“quiet”
GRUB_CMDLINE_LINUX=“pci=nomsi”

perhaps I did not do it right for the whole MSI issue?

Previously had it as:

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian
GRUB_CMDLINE_LINUX_DEFAULT=“quiet pci=nomsi”
GRUB_CMDLINE_LINUX=“”

Which also didn’t work.

Currently its still indicating that it is still rendering using software.

Tried drivers from backport and official website(was advised by their support to use their Ubuntu drivers for the debian template) both lead to the vms crashing and updating to debian 13 lead to also such failures.

Looks like I might be able to do so tests with one above. What bothers me it doesn’t have an additional video output so everything goes back through thunderbolt. You have mentioned about discrete mode is it possible on Qubes OS ?

yes, once you have the nvidia driver working you can use PRIME rendering

I am using AMD, albeit in Fedora. Passthrough also seems to be working and VirtualGL is installed.
Whenever I try vglrun, this happens:

libEGL warning: Not allowed to force software rendering when API explicitly selects a hardware device.
Segmentation fault (core dumped)

May I know what GPU you used and if you got any errors when attempting to install the drivers?

Hi Solene, hope you are well.

I have a standalone template-based qube set up with prime

I am experiencing persistent screen tearing and was wondering if you ran into this or have any ideas what I could try

Thanks for any thoughts

Hi, I did not use GPU passthrough for a year I think, and I barely used it after getting it to work. I don’t remember if I had tearing :confused:

Maybe verify you have the compositor enabled in dom0’s xfce?

Has anybody got it working recently? I tried on R4.3, but I couldn’t get it working… In all the cases glxinfo -B still says it’s using llvmpipe (and in some cases it crashes trying to get that info…).

At this particular moment I’m mostly interested in getting hardware video decoding working specifically, but general acceleration with GPU passthrough would be nice.

The setup I tried is an Intel system, with discrete Nvidia 3060 GPU attached to a qube.

I don’t know if video decoding works, but VGL seems to be working for me

Qubes OS 4.2, Debian12 with an 4060 GPU, I think the Nvidia driver is from the nvidia repo.

user@vgl-test:~$ export VGL_DISPLAY=egl
user@vgl-test:~$ vglrun glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 16380 MB
    Total available memory: 16380 MB
    Currently available dedicated video memory: 15919 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce RTX 4060 Ti/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 575.57.08
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6.0 NVIDIA 575.57.08
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

user@vgl-test:~$

No issue on my side.

Qubes OS 4.2, archlinux with an 4080 GPU (~yukikoo/gpu_template - Auto install a templateVM suitable for GPU passthrough, using the archlinux community template - sourcehut git)

[user@jeux ~]$ vglrun glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 16376 MB
    Total available memory: 16376 MB
    Currently available dedicated video memory: 15703 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce RTX 4080/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 570.153.02
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6.0 NVIDIA 570.153.02
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

Didn’t tried R4.3

2 Likes

I eventually switched to solenes “prime” method, so my memory of the VirtualGL side of thing may be a little rusty, but If I remember correctly, I had found that Virtual GL seemed to work sometimes and not others. Some applications seemed to browse the available GL renderers, then pick whichever one they want (meaning some applications seemed to still use software rendering) (also note I’m still on 4.2)

I would recommend trying a variety of programs to test it out with. One good one is warzone2100, as it allows you to select between opengl, opengl-es, and vulkan drivers. It’s also obvious when it’s using software rendering (like 2 frames per second), and when it’s using hardware acceleration (smooth enough to play).

If I remember correctly, opengl-es was the one you want to choose if you have a option as sometimes it would work at a accelerated framerate when “OpenGL proper” would not.

2 Likes

Hi, I had a similar issue in this thread.

The last paragraph about TOLUD patch might be of interest to you.

Hi, on QubeOS 4.3 Rc2 this happens:

user@gaming-hvm:~$ vglrun glxinfo -B
name of display: :0
libEGL warning: Not allowed to force software rendering when API explicitly selects a hardware device.
Segmentation fault

When the VGL_DISPLAY environment variable isn’t set, it renders using llvmpipe. When it is set, the following happens. I am using AMD Radeon RX 6950 XT

Does anyone know a fix for this?

Found it.

When running vglrun glxinfo -B, libEGL warning: Not allowed to force software rendering when API explicitly selects a hardware device. references the environment variable LIBGL_ALWAYS_SOFTWARE.

This is set by qubes os within qubes-gui.(c)sh under /etc/profile.d

Disabling the profiles completely causes other issues. In my case steam wouldn’t start anymore.

I settled with providing the LIBGL_ALWAYS_SOFTWARE=0 on Lutris as a environment variable and it works perfect.

OpenGL acceleration works across multiple games as well es launching the Steam app.

For testing.
Running: LIBGL_ALWAYS_SOFTWARE=0 vglrun glxinfo -B should now show the right display adapter.