Using Hybrid Graphics to play games with seamless GPU acceleration

Recently got a new motherboard (X670E Tomahawk) that supports Hybrid Graphics, and it works with Qubes OS.


Here is a picture of my games qube running Magic Arena in window mode, with the rendering being done by my 4060 GPU.

The GPU needs to be passed to the qube running the game, it doesn’t allow you to share the GPU with multiple qubes, it only allows you to use the GPU without having a dedicated display connected.

It doesn’t really require any extra configuration, applications using the vulkan driver are automatically moved to the GPU.

It also works with mixing AMD and Nvidia hardware, I’m using an AMD CPU with an Nvidia GPU.

7 Likes

Does it mean, that you passed GPU to the qube as a PCI device and get the rendered output not on external physical video-output connector (like DP or HDMI) but as a usual window visible inside dom0?

Yes, you set up the qube with GPU pass-through, and the GPU output is displayed in native dom0 windows, using the internal graphics.

Forwarding the dGPU to the iGPU seems to work in most games, but not all games work with Qubes OS mouse input and graphics. In one game, I had issues with hold down a mouse button to navigate. The screen size in Qubes OS also seems to cause issues, when using multiple displays and not running window mode.

1 Like

With nvidia, this can also work for non vulkan if you just use the PRIME rendering (requires to wrap a binary with some environment variables).

It’s new to me, sounds awesome!

About mouse - I recommend to connect additional one via USB and pass it to the qube. Because otherwise there is a know bug in Qubes OS of improperly processing relative/absolute mouse position.

1 Like

Is there a future timeframe within which this capability becomes (or planned to be become) real for qubesos users?

1 Like

This sounds very promising, maybe this is the answer to the last great hurdle I have with my Qubes OS install: being able to comfortably use GPU accelerated websites.

I’d love to know more about the security implications of doing this if anyone has more insight. Presumably you’re opening up any qubes you share the GPU with to compromising each other via the GPU, (even though only one qube is connected at a time). But would dom0 and friends also become more vulnerable, or would all other qubes be business at usual?

1 Like

Running a browser doesn’t work out of the box, but you might be able to make it work if you configure the GPU in xorg.conf.

Without any extra configuration, it only seems to be 3d application it’s able to automatically offload. Lutris will also tell you vulkan isn’t working, but it works just fine when you start a game.