Hardware Acceleration not working on Synology DS1019+

Server Version#: ** 1.32.6.7557**
Player Version#: 7.8.4.8626-d8e2925463-Plex (On Roku TV)

I have tried with HDR correct turned on and off
I don’t think this is related to the current HDR issue.

What things should I check for?

Sep 26, 2023 14:47:43.062 [140334165736248] DEBUG - [Req#70/Transcode] Streaming Resource: Calculated bandwidth of 15633kbps exceeds bandwidth limit. Changing decision parameters provided by client to fit bandwidth limit of 8000kbps

Sep 26, 2023 14:47:43.062 [140334165736248] DEBUG - [Req#70/Transcode] Streaming Resource: Determining preferred transcode encoders through transcode only decision.

Sep 26, 2023 14:47:43.063 [140334165736248] DEBUG - [Req#70/Transcode] Codecs: testing h264_vaapi (encoder)

Sep 26, 2023 14:47:43.115 [140334165736248] DEBUG - [Req#70/Transcode] Codecs: hardware transcoding: testing API vaapi for device ‘/dev/dri/renderD128’ (HD Graphics 500)

Sep 26, 2023 14:47:43.686 [140334165736248] ERROR - [Req#70/Transcode] [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).

Sep 26, 2023 14:47:43.686 [140334165736248] DEBUG - [Req#70/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: I/O error

Sep 26, 2023 14:47:43.686 [140334165736248] DEBUG - [Req#70/Transcode] Could not create hardware context for h264_vaapi

Sep 26, 2023 14:47:43.686 [140334165736248] DEBUG - [Req#70/Transcode] Codecs: testing hevc (decoder) with hwdevice vaapi

Sep 26, 2023 14:47:43.747 [140334165736248] DEBUG - [Req#70/Transcode] Codecs: hardware transcoding: testing API vaapi for device ‘/dev/dri/renderD128’ (HD Graphics 500)

Sep 26, 2023 14:47:43.764 [140334165736248] ERROR - [Req#70/Transcode] [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).

Sep 26, 2023 14:47:43.764 [140334165736248] DEBUG - [Req#70/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: I/O error

Sep 26, 2023 14:47:43.764 [140334165736248] DEBUG - [Req#70/Transcode] Could not create hardware context for hevc

Sep 26, 2023 14:47:43.765 [140334165736248] DEBUG - [Req#70/Transcode] Codecs: testing hevc (decoder) with hwdevice vaapi

Sep 26, 2023 14:47:43.766 [140334165736248] DEBUG - [Req#70/Transcode] Codecs: hardware transcoding: testing API vaapi for device ‘/dev/dri/renderD128’ (HD Graphics 500)

Sep 26, 2023 14:47:43.767 [140334165736248] ERROR - [Req#70/Transcode] [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).

Sep 26, 2023 14:47:43.767 [140334165736248] DEBUG - [Req#70/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: I/O error

Sep 26, 2023 14:47:43.767 [140334165736248] DEBUG - [Req#70/Transcode] Could not create hardware context for hevc

Sep 26, 2023 14:47:43.768 [140334165736248] DEBUG - [Req#70/Transcode] Streaming Resource: Reducing playback quality for 7619kbps stream bitrate: video resolution to 1920x1032, audio channels to 6, quality to 8, disable video DS as 30094kbps is > the 7065kbps available

Sep 26, 2023 14:47:43.768 [140334165736248] DEBUG - [Req#70/Transcode] Codecs: testing hevc (decoder) with hwdevice vaapi

Sep 26, 2023 14:47:43.769 [140334165736248] DEBUG - [Req#70/Transcode] Codecs: hardware transcoding: testing API vaapi for device ‘/dev/dri/renderD128’ (HD Graphics 500)

Sep 26, 2023 14:47:43.770 [140334165736248] ERROR - [Req#70/Transcode] [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).

Sep 26, 2023 14:47:43.770 [140334165736248] DEBUG - [Req#70/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: I/O error

Sep 26, 2023 14:47:43.770 [140334165736248] DEBUG - [Req#70/Transcode] Could not create hardware context for hevc

@ChameleonXtreme

Can’t tell what’s happening from just that snippet.

Clearly it’s not right .

Can you grab the current DEBUG logs ZIP file,
Then downgrade to the public 1.32.5 release and retest ?

I have been on all the various versions. The error is always the exact same. I don’t think it is Plex, but looking to Plex for assistance. The software can see the devices it needs, but it just returns the vague return code of -1 from libva.

I have an HD 500 GPU that can do HEVC for two streams, but I cannot get hardware acceleration working on the DS1019+ neither in docker nor the package center install.
Is this maybe a licensing issue because I have a lifetime Plex pass instead of a monthly one?

Anyways, trying the public channel to send you the zip file.

1.32.6 will not allow me to roll-back to 1.32.5 as a Synology Package. Uninstalled, and re-installed (keeping all files and server claim).

Here are the pre-downgrade and post-downgrade logs:
Plex Media Server Logs_2023-09-26_18-56-18.zip (1.3 MB) – Post Downgrade
Plex Media Server Logs_2023-09-26_18-46-34.zip (1.2 MB) – Pre Downgrade

There is no reason for your ApolloLake NAS to not have HW transcoding capability

Please try this older build. If it doesn’t work then there’s something else going on which needs deep diving

I was already using 1.32.67521 in docker when I was first trying to get HW acceleration working. But I will go back to this one on the SPK instead, as provided, and see what happens

Same exact results in the provided 1.32.6.7521 version. Just a generic -1 (unknown libra error) response when attempting to initializing the /dev/dri/renderD128 device

This makes no sense.

Do you have any customizations in your Preferences.xml file ?
(manually entered) ?

No it does not. I also opened a ticket with Synology about this. It just stopped working one day. I don’t know if this is Plex specific – I doubt it is, but am looking all over the web for others that have had issues with the character devices in /dev/dri on Synology to see with they did to fix it. I have changed permissions from 600 (u=rw,g=,o=) to 666 (a=rw) and tried changing ownership from videodriver to root to PlexMediaServer, etc… but since everyone has rw access, not of that should matter, and it had to impact to fix the issue. Presently, it is setup with video driver as the owner for user and group.

I was mostly hoping someone here has seen an issue where Synology does not work for hardware acceleration, or would know how to further determine the root cause of the issue. I cannot seem to locate any testing tools to determine what does and does not work for hardware acceleration, and the generic -1 response doesn’t help from the logs.

I wrote, with Synology’s assistance. the package to use videodriver group

Please don’t manually alter the permissions. Reboot / restore to normal.

To confirm what I think is happening, please downgrade to this build and retest.

1 Like

As an update, it appears my hardware interfaces on /dev/dri are working on vainfo docker image I found, and an ffmpeg image I tried, though the usage is so convoluted, I am a bit lost on how to fully test with that. So seeing your reply sparked some hope.

Yes, it works now on this image.

There isn’t any need to use docker on Synology anymore.
The very first versions of HDR tonemapping needed it (1.26.x) but that is far behind now.

If you want to use docker,

On Synology you are VERY restricted which is why I do NOT recommend it
You must match all the UID/GID mappings correctly

You must keep the native package installed to gain access to the video driver

There is nothing to gain.

Thanks. I only tried the docker solution because I received an email this week about using docker for Plex on Synology. Sounds like that was an old video.

Please let me know if you have a new version to test based on your hunch of what you think broke…

You should have full HW transcoding with 1.32.1.6999 on DSM 7

Please attempt it and attach the logs so I may see.

I do not like guessing

Confirming: 1.32.6.7557 has full HW transcoding and tonemapping on ApolloLake

Screenshot from 2023-09-27 15-18-34

root@apollolake:/var/lib/plexmediaserver/Library/Application Support/Plex Media Server# cat /proc/cpuinfo | grep 'model name' | uniq
model name	: Intel(R) Celeron(R) CPU J3455 @ 1.50GHz
root@apollolake:/var/lib/plexmediaserver/Library/Application Support/Plex Media Server# dpkg -l | grep plexm
ii  plexmediaserver                       1.32.6.7557-1cf77d501                   amd64        Plex organizes all of your personal media so you can easily access and enjoy it.
root@apollolake:/var/lib/plexmediaserver/Library/Application Support/Plex Media Server#

1.326.7557 is the version for the initial report that transcode wasn’t working right for me. But I will try the prior 6999 version first then if it’s working I’ll try 7557 again.

Please use this file.

It won’t play long but will confirm (In the logs) that it’s working.

Hardware transcoding worked on 1.32.1.6999 (as reported previously)

Plex Media Server Logs_2023-09-27_13-24-14.zip (3.0 MB)

Trying 1.32.6.7557 again, and Hardware transcoding does not work, same issue as originally reported. New log with Jellyfish video playback for 1.32.6.7557…
Plex Media Server Logs_2023-09-27_13-29-06.zip (2.3 MB)

Thanks. I’m going to go down the rabbit hole.

If I don’t make it back …

:sunglasses: