[Support] Linuxserver.io - Plex Media Server


Recommended Posts

Hi All,

 

Need a little direction please.  Currently, I have everything working with with a GTX1060.  All works well!  I want to switch to the Intel GPU and use the 1060 for a VM.  I have pulled down a new linuxserver plex docker (named differently plex2) and setting up Intel quick sync on it.   No luck.  It does not show "hw" after I complete all steps.  I can switch back to plex1 and all is well working with the GTX 1060. 

 

Any help would be appreciated. Thanks in advance!

 

root@Server:~# cd /dev/dri
root@Server:/dev/dri# ls -l
total 0
drwxrwxrwx 2 nobody users      120 Dec 27 22:08 by-path/
crwxrwxrwx 1 nobody users 226,   0 Dec 27 14:51 card0
crwxrwxrwx 1 root   video 226,   1 Dec 27 22:08 card1
crwxrwxrwx 1 nobody users 226, 128 Dec 27 14:51 renderD128
crwxrwxrwx 1 root   video 226, 129 Dec 27 22:08 renderD129

 

Intel Xeon E3-1225 v5, 3.7 GHz

Link to comment
5 minutes ago, drugdoctor said:

I want to switch to the Intel GPU and use the 1060 for a VM.  I have pulled down a new linuxserver plex docker (named differently plex2) and setting up Intel quick sync on it.   No luck.  It does not show "hw" after I complete all steps

 

What does "complete all steps" mean? 

 

Have you done everything listed in this guide?

 

It looks like modprobe i915 is loading the necessary drivers so that is a good start.

Link to comment

 

13 hours ago, Hoopster said:

 

What does "complete all steps" mean? 

 

Have you done everything listed in this guide?

 

It looks like modprobe i915 is loading the necessary drivers so that is a good start.

That is correct!  I have completed everything on the guide as instructed.  It doesn't hardware transcode ("hw") with intel.

 

I added a  dummy HDMI doo-dad and this this did not change result.

Edited by drugdoctor
Link to comment
30 minutes ago, drugdoctor said:

 

That is correct!  I have completed everything on the guide as instructed.  It doesn't hardware transcode ("hw") with intel.

 

I added a  dummy HDMI doo-dad and this this did not change result.

The key steps are:

1. Make sure the iGPU is the primary graphics adapter in the BIOS (normally i915 drivers will not load if iGPU is not primary so it appears this is done)

2. Load i915 drivers - working

3. Pass /dev/dri through to the Plex server as either extra parameters (I do it this way) or as a device in the container configuration.

4. Enable hardware acceleration in the Plex server itself in the Transcoder setup.

 

It looks like you have 1 and 2 covered so it is probably failing somewhere in 3 or 4.  If the checkbox for hardware acceleration is selected in Transcoder setup, the problem is likely something with step 3.

 

If you look at the Plex docker container run command for Plex 2, does it appear to be passing the device successfully?

 

 

Link to comment

 

6 hours ago, Hoopster said:

The key steps are:

1. Make sure the iGPU is the primary graphics adapter in the BIOS (normally i915 drivers will not load if iGPU is not primary so it appears this is done)

2. Load i915 drivers - working

3. Pass /dev/dri through to the Plex server as either extra parameters (I do it this way) or as a device in the container configuration.

4. Enable hardware acceleration in the Plex server itself in the Transcoder setup.

 

It looks like you have 1 and 2 covered so it is probably failing somewhere in 3 or 4.  If the checkbox for hardware acceleration is selected in Transcoder setup, the problem is likely something with step 3.

 

If you look at the Plex docker container run command for Plex 2, does it appear to be passing the device successfully?

 

 

Plex1 (intel) does not hw transcode. I have the following in the extra parameters "--device=/dev/dri" and the transcode box is checked. For Plex2, it successfully transcodes with the nvidia graphics filled out as the Docker states to. I see "hw" when changing 1080p movie to 720p. Do not see this with Plex1.

 

Link to comment

Edit: Solved (sort of). I upgraded to Unraid 6.9.0-rc2 and followed the directions here to unblacklist the i915 gpu. I didn't do anything else except for add /dev/dri device passthrough to the Plex container as per lotetreemedia guide below (the /dev/dri directory already exists!). Basically it just works out the gate! Nice to see my cpu hovering below 40% :)

 

Hi, hopefully I'm not hijacking the thread from anyone.

  • Unraid 6.8.3
  • Linuxserver/plex:latest
  • J5040
  • Plex Pass 
  • Use hardware acceleration when available is enabled.
  • Onboard GPU is enabled in BIOS

 

I am having issues with enabling hw transcode. I followed the guide here: 

I may have had tired eyes late at night, but starting from a blank slate (had not previously installed a plex docker container) I followed the above directions and got the (hw) to show up when transcoding. After a reboot (I modified the /boot/config/go as suggested in the guide) it wasn't working any more. Since then I've tried running through the steps again, removing and reinstalling the container, deleting the plex appdata and using different plex containers. It's been really frustrating since I think I had it working the very first time...

Here are the steps I took:

Linux 4.19.107-Unraid.
root@Tower:~# cd /dev/dri
-bash: cd: /dev/dri: No such file or directory
root@Tower:~# modprobe i915
root@Tower:~# cd /dev/dri
root@Tower:/dev/dri# ls
by-path/  card0  renderD128
root@Tower:/dev/dri# chmod -R 777 /dev/dri
root@Tower:/# docker exec -it plex bash
root@Tower:/# cd /dev/dri
root@Tower:/dev/dri# ls -la
total 0
drwxr-xr-x 2 root root                80 Dec 30 16:32 .
drwxr-xr-x 6 root root               360 Dec 30 16:32 ..
crwxrwxrwx 1 root videoYn41fhzr 226,   0 Dec 30 16:32 card0
crwxrwxrwx 1 root videoYn41fhzr 226, 128 Dec 30 16:32 renderD128

I then added the /dev/dri Device to the Docker container and started it. As you can see, no hardware decoding and cpu is between 80% and 100%.

image.png.f74920d284bebf7dda74069cc59ba4f5.png

This is from my plex log

Main 10 profile bitstream
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Decoding SPS
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Main 10 profile bitstream
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Decoding VUI
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Decoding PPS
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Format vaapi_vld chosen by get_format().
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Format vaapi_vld requires hwaccel initialisation.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Considering format 0x30313050 -> p010le.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Picked p010le (0x30313050) as best match for yuv420p10le.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Created surface 0.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Direct mapping possible.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Created surface 0x1.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Created surface 0x2.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Created surface 0x3.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Created surface 0x4.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Created surface 0x5.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Created surface 0x6.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Created surface 0x7.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Created surface 0x8.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Created surface 0x9.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Created surface 0xa.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Created surface 0xb.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Created surface 0xc.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Created surface 0xd.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Created surface 0xe.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Created surface 0xf.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Created surface 0x10.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Created surface 0x11.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Created surface 0x12.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Created surface 0x13.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Considering format 0x30313050 -> p010le.
Dec 30, 2020 12:53:49.611 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Picked p010le (0x30313050) as best match for yuv420p10le.
Dec 30, 2020 12:53:49.613 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Decode context initialised: 0x16/0x10000000.
Dec 30, 2020 12:53:49.614 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Param buffer (type 0, 604 bytes) is 0.
Dec 30, 2020 12:53:49.614 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Slice 0 param buffer (264 bytes) is 0x1.
Dec 30, 2020 12:53:49.614 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Slice 0 data buffer (47 bytes) is 0x2.
Dec 30, 2020 12:53:49.614 [0x14fa9c7cf700] DEBUG - [Transcode] [FFMPEG] - Decode to surface 0x13.
Dec 30, 2020 12:53:49.615 [0x14fa9c7cf700] ERROR - [Transcode] [FFMPEG] - Failed to end picture decode issue: 23 (internal decoding error).
Dec 30, 2020 12:53:49.615 [0x14fa9c7cf700] ERROR - [Transcode] [FFMPEG] - hardware accelerator failed to decode picture

