Synology DS425+ hardware transcoding issue

Probably not especially helpful, but response from Synology who had Support Level Remote Access to my 425+.

"Upon our review, both the DS425+ and DS423+ are equipped with the Intel Celeron J4125 processor, which supports hardware transcoding.

Based on the error message you provided — avcodec_open2 returned -38 for encoder ‘h264_vaapi’ — this typically indicates that FFmpeg (via the VAAPI module) failed to initialize hardware acceleration due to a “function not implemented” or “no such device” error.

This suggests that the system was unable to correctly access or enable Intel VAAPI at the OS level.

As Plex Media Server is a third-party application, we recommend reaching out to Plex support to verify if there are any known limitations, dependencies, or required drivers for hardware transcoding on newer Synology NAS models.

Please don’t hesitate to contact us if you need any assistance."

Also Rusty from synoforum.com has a Synology Beestation Plus running the same 5.10.55+ kernel and J4125 cpu, and Plex HW Transcode appears to work with no issues.

Hello, thanks EZTutty! First of all, it’s good that Synology is aware of the problem and if hardware transcoding works on the Beestation + (which uses Linux 5.10.55+), I have good hope that our problem will be solved fairly quickly! It would be good if Synology compared the drivers they use for the DS425+ DSM and for the Beestation+!

@Plichtao

BeeStation has different firmware than what we use on the DS425+

There’s where it usually goes sideways

Side-by-side comparison of the two machines (dmesg and /var/log/messages) will show what’s happening.

I would not be surprised to learn this is a deliberate change

I’ll be honest, I think that reply from Synology was them washing their hands of the issue, and trying to blame Plex.

Just on another note, I tried Emby and couldn’t get that to HW Transcode either.

I own two Syno boxes. ( silly me )

I have a J4125 Beelink brick which uses the Syno as NAS-ONLY.
It works PERFECTLY.

“Can you hear me now?”
:rofl:

( I can’t share as “Chuck - the user” in this forum )

I just hope it’s not the 2.5 Gb network port that’s preventing the use of the J4125’s igpu. Unlikely because these two things have nothing to do with each other, and I’m not a hardware specialist, but when I think about it, the only difference between the DS423+ and the DS425+ at the hardware level is this network port. The good functioning of the Beestation plus under Linux 5.10.55+ still gives me a little hope. I’ll be curious to see if the DS225+ (J4125 and 2.5GB network port) has the same issue. As I wrote earlier, I’ll be available from August 18th to do more advanced testing.

If the 2.5 Gbps NIC is interfering, someone needs a new Kernel engineer.
The two are not at all related.

Can confirm similar issues on 225+ (Although for jellyfin. haven’t tried plex).

ALL:

Until such time as we have information and resolution,

I have removed all X25+ products from Hardware Transcoding Support.

I am digging deeper into this mystery.

  1. Please SSH into the machine (Putty or SSH)
    Type these two commands and share the output.
admin@Syno-DS716plus:~$ cd /dev/dri
admin@Syno-DS716plus:/dev/dri$ ls -la
total 0
drwxr-xr-x  2 root root             100 Jan 14  2015 .
drwxr-xr-x 13 root root           14020 Jul  9 10:49 ..
crw-------  1 root root        226,   0 Jan 14  2015 card0
crw-------  1 root root        226,  64 Jan 14  2015 controlD64
crw-rw----  1 root videodriver 226, 128 Jan 14  2015 renderD128
admin@Syno-DS716plus:/dev/dri$ 
  1. Confirm PlexMediaServer is a member of the videodriver group
admin@Syno-DS716plus:/dev/dri$ grep videodriver /etc/group
videodriver:x:937:PlexMediaServer
admin@Syno-DS716plus:/dev/dri$ 

