Jump to content

Recommended Posts

Posted

I am trying to set up Plex with HW transcoding with my Intel ARC gpu. The problem is that some codecs won't play, it shows get high cpu load (30%+) and constant buffer. In the Plex Media Server log shows errors: 

"Failed to initialise VAAPI connection: -1 (unknown libva error)"

"hardware transcoding: opening hw device failed - probably not supported by this system, error: I/O error"

Which leads to plex not being able to create hardware context for the codecs ("could not create hardware context for h264_vaapi").

 

Posted

There's been a few forums threads here about that exact error, including mine. No solution known. For some reason with hexos on top of truenas, truenas can see the arc gpus, but something is stopping them from accessing them, or atleast that is the going theory. I gave up and bought an nvidia card which just works.

  • Sad 1
Posted
15 hours ago, ehrie said:

There's been a few forums threads here about that exact error, including mine. No solution known. For some reason with hexos on top of truenas, truenas can see the arc gpus, but something is stopping them from accessing them, or atleast that is the going theory. I gave up and bought an nvidia card which just works.

Hmmm, now I’m at a crossroads on deciding if I should remove HexOS for now and table it for down the road after they fix the issue or buy yet another single slot GPU for transcoding (like a P2200) but I really don’t want to pay more money for a GPU that I really don’t need

Posted

I also have this same problem but with Intel integrated graphics GPU could this also be the same issue?

Plex recognizes the Intel iGPU and downloads the files but fails to actually use them when it comes time to transcode. 

HW Transcode errors.PNG

Intel Drivers downloaded.PNG

Posted

Update: I got Intel iGPU HW decoding to work. I really do think this has to do with file/folder with permissions when installing from HexOS UI.

 

I installed Plex (plex pass image) from the TrueNas Scale UI

Setup the User ID and Group ID to 569 (becasue my original Plex install was using 568)

Web Port 32401 (again becasue original Plex install was using 32400)

Checked off "Host Network"

Set up the  Data, and Cofiguration Storage locations all as ixVolume (Dataset created automatically by the system)

Setup Logs and Transcode Storage as Temporary (Temporary directory created on the disk)

Add additional storage locations. In my case I only use Plex for Movies and TV shows so if you need Pictures, Videos, etc.. add those as well

Type (Host path that already exists on the system)

Mount Path /Movies

Host Path /mnt/HDDs/Movies

The make one for Shows

Type (Host path that already exists on the system)

Mount Path /Shows

Host Path /mnt/HDDs/Shows

select your options for CPU and Memody dont forget to check Passthrough available for (non Nvidia GPUs)

Plexsettings1.thumb.PNG.5e80a3e17aeb2c6faea1cadf885c171a.PNGPlexsettings2.thumb.PNG.1ddb4bbfad53e8c6d28098342dd10245.PNGPlexsettings3.PNG.c00a3f6287981e6f3899cd29a98333f3.PNG

 

Next we need to make a new User and Group in True NAS so navigate to Credentials then Users

Name it whatever you want "Plex 2" in my case

disable password

UID 569

Uncheck Create New Primary Group

Primary group select apps

home directory 

/mnt/HDDs/Aplications

I clicked ALL the permissions for Read Write and Execute

Unclick SMB User

Save

PlexUser.thumb.PNG.c750450dd61fc0054a7beb34024c7625.PNG

Now we need to create a Group

In TrueNAS navigate to Credentials then Groups 

GID 569 

Add Local Administrator to the Privelages selection

PlexGroup.thumb.PNG.78ae2ba8a7acd52cf347c1729832beac.PNG

The Last thing we need to do is give our user and group 569 access to the SMB shares on TrueNAS 

Navigate to Datasets in TrueNAS then Movies

click edit on the permissions button

Now add Item

Who is set to User

User is set to whatever you named your User in the previous step. In my case it is "Plex2" it shoud be in the drop down list.

under permissions select Full Control 

Click Apply permissions Recursively and confisr the selection then continue.

 

Now add another item

Who is set to Group

Group is set to whatever you named your Group in the previous step. In my case it is "Plex2" it shoud be in the drop down list.

under permissions select Full Control 

Click Apply permissions Recursively and confisr the selection then continue.

PlexUserpermissions.thumb.PNG.c1ca450142b85aa3c0ff40f0fecd196e.PNGPlexGrouppermissions.thumb.PNG.35cf4fa4be83c222e5a8299fd7e77028.PNG

Now click Save Access Control List. 

You should now be able to launch your Plex app and go toyour transcode settings, select your iGPU and transcode hapily ever after!!

HWTranscodeWorking.thumb.PNG.56b30a1211e933bfb3079e7caf728e79.PNG

If this doesnt wor for you i would also try changing the permissions in the aplications forlder for your plex user. it is my understanding that inorder to transcode plex needs to be able to execute commands and unpack folders it downloads inorder to be able to HW transcode. but im not 100% sure. 

  • Like 2
  • Thanks 1
Posted

Well looks like you cracked it for sure. I think the issue is in the 568 user itself. I have had odd issues in Dockge with that user getting access denied to things it really should not. I figured it was something I did, but now it might actually be right there.

Posted

@Tamaluko Great write-up and thank you for sharing. I went through a similar situation today that I posted about HERE. However in my case it was Plex playing funny with changing a .tmp file and associated permissions that when removed, fixed the issue.

Posted (edited)
6 hours ago, Dylan said:

@Tamaluko Great write-up and thank you for sharing. I went through a similar situation today that I posted about HERE. However in my case it was Plex playing funny with changing a .tmp file and associated permissions that when removed, fixed the issue.

Thanks  @Dylan I do however that is a diffrent issue that you solved. The error you describe iterally will not let you play any .mkv file on Plex as the codec to open the file is "missing" when in fact it is just needs to be re-named so Plex recognizes and opns it.  That has been an issue that has plagued Plex users for a while here is a link to an old TrueNAS forum with that same issue.

https://www.truenas.com/community/threads/plex-codec-issue.98186/

The OPs and my issue is with HARDWARE transcoding we want to use a GPU to help accelerate transcoding when Plex can't direct play your 4K to a device..... like your buddys TV that isn't 4K but 80% content is. You end up with super high CPU usage on your server and a ton of buffering on your client aka pissed off friend.  

Example one shows Plex not using HW transcoding but rather software transcoding. you know this is the case because "(hw)" is not displayed after the "Transcode" in the screenshot it even says its buffering inthe screenshot 😂🤣 I just noticed. 

GLaDOSHWTranscodeoff.PNG.27334b9293a36b2862b7fb8693b1b6b6.PNG

 

Now in example two as you can see after the word Transcode "(hw)" appears 

 

GLaDOSHWTranscode.PNG.9b8922832470ea17d24b21184c1bc939.PNG

EDIT: I just wanted to add this Plex Support page link Here.

https://support.plex.tv/articles/115002178853-using-hardware-accelerated-streaming/

PlexHWtranscodeinstructions.thumb.PNG.e4e7086a80d5c79eb226af2354cac48a.PNG

 

I looked at your log and from what it looks like the first line gives you some clues. 

Feb 22, 2025 12:56:33.275 [140265853979448] DEBUG - [Req#4b4f8b/Transcode] TPU: hardware transcoding: enabled, but no hardware decode accelerator found

looks like you have it enabled but it cant find any GPU to hardware transcode with. If you look at my log before it would actually find my Harware decoder (GPU) and download the drivers but when it came to actually use the GPU  the drivers would fail to start and gave the error OP and I posted above. Wich lead me to belive "Hey Plex can read and write to the directory but it can't execute in the directory"  Maybe i just got lucky haha. I would really like for sombody to try the fix and see if it also works and helps them HW Transcode. Fingers crossed. 

On 2/18/2025 at 12:30 PM, Theo4 said:

"Failed to initialise VAAPI connection: -1 (unknown libva error)"

Here are the logs

LOgsTranscode.thumb.PNG.c6b7cf5cf84803d29adbdfab0891f5bd.PNGLOgsTranscode.thumb.PNG.c6b7cf5cf84803d29adbdfab0891f5bd.PNG

HWTranscodeerrors.thumb.PNG.4ec05d98cb4e50565814dfdb7b22f373.PNG

Edited by Tamaluko
Posted

Great write up!!!  My only comment is I'm still using User 568 with my Plex install and getting HW transcodes to work with my IntelArc card which I believe uses the same drivers. I think the fix ends up being installing plex with the Data and Config storage as IxVolumes, this I assume gives some different permissions to truenas compared to a user created folder that is created during the HexOs install. Either way if people can follow your steps and it still works that's awesome!!! And at least gets people running and not pulling their hair out for days like I know many of us have!

Posted
3 hours ago, Master-spud said:

Great write up!!!  My only comment is I'm still using User 568 with my Plex install and getting HW transcodes to work with my IntelArc card which I believe uses the same drivers. I think the fix ends up being installing plex with the Data and Config storage as IxVolumes, this I assume gives some different permissions to truenas compared to a user created folder that is created during the HexOs install. Either way if people can follow your steps and it still works that's awesome!!! And at least gets people running and not pulling their hair out for days like I know many of us have!

Did you say that you got your Intel ARC working with HW transcoding? 

 

Posted
24 minutes ago, Iliyria said:

Did you say that you got your Intel ARC working with HW transcoding? 

 

That's correct, if you follow the instructions in this tread should also work for you if I had to take a wild guess. 

Posted

I bought an intel ARC $99 card from Amazon and few days ago when I was trying to get hw transcoding  to work.

I just tested it today and can confirm it works just fine. I will be returning it though because I was able to get iGPU transcoding to work and that is plenty for my needs. 

For reference this is the intel ARC card i bought and confirmed to work.

Screenshot_20250224_231957_AmazonShopping.thumb.jpg.094b8e8be7e474d4e63cfc0ca61de790.jpg

 

 

Posted
19 hours ago, Master-spud said:

Great write up!!!  My only comment is I'm still using User 568 with my Plex install and getting HW transcodes to work with my IntelArc card which I believe uses the same drivers. I think the fix ends up being installing plex with the Data and Config storage as IxVolumes, this I assume gives some different permissions to truenas compared to a user created folder that is created during the HexOs install. Either way if people can follow your steps and it still works that's awesome!!! And at least gets people running and not pulling their hair out for days like I know many of us have!

Absolutely i totally agree something wonky is going on with permissions when installing Plex from the Hex OS UI. And it sounds like you didn't have to create a new user so that's even easier than what I did. 

One other thing I noticed was that when you install Plex from Hex OS under the aplications tab of True nas Plex only shows up as having one container in the Workloads section and if you install via TrueNAS it shows up with two container. 

Screenshot_20250224_233518_Chrome.thumb.jpg.9674742f1e284ecfa829f79b77b65063.jpg

 

 

Posted

Thank you so much @Tamaluko!!!!!!!!!!!!!!!!!! I also was able to get my igpu (i5-13400) working in plex for transcoding after following your instructions. The only thing I didn't follow was the new user step, so thank you as well @Master-spud for reporting 568 still worked. Was really starting to feel like I was running in circles before I found this thread. 

  • Like 2
Posted (edited)
On 2/25/2025 at 8:50 PM, Dylan said:

I'd be happy to work with any/all commenters to help create a guide we can add to our DIRECTORY OF GUIDES - @Tamaluko Is your first post sufficient or would any additions or edits be helpful?

IMO you don't need to include the part about creating user 569.  568 still works without any acl modification. The real trick seems to be using the default storage settings while running the plex install from the truenas side. ixvolume for data and config, temp for transcode and logs. Then add the additional media libraries manually that the hexos plex installation created.

Caveat here is that this worked for me with an intel igpu (13400). I can't verify if these same settings fix the arc issues but they seem to from others comments. Trying to hardware transcode in the plex app hexos installed was a no go for all the same reasons listed above. Stopping/deleting that plex app and reinstalling another instance through truenas with the defaults i mentioned worked like a charm.

 

Hope it helps and that the hexos team can resolve this issue in the future 🙂

Edited by skywalker-2
Posted

Sorry guys. Just seeing this. Im so glad it worked for you @skywalker-2 I was literally in the same boat as you, I wasted hours trying to get Plex HW transcoding to work.

On 2/25/2025 at 5:50 PM, Dylan said:

I'd be happy to work with any/all commenters to help create a guide we can add to our DIRECTORY OF GUIDES - @Tamaluko Is your first post sufficient or would any additions or edits be helpful?

I dont know what would you suggest @Dylan? Maybe make an Edit saying that others have reported the fix working without adding user 569? I have yet to try my fix without user 569 but I only have one Hex OS licence and man I sure would hate to re-re-restart my Plex server hahaha. 

  • Like 1

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.   Paste as plain text instead

  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...