plexserverlog.txt

Edited by lessismore
Link to comment

I know I asked this earlier but never got any answer so here we go again: How can I get custom fonts working for Plex docker? I have many shows with .ass subtitles and TrueType font files to go with them but no idea where to copy them? When the custom fonts are embedded in mkv-file they work but is there a way to get them to work without modding the video file?

Link to comment

Dear,

 

I have setup my Unraid/Plex a few months ago, asuming all was running smoothly.

I never had issues trancoding videos and all playback was good.

After I now started to include some 80-90mbps 4k UHD videos things went south.

My CPU load is immense when streaming, so I figured something was not right.

 

When I open (watch every 0.5s) 'nvidia-smi' in my docker's console, I see it finds my p2000:

https://i.ibb.co/HG5KHfs/docker.jpg

 

However, when I start transcoding something, nothing happens on the GPU, also, in Plex I do not see the 'hw' suffix, so I guess that's what makes my CPU suffer 🙂

 

If I remember correctly, I also altered some Plex config files, to actually let Plex use the GPU.

Maybe I made a mistake here, I dunno.. I'd like to check, but cannot find a good/right tutorial for this part.

 

Is there anyone who can advise which files to check for what content, or what else to check?

 

As my container does see the p2000 (see screenshot above) I guess the underlaying settings are correct.

To be sure, I made some more screenshots though:

Settings for container in Docker (GPU ID is corrrect)

Plex settings

