December 3, 20232 yr Hi everyone, After long search of forums, reddit, discord and github finally have a working method to get AMD iGPU to work with Plex Container for HW Transcoding. Thanks to multiple unraid members in different channels as this is a consolidated working solution from different sources. Requirements Plex Pass (Important) AMD Processor with iGPU Radeon-TOP plugin by ich777 (Enables AMD GPU for unraid) GPU Statistics plugin by b3rs3rk (Helps monitoring GPU usage) Unraid version 6.9.x and above Steps Go to Apps > Search for Plex > Select binhex-plexpass app > Click Install Add the following variables by clicking + Add another Path, Port, Variable, Label or Device option Variable 1 Config Type : Device Name : /dev/dri Value : /dev/dri Variable 2 Config Type : Path Name : /usr/share/libdrm Container Path : /home/runner/actions-runner/_work/plex-conan/plex-conan/.conan/data/libdrm/2.4.120-0/plex/main/build/73ee780ba6ea3ef381da6e7f229c475bfaf477ca/meson-install/share/libdrm/ Host Path: /usr/share/libdrm Access Mode: Read Only 3. Click Apply and wait for the docker container to be created 4. Open plex server page by slecting webui option 5. Go to Settings > Transcoder 6. Enable Use hardware acceleration when available & Use hardware-accelerated video encoding options 7. Select Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] option in Hardware transcoding device drop-down menu 8. Click Save Changes (Maybe a restart of Container can also be done after applying changes) 9. Tada.! HW Encoding works Was able to run 4 4k HDR/DoVi -> 1080p SDR @ 20Mbps streams or 8 1080p -> 720p streams with 5700G before Memory was full System Spec of the test server which is used for the guide Processor : AMD Ryzen 7 5700G Motherboard : MSI B550M PRO-VDH WIFI RAM : Team Group 16 GB @ 3200 MHZ x 4 (64 GB) Storage : 2 x 1 TB Samsung 980 4 x 4 TB WD Blue 5400 RPM Power Supply : Cooler Master G800 GOLD Edited January 23, 20251 yr by itsmemac Updated libdrm path
February 8, 20242 yr Thanks for this. This explains and helps fix the issue I had on my Debian server running Plex as a Container on Docker. I followed the steps to add the volume to my container and I no longer get the error and it appears that my transcoding now works as it should. I've shared this fix with someone on the Plex forums since I couldn't locate ANY mention of this anywhere on there.
February 9, 20242 yr Author 10 hours ago, DanGarion said: Thanks for this. This explains and helps fix the issue I had on my Debian server running Plex as a Container on Docker. I followed the steps to add the volume to my container and I no longer get the error and it appears that my transcoding now works as it should. I've shared this fix with someone on the Plex forums since I couldn't locate ANY mention of this anywhere on there. Hi, Yes, this error fix was not documented anywhere since not many tried using AGPU for transcoding in Plex I had to do multiple trial and error fix (including building my own plex container from scratch) before arriving at this solution libdrm was present already in host system and simply mounting the library fixed this error and transcoding started to work without any further issues. Though this is a temp fix for the error until image creators include this in their future images Edited February 9, 20242 yr by itsmemac add info
March 21, 20242 yr I had issues with this workaround for AMD, I could not get Plex to work at all the minute I added the device. I found a thread that mentionned using this instead: /dev/dri/renderD128:/dev/dri/renderD128 This worked number one and I can easily HW transcode 4/5 videos. I have an AMD Ryzen 9 7900X. https://medium.com/@liviustefanesq/leveraging-amd-gpu-power-on-unraid-for-plex-media-server-dd500d64f70b
June 4, 20242 yr got it working with a 8700G, 2 Streams 4k to 1080 GPU Load says 14% but CPU 0-4 all spike to 70%. Plex dashboard does say HW transcoding. is this normal? Edited June 4, 20242 yr by mike_2246
June 5, 20242 yr Author 9 hours ago, mike_2246 said: got it working with a 8700G, 2 Streams 4k to 1080 GPU Load says 14% but CPU 0-4 all spike to 70%. Plex dashboard does say HW transcoding. is this normal? Its your subtitles and audio Both are still encoded using CPU hence there will be CPU usage even though HW encoding is used where just video encoding is offloaded to GPU Use better subtitles format Turn off subtitle and see the CPU usage going down
June 6, 20242 yr ok, Thanks. no subtitles but didn't expect audio transcoding to spike 4 cpu cores to 70% on 1 transcode. If I use my P2200 my cpu stays below 10%
September 5, 20241 yr Author Update : it seems the plex image was update and libdrm path is changed If you are facing issue with AMD GPU HW Transcoding, update the path to the path from the container log file Error will be something like this Quote /home/runner/actions-runner/_work/plex-conan/plex-conan/.conan/data/libdrm/2.4.120-0/plex/main/build/73ee780ba6ea3ef381da6e7f229c475bfaf477ca/meson-install/share/libdrm/amdgpu.ids: No such file or directory So the container path will be /home/runner/actions-runner/_work/plex-conan/plex-conan/.conan/data/libdrm/2.4.120-0/plex/main/build/73ee780ba6ea3ef381da6e7f229c475bfaf477ca/meson-install/share/libdrm/ Monitor your plex log and see if there is error in future and update it accordingly Edited January 23, 20251 yr by itsmemac update libdrm
January 22, 20251 yr Updated plex today and got the dreaded error again: 2025-01-22 17:44:49,081 DEBG 'plexmediaserver' stderr output: /home/runner/actions-runner/_work/plex-conan/plex-conan/.conan/data/libdrm/2.4.120-0/plex/main/build/73ee780ba6ea3ef381da6e7f229c475bfaf477ca/meson-install/share/libdrm/amdgpu.ids: No such file or directory Path in the container path is already updated to /home/runner/actions-runner/_work/plex-conan/plex-conan/.conan/data/libdrm/2.4.120-0/sixones/update-expat/build/73ee780ba6ea3ef381da6e7f229c475bfaf477ca/meson-install/share/libdrm/ but it still throws the error up there. Any insight/help?
January 22, 20251 yr Author 34 minutes ago, MellowB said: Updated plex today and got the dreaded error again: 2025-01-22 17:44:49,081 DEBG 'plexmediaserver' stderr output: /home/runner/actions-runner/_work/plex-conan/plex-conan/.conan/data/libdrm/2.4.120-0/plex/main/build/73ee780ba6ea3ef381da6e7f229c475bfaf477ca/meson-install/share/libdrm/amdgpu.ids: No such file or directory Path in the container path is already updated to /home/runner/actions-runner/_work/plex-conan/plex-conan/.conan/data/libdrm/2.4.120-0/sixones/update-expat/build/73ee780ba6ea3ef381da6e7f229c475bfaf477ca/meson-install/share/libdrm/ but it still throws the error up there. Any insight/help? You have the incorrect path sixones/update-expat -> plex/main the error message is asking for plex/main and not sixones/update-expat
January 22, 20251 yr Hm, then nothing really changed with the update and I wonder why I got the error again... Either way, the other part was a missunderstanding on how this works on my part and I tried to use the path to the amdgpu.ids file in the container itself... makes more sense now and after updating the path again it works now, thanks!
January 11Jan 11 (Solved) Ok I'm not having any luck with this. It sees the GPU in my plex settings and even shows a slight spike on my GPU when I start a transcode but then drops to 0% on the GPU and CPU stays spiked.I am using the linuxserver/plex version instead of the binhex version so not sure if maybe that's why. Also how can I tell the correct location for the libdrm folder.Solution: Stop being stupid and realize where to get the proper folder from lol. I had the libdrm folder incorrect. Also it seems if you have the checkbox for "Use hardware-accelerated video encoding" checked it seems it might not use hardware for either the decode or the encode for some reason. My guess is because my device is set to something my iGPU can't handle. But disabling that still dropped my CPU usage drastically for a 4k to 1080 transcode. I did also have to disable the HDR tone mapping to resolve the stutter issue for 4k HDR videos. Edited January 11Jan 11 by Reallango
May 12May 12 Sorry to Necro but I am having issues getting this to run.I have followed the instructions to the letter and now when I try to transcode anything, the unraid log gives a segfault (sample below)Direct Play works perfectly.I am using lscr.io/linuxserver/plex dockerAMD Ryzen 7 5700G with Radeon Graphics @ 3800 MHz - Build is an HL4 from 45homelab.Where am I going wrong?May 12 17:10:52 GibsonMini kernel: mux0:stream_seg[942897]: segfault at 54 ip 000015203239726c sp 0000152024671570 error 4 in libavformat.so.60[19626c,1520322d0000+208000] likely on CPU 0 (core 0, socket 0)May 12 17:10:52 GibsonMini kernel: Code: 44 24 10 45 31 ed eb 22 48 83 c3 1c 48 8b 47 18 4c 8b af c8 00 00 00 4c 39 e8 44 0f 47 e8 44 2b 6f 08 49 89 ff 48 89 5c 24 10 <8b> 47 54 89 44 24 0c 85 c0 0f 88 1d 01 00 00 83 7c 24 60 00 74 3bEDIT: A new error has been found in the Plex Server Logs: /home/runner/_work/plex-conan/plex-conan/.conan/data/libdrm/2.4.120-6/plex/main/build/678777ee2ca8706ca90cf805e0dd88235f6d7f05/meson-install/share/libdrm/amdgpu.ids: No such file or directoryEDIT2: GPU usage climbs up by a percent for a second and drops to nothing when transcoding. Edited May 12May 12 by urbanracer34
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.