HW transcoding not triggering on iGPU (DS1520+) on docker

Server Version#: 1.28.2.6151
Player Version#: is this the client? if so, is the latest version on iphone/android phones.

I’m seeing that the transcodes are not going through the (hw) option and instead they are overworking my CPU. I have given permissions in the compose to my the admin user that I’m using. I am using /dev/shm in the transcode directory and have already given it half my ram (had to manually expand shm to 10gb). I have this in the compose:

devices:
      - /dev/dri:/dev/dri

But I don’t know what else to do. I don’t even know which file of the logs to provide you since I’ve never pulled a log file and I went in the logs folder and there are a lot in there. Any help on what to do next would be greatly appreciated. thanks in advance.

If I may?

  1. The J4125 only supports 8 GB of RAM.
    ref: Intel® Celeron® Processor J4125

  2. Trying to add more than it supports will result in failures (There are no circuit board traces). This happens because Synology reads the “SPD” (speed device) on the DRAM at kernel start. It simply totals up and presents you a number. In this case, that number is absolutely meaningless and dangerous.

  3. Allocating 10 GB for SHM is more than you have. With 8GB installed, your maximum is 4GB

  4. I recommend using this How-To

You want Method 1 (Intel CPUs)

incorrect. I have 20GB of RAM installed which is why I allocated 10gb for the shm.

This is the docker composed that I used:

services:
  plex:
    image: lscr.io/linuxserver/plex:latest
    container_name: plex
    network_mode: host
    environment:
      - PUID=1026
      - PGID=100
      - VERSION=latest
    devices:
      - /dev/dri:/dev/dri
    volumes:
      - /volume1/docker/plex:/config
      - /volume1/TV Shows:/tv
      - /volume1/Movies:/movies
      - /volume1/Media/UHD/Movies4K:/movies4k
      - /volume1/music:/music
      - /volume1/Media/TV Demos:/demos
    restart: unless-stopped

Is this DSM 6 or 7?

latest DSM 7 with all the patches

You need two things to run this successfully on DSM 7.

  1. PMS native package installed (to gain access to the hardware)
  2. Your PUID/PGID to match the “System Internal User” PlexMediaServer’s UID/GID.

DSM 7 cranked down HARD on the rules.

In my DSM 7 Docker How-To, I show how it has to be done (not a choice)

So question on that, I was running the Plex native synology app and I switched to the Plex docker in order to be able to utilize the HDR tone mapping as everywhere I read was saying the native package could not utilize this.

So now you’re saying I have to move back to synology app in order to do this? or am I mistaking something. btw, thanks for the help.

No.

  1. You keep the Plex native app installed but STOPPED. Being installed, the DSM “video-driver” privilege is granted (by Package Center) to the UID/GID

  2. At his point, as long as you use the UID/GID, you can run your own docker, configured however you want.

based on what i’ve heard… It might be prudent to use the Overlay method of Docker over Native.

what is the overlay method? the docker container I have?

I see. I do have the app still installed and it is stopped. I guess I can use the guide you referenced to change UID/GID and it should work correctly? or should I change the UID/GID in compose and run it again?

@Vic0723

“Overlay” is:

  1. You have the native PMS installed and all your media indexed there.

  2. You setup the docker container as I show.
    /config/Library/Application Support maps to /var/packages/PlexMediaServer/shares/PlexMediaServer/AppData

  3. This new Docker container assumes the identity, with all the metadata of your native Synology app installation.

  4. While running this Docker instance, you STOP the Package Center instance (only one can run at a time else you’ll corrupt the database in a heartbeat)

I did it this way because I knew, at some point, we’d eventually get tonemapping on Syno.

I want the transition for everyone to be painless and without any data loss.

Is there a way that I can have hw transcoding with the plex container that I currently have?
this sounds like I have to nuke the container I have working and create something completely new.
After having this container I don’t really know if I want to go back to using the app even if they bring tone mapping to it.

You don’t need to nuke the container.

  1. Install the Plex native app
    – Do NOT start after installation
    – Do NOT start it at any point

  2. Since you have /volume1/docker/plex holding your server instance, it will remain when you delete the container DEFINITION.

  3. EDIT the container defintion.
    – PUID & PGID will most likely be 297536 (the first “service” ID number Synology assigns (needs verification)

  4. Create the new container – Do not start

  5. Go into /volume1/docker/plex and change the ownership of all files & folders to the system internal user PlexMediaServer

  6. Also go to the docker shared folder and grant R/W access to PlexMediaServer.

I verified the PUID and GID on my side and it is the same one as yours 297536. I changed the environment variables to that but it didn’t work. Server was not found. Changed it back to original.

Then I realized it might have been the permissions thing so, I went into the control panel > shared folders and verified that the docker folder was Read/Write enabled for PlexMediaServer system internal user and it was.

The problem I’m having is with the sentence above as I can’t change ownership of the folder to PlexMediaServer. I can only see users I’ve created and not system internal users.

Oh wait. I am sorry. DSM 6 vs DSM 7. I’ve been in DSM 6 for the past few days. (been a very long week)

On DSM 7

  1. You can change manually in the shell
    -or-
  2. You grant the ACL
    – Change Local Users to System Internal User
    – Select R/W for PlexMediaServer

I now did the following:
I went into the docker folder > properties >Permissions > create and selected PlexMediaServer and allowed all. saved and restarted container. Verified that the folder permission was correct and everything seems to be as it’s supposed to work. However. the transcode is still not going through (hw).

me thinks there’s an issue with the dev/dri permissions for the user

When the Plex app is installed,

  1. Package Center reads our config file
  2. If user PlexMediaServer doesn’t exist, it creates it
  3. We request access to {video-driver} which is hardware
  4. DSM 7 grants that permission if present

At the Linux level:

  1. /dev/dri is owned by group videodriver
  2. Our request {video-driver} maps to group videodriver
  3. Package Center adds PlexMediaServer to group videodriver
chuck@ds418:~$ grep Plex /etc/group
PlexMediaServer:x:297536:
synopkgs:x:999:HyperBackup,FileStation,Python2,DownloadStation,OAuthService,SecureSignIn,PlexMediaServer,SynoFinder,CodecPack,SurveillanceStation
videodriver:x:937:PlexMediaServer
chuck@ds418:~$ 

then I have no idea why is not working for me

root@NAS:~# grep Plex /etc/group
PlexMediaServer:x:297536:
synopkgs:x:999:MediaServer,PlexMediaServer,OAuthService,FileStation,SecureSignIn,VideoStation,HyperBackup,Antivirus,DhcpServer,Python2,USBCopy,SynoFinder,SynologyApplicationService,SynologyPhotos,PDFViewer,SynologyDrive,office,CodecPack
videodriver:x:937:PlexMediaServer,emby

May I have the PMS DEBUG logs (enable DEBUG before starting the playback attempt) ?