What I see in Plex when a users video is being transcoded (this i find funny, I do see 'HW' but the load on nvidia-smi remains 0 and my CPU usage bumps up.

 

I know the plugin has recently been revoked, but as I already have it installed I should be ok.. Right?

 

Thanks in advance for all your help!

 

Regards,

 

Martin

Link to comment
4 hours ago, MMTim said:

Dear,

 

I have setup my Unraid/Plex a few months ago, asuming all was running smoothly.

I never had issues trancoding videos and all playback was good.

After I now started to include some 80-90mbps 4k UHD videos things went south.

My CPU load is immense when streaming, so I figured something was not right.

 

When I open (watch every 0.5s) 'nvidia-smi' in my docker's console, I see it finds my p2000:

https://i.ibb.co/HG5KHfs/docker.jpg

 

However, when I start transcoding something, nothing happens on the GPU, also, in Plex I do not see the 'hw' suffix, so I guess that's what makes my CPU suffer 🙂

 

If I remember correctly, I also altered some Plex config files, to actually let Plex use the GPU.

Maybe I made a mistake here, I dunno.. I'd like to check, but cannot find a good/right tutorial for this part.

 

Is there anyone who can advise which files to check for what content, or what else to check?

 

As my container does see the p2000 (see screenshot above) I guess the underlaying settings are correct.

To be sure, I made some more screenshots though:

Settings for container in Docker (GPU ID is corrrect)

Plex settings

What I see in Plex when a users video is being transcoded (this i find funny, I do see 'HW' but the load on nvidia-smi remains 0 and my CPU usage bumps up.

 

I know the plugin has recently been revoked, but as I already have it installed I should be ok.. Right?

 

Thanks in advance for all your help!

 

Regards,

 

Martin

If you have modified any config files, you have probably messed up something. There is no reason to modify any config files to get hardware transcoding working.

You could try to disable both transcoding options, restart the container and then enable it again and restart the container.

  • Like 1
Link to comment

Hi, did not make any difference. I used the examples from a youtuber named bite my bits (https://www.youtube.com/watch?v=bz16M67z0uM), who said to rename the 'Plex Transcoder' file to 'Plex Transcoder' and create a new 'Plex Transcoder' file with the following contents:

 

#!

/bin/sh /usr/lib/plexmediaserver/Plex\ Transcoder2 -hwaccel nvdec "$@"

 

...Does this make sense, or should I undo that? if I should undo, can you please share the contents of the original 'Plex Transcoder' file?

I fiddled around a bit and what I have now is as follows.

 

When I play a video Plex now DOES say it is transcoding. When I do a 'nvidia-smi dmon -s u' in the terminal I do see load while playing:

 

# gpu    sm   mem   enc   dec
# Idx     %     %     %     %
    0     4     1     0     3
    0     8     4     6    12
    0     8     4     6    11
    0     5     3     2    10
    0     6     3     8    10  (etc)

 

However, when I do a 'watch -n0.1 nvidia-smi' I now also DO see a process pop up very, very briefly for Plex, but then it goes again..

Now, I am not sure whether this is correct and it just buffers for a bit or something and then comes back when needed again, or whether I should see this process there nonestop as long as a video is being transcoded? I fear the latter, as my cpu usage is still sky high..

 

Please let me know what to do/check or what to take as next steps, cause I am pretty puzzled by now 🙂

Thanks in advance for all your help!!

 

Link to comment
2 hours ago, MMTim said:

Hi, did not make any difference. I used the examples from a youtuber named bite my bits (https://www.youtube.com/watch?v=bz16M67z0uM), who said to rename the 'Plex Transcoder' file to 'Plex Transcoder' and create a new 'Plex Transcoder' file with the following contents:

 

#!

/bin/sh /usr/lib/plexmediaserver/Plex\ Transcoder2 -hwaccel nvdec "$@"

 

...Does this make sense, or should I undo that? if I should undo, can you please share the contents of the original 'Plex Transcoder' file?

I fiddled around a bit and what I have now is as follows.

 

When I play a video Plex now DOES say it is transcoding. When I do a 'nvidia-smi dmon -s u' in the terminal I do see load while playing:

 

# gpu    sm   mem   enc   dec
# Idx     %     %     %     %
    0     4     1     0     3
    0     8     4     6    12
    0     8     4     6    11
    0     5     3     2    10
    0     6     3     8    10  (etc)

 

However, when I do a 'watch -n0.1 nvidia-smi' I now also DO see a process pop up very, very briefly for Plex, but then it goes again..

Now, I am not sure whether this is correct and it just buffers for a bit or something and then comes back when needed again, or whether I should see this process there nonestop as long as a video is being transcoded? I fear the latter, as my cpu usage is still sky high..

 

Please let me know what to do/check or what to take as next steps, cause I am pretty puzzled by now 🙂

Thanks in advance for all your help!!

 

 

That was something needed a year ago to get hardware decoding working. Hardware encoding have been working without any needs to rename files and create files. So revert your changes.

  • Like 1
Link to comment

Ok clear, thanks! I am not sure if I still have the original copy of that 'Plex Transcoder' file, could you please share me the contents of the original so I can revert? Also, for me to understand what I should see, can you please let me know on the fact the Plex process shows up just very briefly? Is that normal or should it be there all the time while a video is being played/transcoded? thnx

Link to comment
7 hours ago, MMTim said:

Ok clear, thanks! I am not sure if I still have the original copy of that 'Plex Transcoder' file, could you please share me the contents of the original so I can revert? Also, for me to understand what I should see, can you please let me know on the fact the Plex process shows up just very briefly? Is that normal or should it be there all the time while a video is being played/transcoded? thnx

I think you can just delete the file and restart the container and Plex will download it again.

The process should not flash but show until it's finished transcoding.

Why not start with a new fresh Plex container and appears to be sure there is no leftovers from the guide and your attempts. Then follow the instructions on the first page of the Nvidia driver thread.

  • Like 1
Link to comment

Thanks! I am happy to do so.. Just one check though.. ;-)

I spent alot of time in things like libraries, collections, custom movie posters, permissions on some family members to have remote access to some of those libraries etc.

 

Should I backup anything prior to deleting my Plex container and re-installing the container?

Also, to make sure there are no leftovers as you call it, should I check for anything in particular?

 

Thanks :)

Oh, and about to forget the most important part, happy new year! 🙂

Link to comment
3 hours ago, MMTim said:

Thanks! I am happy to do so.. Just one check though.. ;-)

I spent alot of time in things like libraries, collections, custom movie posters, permissions on some family members to have remote access to some of those libraries etc.

 

Should I backup anything prior to deleting my Plex container and re-installing the container?

Also, to make sure there are no leftovers as you call it, should I check for anything in particular?

 

Thanks :)

