iGPU configuration recap


Go to solution Solved by SimonF,

Recommended Posts

Hello everyone!

After a couple of weeks of fiddling and testing, following a lot of guides and topics on this forum, I think I can say I have reached a "stable" server.

 

I wanted to have some confirmations regarding GPU and iGPU usages, since I have read too many posts from various times so I would like to know if I have understood correctly everything. Keep in mind that what I'm saying and asking is referring to Unraid version 6.12.8 and I only have an integrated GPU.

  1. Intel GPU drivers are now automatically enabled. (In fact I have video output from the hdmi port, not that I use it).
  2. BUT I have to install intel_gpu_top to be able to view the stats in the dashboard with the GPU statistics plugin. (In fact I have both of them installed).
  3. To enable QuickSync transcoding (and nothing more) in a docker, since now intel GPU drivers are automatically loaded on boot, I just have to add a new device and point it to "/dev/dri" and eventually select the right option inside the docker application (for example on Plex enable "use hardware decoding"). I can do this for multiple dockers and they can share the same iGPU at the same time without problems.
  4. At the same time, I can assign the iGPU to multiple VMs, but only one of that can boot at the time and use the GPU. This is necessary if I want to do use that gpu at all, from HW transcoding to do 3D rendering. Am I right? 
    Also I'm not sure if at the same time I can run an hardware transcode using the Plex configured at the point 3.
  5. I could, theoretically, install the plugin "Intel-GVT-g" and enable it by adding a line in /etc/modprobe.d/i915.conf. By doing so I would disable the existing intel drivers but I would be able to virtually split the iGPU and assign it to multiple VMs and use it at the same time.
    Would that preclude me to use the HW transcoding on the Plex configured at the point 3?
  6. Plugging a dummy HDMI to an iGPU port helps to mitigate a lot of issues, so it's nice to have it.
  7. If you add a discrete GPU you can dedicate it to one or more VM, following the same rules of the point 4 (so it can be configured to multiple VMs but it can be used by one at the time). Also here having a dummy plug helps.


Did I understood everything correctly? If I just want to have a Plex server and maybe another transcoding docker, do I have only to follow steps 1,2,3 and 6?

 

I'm asking all of this because by following multiple guides I found myself disabling drivers, adding files, enabling and disabling GVT-d only to realize that I was following out of date information or guides that weren't really for my use case. 

 

Thanks a lot to everyone in advance!

Edited by gabrieleancora
Link to comment

1 and 3:  to enable the igpu for use with docker containers, you need to blacklist it by creating the i915.conf file

4 and 5- you can add the igpu to any VM, but you can only run 1 VM at a time that uses the igpu. Also, if your VM is using the igpu and a docker container attempts to use it as well, the host will crash

 

  • Thanks 1
Link to comment

Thanks for the quick answer! I won’t assign a gpu to both a docket and a vm to avoid troubles.

But I’m not sure why would I need to disable the intel igpu drivers: I do already see the entries in /dev/dri (as far as I have understood from here the drivers are loaded already:

 

so why would I unload the drivers by putting the file in /etc/modprobe.d? Aren’t the driver used by the docker themselves? 

Link to comment
10 hours ago, gabrieleancora said:

so why would I unload the drivers by putting the file in /etc/modprobe.d? Aren’t the driver used by the docker themselves? 

 

Sorry, I meant they're blacklisted from the kernel by default. To enable them, you need to create the file corresponding to the driver on your USB boot device

 

Quote

GPU Driver Integration

Unraid OS now includes selected in-tree GPU drivers: ast (Aspeed), i915 (Intel), amdgpu and radeon (AMD).  For backward compatibility, these drivers are blacklisted by default via corresponding conf files in /etc/modprobe.d:

/etc/modprobe.d/ast.conf
/etc/modprobe.d/i915.conf
/etc/modprobe.d/amdgpu.conf
/etc/modprobe.d/radeon.conf

Each of these files has a single line that blacklists the driver, preventing it from being loaded by the Linux kernel.

It is possible to override the settings in these files by creating a custom conf file in the config/modprobe.d directory on your USB flash boot device.  For example, to un-blacklist the amdgpu driver create an empty file by typing this command in a Terminal session:

touch /boot/config/modprobe.d/amdgpu.conf

This only needs to be done once, it does not need to be added to your go script.

In 6.9.1, if your go script contains a modprobe command for your GPU and/or a command to fix the permissions on /dev/dri, you should remove them:

modprobe amdgpu
chmod -R 777 /dev/dri

In 6.9.0, if the docker you are using is unable to access the GPU, add/keep this line to your go script:

chmod -R 777 /dev/dri

but remove this one:

modprobe amdgpu

 

Link to comment
3 minutes ago, Michael_P said:

 

Sorry, I meant they're blacklisted from the kernel by default. To enable them, you need to create the file corresponding to the driver on your USB boot device

 

 

That was changed to load drivers by default. I think was in early 6.10 series.

  • Thanks 2
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.