SynTest@DS425plus:~$ cd /dev/dri
SynTest@DS425plus:/dev/dri$ ls -la
total 0
drwxr-xr-x 2 root root 80 Jul 31 16:25 .
drwxr-xr-x 14 root root 14040 Jul 31 16:27 ..
crw------- 1 root root 226, 0 Jul 31 16:25 card0
crw-rw---- 1 root videodriver 226, 128 Jul 31 16:25 renderD128

SynTest@DS425plus:/dev/dri$ grep videodriver /etc/group
videodriver:x:937:PlexMediaServer,
SynTest@DS425plus:/dev/dri$

Mine looks ok

@EZTutty

Thank you!

That confirms the top layer of the kernel is working as it should.

I’ve made contact with Synology Sales folks (corporate level) who are now helping make contact with the Project team(s) involved.

I’ve forwarded all the information I have/

Next we’ll see what they have to say about the error returns we’re getting.

From Linux’s perspective, the two codes:

[chuck@lizum conf.2034]$ perror 95
Exit code(95): error "Operation not supported"
[chuck@lizum conf.2035]$ perror 38
Exit code(38): error "Function not implemented"

This implies an omission when they build the new 5.10 kernel

Can someone experiencing the problem run the following and provide the output?
sudo dmesg | grep -i i915

This will show some details as to how the kernel is initializing the driver and what firmware is being loaded.

Maybe someone with a working previous-generation NAS can show the same?

SynTest@DS425plus:~$ sudo dmesg | grep -i i915
Password:
[ 96.427402] i915 0000:00:02.0: [drm] couldn’t get memory information
[ 96.434971] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[ 96.450087] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/glk_dmc_ver1_04.bin (v1.4)
[ 97.566117] i915 0000:00:02.0: [drm] failed to retrieve link info, disabling eDP
[ 97.576496] [drm] Initialized i915 1.6.0 20200917 for 0000:00:02.0 on minor 0
[ 97.611858] i915 0000:00:02.0: [drm] Cannot find any crtc or sizes
[ 97.626128] i915 0000:00:02.0: [drm] Cannot find any crtc or sizes
SynTest@DS425plus:~$

Interesting. It’s not trying to load the HuC firmware (required for certain low-power transcoding situations).

@ChuckPa Can these existing instructions be leveraged to attempt to load HuC firmware in the Synology environment?

I’d still be interested in seeing the comparison dmesg output from a working system.

What we’re seeing here is because the kernel was not built with the necessary compile-time options (configuration).

This results in the needed modules not being included in the final kernel binary image.

Without the modules included, there is nothing for us to leverage.

This confirms the i915 does not know how to talk to the QSV (i965) ASIC.

[ 97.566117] i915 0000:00:02.0: [drm] failed to retrieve link info, disabling eDP
[ 97.576496] [drm] Initialized i915 1.6.0 20200917 for 0000:00:02.0 on minor 0
[ 97.611858] i915 0000:00:02.0: [drm] Cannot find any crtc or sizes
[ 97.626128] i915 0000:00:02.0: [drm] Cannot find any crtc or sizes

“drm” is the direct rendering manager (driver) which is what interfaces with the hardware for the transcoding.

Thanks to @EZTutty for digging into the dmesg output and grabbing that.
That’s what I needed to see.

The chain:

/dev/dri/renderD128 → DRM → i915 → QSV ASIC → Video input and output memory buffers (the data we transcode)

So we have to wait for a fix from Synology if I understand correctly? Have you made them aware of what exactly is missing?

Yes, I have made Synology aware of the problem.

Given we have the exact DMESG output showing the failure of the i915 communication, I will forward that too when their Engineering team reaches out to me.

At this point, yes, we must wait for them to fix DSM and issue and update.

I’m curious @ChuckPa. Can you share what the output of the command I provided above should look like, from a working Intel-based Synology NAS?
sudo dmesg | grep -i i915

Just curious about the comparison. It won’t be completely apples-to-apples of course owing to the differing kernel versions. I don’t currently have an Intel-based Synology NAS or I’d do it myself.