Oh, and about to forget the most important part, happy new year! 🙂

I didn't say you should delete the current setup. Set up a new one for testing. As long as the other container is stopped and you don't use the same appdata folder and name, your old setup is safe.

Link to comment

I guess that would have been an option too yes.. 🙂

But.. Impatient as I can be, I had already looked that up so what i did is the following:

 

- Backing up my Library folder

- Uninstalling the docker container

- Reinstalling Plex with the manual/instructions as you said

- Put back the library folder

 

..Results are the same though. Whenever I start playing a video with transcoding, I see it show up under 'nvidia-smi' for a very brief moment, then it disappears and I see my CPUs getting hit. Also, 2160p is still with stutters and frequent buffering.

 

Not really sure what to do or try now? Could it be there's something wrong with the physical card? I can try with another, let powerful, nvidia card tomorrow for the sake of trying... Guess I'll do that, unless you would have any more suggestions before then? :) THanks!

Link to comment
33 minutes ago, MMTim said:

I guess that would have been an option too yes.. 🙂

But.. Impatient as I can be, I had already looked that up so what i did is the following:

 

- Backing up my Library folder

- Uninstalling the docker container

- Reinstalling Plex with the manual/instructions as you said

- Put back the library folder

 

..Results are the same though. Whenever I start playing a video with transcoding, I see it show up under 'nvidia-smi' for a very brief moment, then it disappears and I see my CPUs getting hit. Also, 2160p is still with stutters and frequent buffering.

 

Not really sure what to do or try now? Could it be there's something wrong with the physical card? I can try with another, let powerful, nvidia card tomorrow for the sake of trying... Guess I'll do that, unless you would have any more suggestions before then? :) THanks!

What do you mean by adding back the library folder? If it's a folder in appdata then don't. You want a clean config. Also be sure to delete image when you remove the container.

Link to comment
11 hours ago, MMTim said:

I guess that would have been an option too yes.. 🙂

But.. Impatient as I can be, I had already looked that up so what i did is the following:

 

- Backing up my Library folder

- Uninstalling the docker container

- Reinstalling Plex with the manual/instructions as you said

- Put back the library folder

 

..Results are the same though. Whenever I start playing a video with transcoding, I see it show up under 'nvidia-smi' for a very brief moment, then it disappears and I see my CPUs getting hit. Also, 2160p is still with stutters and frequent buffering.

 

Not really sure what to do or try now? Could it be there's something wrong with the physical card? I can try with another, let powerful, nvidia card tomorrow for the sake of trying... Guess I'll do that, unless you would have any more suggestions before then? :) THanks!

If you ever edited the profiles for different devices, this might cause that problem.
I had edited profiles for android about 5 months before and now i had x265 videos and they didn't even start to transcode, then i remebered that and deleted the custom profiles. Worked immidietly.

  • Like 1
Link to comment
13 hours ago, MMTim said:

Yup that's what I put back.. Would that mean I need to redo all my shares, indexing, custom folders etc?

The point isn't to set it up the same way as you had it, but to test with a new clean setup if its working. If you add back the appdata you are back to the old setup.

Set up a fresh new plex and then add the movies folder so you have something  to test with.

Link to comment

Hi all,

apologies if this issue has been brought up already.

I am having difficulties with Plex not displaying my content.

It looks related to what I can find in the log (see screenshot attached).

Does any of you know why I get all these errors?

Thank you in advance!

D.

 

image.png.2c121550afa501b40d20f5d9acaf00ca.png

 

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.