Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#368339 - 15/02/2017 09:17 Unix Gurus/Synology Stupidity
sn00p
addict

Registered: 24/07/2002
Posts: 618
Loc: South London
Hi,

Wondering if anybody knows a solution to an issue I'm trying to resolve. I run Plex on my DS916+ NAS and there is now a beta version available which supports hardware transcoding, I don't have a requirement for this locally but it would be nice to make use of when away from the home, as the files have high bitrates streaming over my cable connection isn't going to work too well.

So, I have managed to create a docker image which contains the plex system with the preview build installed and I have that running on my Synology file, hardware transcoding works beautifully when I change the bit rate and the thing doesn't really break a sweat, all good.

Except, that the permissions on /dev/dri/renderD128 mean that I can't access the device from docker without first chmodding the device so that the docker container can make use of it, and obviously if the synology reboots the permissions are lost and I have to go and re-chmod it. I could add a start up script to chmod it, but it all seems a bit hacky. (but it may be the only way to solve the issue)

Here's the /dev.dri folder: (I've already chmodded renderD128 so I can access it from docker)

crw------- 1 root root 226, 0 Feb 14 09:22 card0
crw------- 1 root root 226, 64 Feb 14 09:22 controlD64
crwxrwxrwx 1 root root 226, 128 Feb 14 09:22 renderD128

As you can see, the file in question is part of group 226, this supposedly should be the "video" group and the proper solution from the plex guys is that you simply add your user to the video group and voila!

Except, the group doesn't exist in /etc/group and synology rebuilds that file every boot and they don't appear to have the normal commands to add users to groups, they have their own special user management system.

I know this is a long shot, but does anybody have any idea what I can do here to make this work without having to resort to chmodding the device on boot?

Cheers


Edited by sn00p (15/02/2017 09:23)

Top
#368340 - 15/02/2017 09:48 Re: Unix Gurus/Synology Stupidity [Re: sn00p]
sn00p
addict

Registered: 24/07/2002
Posts: 618
Loc: South London
Nevermind, I solved it and it doesn't involve the synology.

I assumed the permissions were just mirrored across the host and container, but they're not, you can change the permissions on the container side quite happily to 777 an it can make use of the device, the permissions don't change on the host side.

Just need to modify my docker file to add in a script to do this at boot time and it should all work straight away after a reboot.

Top
#368342 - 15/02/2017 17:40 Re: Unix Gurus/Synology Stupidity [Re: sn00p]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4172
Loc: Cambridge, England
226 isn't the group, it's the device major number. Those files are in group "root".

Peter

Top
#368343 - 15/02/2017 18:59 Re: Unix Gurus/Synology Stupidity [Re: sn00p]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31563
Loc: Seattle, WA
Quote:
I run Plex on my DS916+ NAS and there is now a beta version available which supports hardware transcoding


Interested in more details. My DS416play has hardware transcoding built in to the Synology video streamer but not Plex. I wonder if the version you speak of will also do hardware transcoding on my 416play?
_________________________
Tony Fabris

Top
#368344 - 15/02/2017 23:32 Re: Unix Gurus/Synology Stupidity [Re: peter]
sn00p
addict

Registered: 24/07/2002
Posts: 618
Loc: South London
Originally Posted By: peter
226 isn't the group, it's the device major number. Those files are in group "root".

Peter


Ahh! That makes sense.

Top
#368345 - 15/02/2017 23:40 Re: Unix Gurus/Synology Stupidity [Re: tfabris]
sn00p
addict

Registered: 24/07/2002
Posts: 618
Loc: South London
Originally Posted By: tfabris
Quote:
I run Plex on my DS916+ NAS and there is now a beta version available which supports hardware transcoding


Interested in more details. My DS416play has hardware transcoding built in to the Synology video streamer but not Plex. I wonder if the version you speak of will also do hardware transcoding on my 416play?


If you have Plex pass you have access to the preview build although it's not for the feint hearted, you have to run Plex in a docker container (which is actually how Plex themselves recommended you actually run Plex anyway these days).

I just looked at the specs for the DS416play and it says it has iGPU which is what is required, you could tell for sure by ssh-ing into dsm and checking if there is a /dev/rdi/renderD128 device, if there is then you should be good to go.

I ended up having to write a synology application to start the docker container because the synology docker interface removes the required device mapping when it starts a container, so it has to be started from the command line. My app allows it to start up from boot with the device mapping.

Top
#368347 - 16/02/2017 05:24 Re: Unix Gurus/Synology Stupidity [Re: sn00p]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31563
Loc: Seattle, WA
Crap, I got my model number wrong, it's a 214play and doesn't have a /dev/rdi/renderD128 device.

Shame, since the unit does indeed have an intel chip with transcoding capability.
_________________________
Tony Fabris

Top