Jump to content
westont

ANSWERED Debian Buster VAAPI transcoding "Failed to initialize"

Recommended Posts

westont

I feel like I'm very close to having hardware acceleration working again, after switching to Debian Buster in a container, but I can't quite get it.

 

This is  AMD A10-5700, with Radeon HD 7660D. Please any help?

 

As user emby, my ''vainfo'':

error: can't connect to X server!
libva info: VA-API version 1.4.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
libva info: Found init function __vaDriverInit_1_4
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.4 (libva 2.4.0)
vainfo: Driver version: Mesa Gallium driver 18.3.4 for AMD ARUBA (DRM 2.50.0 / 4.15.0-46-generic, LLVM 7.0.1)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileNone                   : VAEntrypointVideoProc

My hardware_detection log:

{"Key":"vaapi","Decription":"vaapi"},"qsv":{"Key":"qsv","Decription":"qsv"},"cuvid":{"Key":"cuvid","Decription":"cuvid"}}},"DetectionOutputs":[{"CodecProviderName":"Vaapi","StandardError":"\n","Result":{
    "ProgramVersion": {
        "Version": "4.0.2-emby_2018_12_09",
        "Copyright": "Copyright (c) 2018-2018 softworkz for Emby Llc",
        "Compiler": "gcc 6.3.0 (crosstool-NG crosstool-ng-1.23.0)",
        "Configuration": "--cc=x86_64-pc-linux-gnu-gcc --arch=x86_64 --prefix=/home/embybuilder/Buildbot/x64/ffmpeg-x64/staging --pkg-config=pkg-config --disable-doc --disable-ffplay --disable-vdpau --disable-xlib --enable-fontconfig --enable-gnutls --enable-gpl --enable-iconv --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libwebp --enable-libx264 --enable-libzvbi --enable-version3 --enable-libsmbclient --enable-cuda --enable-cuvid --enable-libmfx --enable-nvenc --enable-vaapi --enable-cross-compile --cross-prefix=x86_64-pc-linux-gnu- --extra-libs='-lexpat -lfreetype -lfribidi -lfontconfig -liconv -lpng -lz -lvorbis -logg -lnettle -lhogweed -lgmp -laddns-samba4 -lasn1util-samba4 -lauthkrb5-samba4 -lCHARSET3-samba4 -lcliauth-samba4 -lcli-cldap-samba4 -lcli-ldap-common-samba4 -lcli-nbt-samba4 -lcli-smb-common-samba4 -lcom_err -lcommon-auth-samba4 -ldbwrap-samba4 -ldcerpc-binding -ldcerpc-samba-samba4 -ldl -lflag-mapping-samba4 -lgenrand-samba4 -lgensec-samba4 -lgse-samba4 -lgssapi_krb5 -llibcli-lsa3-samba4 -llibsmb-samba4 -linterfaces-samba4 -liov-buf-samba4 -lk5crypto -lkrb5 -lkrb5samba-samba4 -lkrb5support -lldb -lldbsamba-samba4 -lmessages-dgm-samba4 -lmessages-util-samba4 -lmsghdr-samba4 -lmsrpc3-samba4 -lndr -lndr-krb5pac -lndr-nbt -lndr-samba-samba4 -lndr-standard -lreplace-samba4 -lsamba-cluster-support-samba4 -lsamba-credentials -lsamba-debug-samba4 -lsamba-errors -lsamba-hostconfig -lsamba-modules-samba4 -lsamba-security-samba4 -lsamba-sockets-samba4 -lsamba-util -lsamba3-util-samba4 -lsamdb -lsamdb-common-samba4 -lsecrets3-samba4 -lserver-id-db-samba4 -lserver-role-samba4 -lsmbconf -lsmbd-shim-samba4 -lsmb-transport-samba4 -lsocket-blocking-samba4 -lsys-rw-samba4 -ltalloc -ltalloc-report-samba4 -ltdb -ltdb-wrap-samba4 -ltevent -ltevent-util -ltime-basic-samba4 -lutil-cmdline-samba4 -lutil-reg-samba4 -lutil-setid-samba4 -lutil-tdb-samba4 -luuid -lwbclient -lwinbind-client-samba4 -ldrm' --target-os=linux --enable-shared --disable-static"
    },
    "Devices": [
        {
            "DeviceIndex": 0,
            "DeviceInfo": {
                "VendorName": "Advanced Micro Devices, Inc. [AMD/ATI]",
                "DeviceName": "Trinity [Radeon HD 7660D]",
                "SubsytemVendorName": "ASRock Incorporation",
                "VendorId": 4098,
                "DeviceId": 39169,
                "SubsytemVendorId": 6217,
                "SubsytemDeviceId": 39169,
                "DevPath": "/sys/bus/pci/devices/0000:00:01.0",
                "DrmCard": "/dev/dri/card0",
                "DrmRender": "/dev/dri/renderD128",
                "IsEnabled": 1,
                "IsBootVga": 1,
                "Error": {
                    "Number": -1,
                    "Message": "Failed to initialize VA /dev/dri/renderD128. Error -1"
                }
            }
        }
    ],
    "Log": [
        {
            "Level": 48,
            "Category": 0,
            "Message": "Begin GetVaAdapterInfo"
        },
        {
            "Level": 40,
            "Category": 0,
            "Message": "Found 24 device entries"
        },
        {
            "Level": 48,
            "Category": 0,
            "Message": "Begin get_nodes"
        },
        {
            "Level": 48,
            "Category": 0,
            "Message": "Found 3 drm entries"
        },
        {
            "Level": 48,
            "Category": 0,
            "Message": "End GetVaAdapterInfo"
        }
    ]
}

And a portion of the output when I run ''ffdetect vaencdec'':

[DEVICE]
DeviceIndex=0
DEVICEINFO:VendorName=Advanced Micro Devices, Inc. [AMD/ATI]
DEVICEINFO:DeviceName=Trinity [Radeon HD 7660D]
DEVICEINFO:SubsytemVendorName=ASRock Incorporation
DEVICEINFO:VendorId=4098
DEVICEINFO:DeviceId=39169
DEVICEINFO:SubsytemVendorId=6217
DEVICEINFO:SubsytemDeviceId=39169
DEVICEINFO:DevPath=/sys/bus/pci/devices/0000:00:01.0
DEVICEINFO:DrmCard=/dev/dri/card0
DEVICEINFO:DrmRender=/dev/dri/renderD128
DEVICEINFO:IsEnabled=1
DEVICEINFO:IsBootVga=1
DEVICEINFO:ApiVersionMajor=1
DEVICEINFO:ApiVersionMinor=4
DEVICEINFO:Driver=Mesa Gallium driver 18.3.4 for AMD ARUBA (DRM 2.50.0 / 4.15.0-46-generic, LLVM 7.0.1)
[DECODER]
CodecName=MPEG2VIDEO
CodecProfile=MPEG2_SIMPLE
CodecId=2
MaxWidth=2048
MaxHeight=1152
ColorFormats=NV12
RTFormat=1
[/DECODER]
[DECODER]
CodecName=MPEG2VIDEO
CodecProfile=MPEG2_MAIN
CodecId=2
MaxWidth=2048
MaxHeight=1152
ColorFormats=NV12
RTFormat=1
[/DECODER]

Here is my /dev/dri/:

emby@emby:/$ ls -lha /dev/dri
total 0
drwxr-xr-x 2 root root       100 Mar 16 12:23 .
drwxr-xr-x 9 root root       500 Mar 16 12:23 ..
crw-rw---- 1 root video 226,   0 Mar 16 12:23 card0
crw-rw---- 1 root video 226,   0 Mar 16 12:23 controlD64
crw-rw---- 1 root video 226, 128 Mar 16 12:23 renderD128

What else can I provide to help?

Share this post


Link to post
Share on other sites
Luke

We have not yet tested buster so we will not have all the answers here. But first thing I would do is make sure you have the latest graphics drivers installed for your hardware.

Share this post


Link to post
Share on other sites
westont

We have not yet tested buster so we will not have all the answers here. But first thing I would do is make sure you have the latest graphics drivers installed for your hardware.

 

Thanks Luke - I'm with you on making sure the latest graphics are installed, that's actually why I went to Buster rather than Stretch (it uses old gallium driver).

Ubuntu 18.04 is based off Debian Buster - the two are very similar.

 

I spun up a new Ubuntu 18.04 container, installed vainfo and pciutils, and then installed emby. 

The transcoding options appeared right away on this same system. Here is the Ubuntu vainfo:

error: XDG_RUNTIME_DIR not set in the environment.
error: can't connect to X server!
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Mesa Gallium driver 18.2.2 for AMD ARUBA (DRM 2.50.0 / 4.15.0-46-generic, LLVM 7.0.0)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileNone                   : VAEntrypointVideoProc

And here is the emby hardware detection section, again on the same computer, just now from an Ubuntu container instead of Debian Buster:

    "Devices": [
        {
            "DeviceIndex": 0,
            "DeviceInfo": {
                "VendorName": "Advanced Micro Devices, Inc. [AMD/ATI]",
                "DeviceName": "Trinity [Radeon HD 7660D]",
                "SubsytemVendorName": "ASRock Incorporation",
                "VendorId": 4098,
                "DeviceId": 39169,
                "SubsytemVendorId": 6217,
                "SubsytemDeviceId": 39169,
                "DevPath": "/sys/bus/pci/devices/0000:00:01.0",
                "DrmCard": "/dev/dri/card0",
                "DrmRender": "/dev/dri/renderD128",
                "IsEnabled": 1,
                "IsBootVga": 1,
                "ApiVersionMajor": 1,
                "ApiVersionMinor": 3,
                "Driver": "Mesa Gallium driver 18.2.2 for AMD ARUBA (DRM 2.50.0 / 4.15.0-46-generic, LLVM 7.0.0)"
            },
            "Decoders": [
                {
                    "CodecName": "MPEG2VIDEO",
                    "CodecProfile": "MPEG2_SIMPLE",
                    "CodecId": 2,
                    "MaxWidth": 2048,
                    "MaxHeight": 1152,
                    "ColorFormats": "NV12 ",
                    "RTFormat": 1
                },
                {
                    "CodecName": "MPEG2VIDEO",
                    "CodecProfile": "MPEG2_MAIN",
                    "CodecId": 2,
                    "MaxWidth": 2048,
                    "MaxHeight": 1152,
                    "ColorFormats": "NV12 ",
                    "RTFormat": 1
                },

I went to Buster because it wasn't working under Debian Stretch. Debian Stretch wouldn't use the r600 driver that Ubuntu and Buster do.

 

As you can see above, I have the same video driver in Buster and Bionic. The Debian Buster is slightly newer than the Ubuntu Bionic driver.

 

I can go back to Ubuntu if I have to, but I'm hoping this is a simple difference on Debian (Stretch and Buster, but Buster is much close to Ubuntu 18.04) that should be solvable.

 

Thanks @@Luke and @@softworkz.

Edited by westont

Share this post


Link to post
Share on other sites
softworkz

I'm afraid, I can't help you here as long as you're running Emby inside a container.

  • Like 1

Share this post


Link to post
Share on other sites
westont

Wow - I really didn't expect that response. I understand that complicates it, but Emby works fine within an Ubuntu 18.04 container. 

You can see that vainfo and ffdetect give good results inside both the Ubuntu container and Debian container. 

 

Best to you.

Share this post


Link to post
Share on other sites
softworkz

Please understand - it happens on all ends that things are getting complicated. Our range of hw accelerations is pretty broad anyway, and on each end, there a potential "multipliers". It's impossible to pursue each individual one if you don't want to loose focus. 

 

But maybe there are other users that can help...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...