Jump to content

Video card passthrough for VM (and other doubts)


Recommended Posts

Hi everyone, it's my very first post so please accept apologies if this has been asked a lot already. I'm still familiarising with Unraid (loving it!) and the immense amount of documentation around, so sometimes I struggle finding answers 🙂

One of the first things I'm trying to understand is: can I passthrough the iGPU in my rig to use a VM? Aside many other things I'm doing with Unraid for storage, I stumbled across a old tutorial about running Lakka on Unraid as a VM. All the setup makes sense, but when I run the VM I get a black screen only, and I'm assuming this is because in theory the host machine has already taken control of the video out. Is that right?

 

So now my second thought would be attaching a cheap graphic card if this one can be "addressed" to Unraid and use the AMD integrated for other roles. Does this make sense? I read and I totally understand the "headless" philosophy of Unraid and in fact I'm perfectly ok in managing it from the web interface remotely...hence my doubt/question "why Unraid seems to take control of the GPU?" and "how can I break this chain and use the GPU somewhere else?"

 

Thanks for your patience and eventual support

Edited by tampano
Link to comment
17 hours ago, tampano said:

can I passthrough the iGPU in my rig to use a VM?

In general, yes, but success or not may depend on the mobo bios.

 

17 hours ago, tampano said:

but when I run the VM I get a black screen only

Try to isolate the igpu and its audio part, bind to vfio at boot; then assign it to the vm (both the video and audio parts); you may need to use acs override patch in unraid to split iommu groups so to have igpu video and audio in their own iommu groups without any other devices.

If you still get a black screen further debugging is needed, most of the time it's because unraid is booted in uefi and the primary card (igpu) is attached to efifb in unraid. Simply disable efifb (video=efifb:off) in your syslinux configuration (search the forum, there are a lot of posts about it).

You may need to add to the vm xml also the vbios of the igpu.

 

17 hours ago, tampano said:

So now my second thought would be attaching a cheap graphic card if this one can be "addressed" to Unraid and use the AMD integrated for other roles.

You can, but success or not depends if your mobo as a bios setting to set the primary card; with an additional discrete card, if you have the option in bios, set the discrete card as primary instead of the igpu. Then the above remains valid (bind to vfio the igpu).

 

17 hours ago, tampano said:

"why Unraid seems to take control of the GPU?" and "how can I break this chain and use the GPU somewhere else?"

It's the kernel that seems to attach the gpu to efifb or vesafb (depending if you're booting unraid in uefi or legacy bios mode). Replied above to disable efifb.

Edited by ghost82
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...