Jump to content

Emby Docker - Hardware acceleration devices not showing


Go to solution Solved by mr_man_029,

Recommended Posts

Posted

Hey all, I'm running a docker container of Emby on a local machine running Debian (Intel N150). I'm using the latest emby/embyserver image. For some reason I can't get any devices to show under preferred hardware decoders/ encoders (specifically trying to set up Intel QSV).

In my docker compose file I included the /dev/dri path under the devices parameter, and I also added the render and video groups to the GIDLIST entry (in my case it was 44 and 992 for /dev/dri/card0 and /dev/dri/renderD128). If I look at the hardware detection logs, I see a message "Failed to initialize VA /dev/dri/renderD128. Error -1" (log attached).

I was able to get hardware transcoding to work with a Docker Jellyfin installation, so I'm thinking this has something to do with Emby's configuration that I'm missing. Any advice?

image.thumb.png.f92a81bab3a05b7fd0b0714de7a2ef3a.png

hardware_detection-63899973592.txt

Posted
1 hour ago, darkassassin07 said:

Thanks, I'm not using an Nvidia GPU, I'm trying to get Intel QSV up and running on my N150 machine. I tried out some of your troubleshooting steps though and did a docker exec on the emby container and I could see the group IDs were a match of 44 and 992 for the card0 and renderD128 files. For what it's worth here's the docker compose configuration I'm using:

services:
  emby:
    image: emby/embyserver
    container_name: emby
    network_mode: host # Enable DLNA and Wake-on-Lan
    environment:
      - UID=1000 # The UID to run emby as (default: 2)
      - GID=1000 # The GID to run emby as (default 2)
      - GIDLIST=44,992,1000 # A comma-separated list of additional GIDs to run emby as (default: 2)
    volumes:
      - /home/bryan/emby:/config # Configuration directory
      - /mnt/ssd1/bl-nas:/mnt/ssd1/bl-nas #External SSD media
    ports:
      - 8096:8096 # HTTP port
      - 8920:8920 # HTTPS port
    devices:
      - /dev/dri:/dev/dri # VAAPI/NVDEC/NVENC render nodes
    restart: unless-stopped

Posted

Does vainfo work from the command line?

 

Posted
6 hours ago, darkassassin07 said:
    deploy:
      resources:
        reservations:
          devices:
            - driver: "intel"
              count: all
              capabilities: [gpu]

I think that's still what you're looking for; not certain, this is just what I've found searching around.

https://docs.docker.com/reference/compose-file/deploy/#resources

Thanks again, just tried this and docker gave an error when bringing the container up :(

1 hour ago, Q-Droid said:

Does vainfo work from the command line?

 

Hey yes it does, here's the output

Trying display: wayland
Trying display: x11
error: can't connect to X server!
Trying display: drm
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 25.2.3 ()
vainfo: Supported profile and entrypoints
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileNone                   : VAEntrypointStats
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointFEI
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointFEI
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointFEI
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointFEI
      VAProfileHEVCMain               : VAEntrypointEncSliceLP
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointEncSliceLP
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointEncSliceLP
      VAProfileVP9Profile1            : VAEntrypointVLD
      VAProfileVP9Profile1            : VAEntrypointEncSliceLP
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointEncSliceLP
      VAProfileVP9Profile3            : VAEntrypointVLD
      VAProfileVP9Profile3            : VAEntrypointEncSliceLP
      VAProfileHEVCMain12             : VAEntrypointVLD
      VAProfileHEVCMain12             : VAEntrypointEncSlice
      VAProfileHEVCMain422_10         : VAEntrypointVLD
      VAProfileHEVCMain422_10         : VAEntrypointEncSlice
      VAProfileHEVCMain422_12         : VAEntrypointVLD
      VAProfileHEVCMain422_12         : VAEntrypointEncSlice
      VAProfileHEVCMain444            : VAEntrypointVLD
      VAProfileHEVCMain444            : VAEntrypointEncSliceLP
      VAProfileHEVCMain444_10         : VAEntrypointVLD
      VAProfileHEVCMain444_10         : VAEntrypointEncSliceLP
      VAProfileHEVCMain444_12         : VAEntrypointVLD
      VAProfileHEVCSccMain            : VAEntrypointVLD
      VAProfileHEVCSccMain            : VAEntrypointEncSliceLP
      VAProfileHEVCSccMain10          : VAEntrypointVLD
      VAProfileHEVCSccMain10          : VAEntrypointEncSliceLP
      VAProfileHEVCSccMain444         : VAEntrypointVLD
      VAProfileHEVCSccMain444         : VAEntrypointEncSliceLP
      VAProfileAV1Profile0            : VAEntrypointVLD
      VAProfileHEVCSccMain444_10      : VAEntrypointVLD
      VAProfileHEVCSccMain444_10      : VAEntrypointEncSliceLP

 

Posted

Can't edit my reply for some reason, but I tried vainfo within the emby container itself and this is the output:

/ # vainfo
Trying display: drm
libva info: VA-API version 1.22.0
libva info: Trying to open /lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva error: /lib/dri/iHD_drv_video.so init failed
libva info: va_openDriver() returns 1
libva info: Trying to open /lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva error: /lib/dri/i965_drv_video.so init failed
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

 

GrimReaper
Posted
Just now, mr_man_029 said:

Can't edit my reply for some reason

Rookie Member group has time restriction of 15 minutes for editing posts. 

 

  • Like 1
darkassassin07
Posted (edited)

What was the errror docker gave you? I think we might need a better driver name.

'lsmod' spits out all the driver names on your system. For me 'nvidia' is an option; not sure what the proper name for the intel driver is. 'lsmod | grep intel' for just the intel related lines of lsmod.

 

 

 

From your last two posts, vainfo on the host is succeeding using:

libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so 

While the container is failing with:

libva info: Trying to open /lib/dri/iHD_drv_video.so

 

Bit of an experiment; but what happens if you bind mount that host file to the one in the container? I wonder if the one packaged in the container is outdated or broken somehow.

 

    volumes:
      - /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so:/lib/dri/iHD_drv_video.so

 

If it's not clear; I'm not an Intel guy, just poking around, seeing what I can find.

Edited by darkassassin07
Posted

There are a few threads in the forum discussing the N150 and I thought the latest stable release had the updated drivers needed for this CPU. The compose file looks fine except maybe the port mapping which is not needed and ignored when network_mode is host.

You might want to search the forums for n150 to see if anything in those threads is useful. You can ignore the posts trying to get it to work with Emby 4.8.x.

 

Posted
1 hour ago, darkassassin07 said:

What was the errror docker gave you? I think we might need a better driver name.

'lsmod' spits out all the driver names on your system. For me 'nvidia' is an option; not sure what the proper name for the intel driver is. 'lsmod | grep intel' for just the intel related lines of lsmod.

 

 

 

From your last two posts, vainfo on the host is succeeding using:

libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so 

While the container is failing with:

libva info: Trying to open /lib/dri/iHD_drv_video.so

 

Bit of an experiment; but what happens if you bind mount that host file to the one in the container? I wonder if the one packaged in the container is outdated or broken somehow.

 

    volumes:
      - /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so:/lib/dri/iHD_drv_video.so

 

If it's not clear; I'm not an Intel guy, just poking around, seeing what I can find.

Docker was giving me an error with something like: "Error response from daemon: could not select device driver "i915" with capabilities: [[gpu]]"

I tried to add the volume like you suggested, and there's still some errors with vainfo. The output is a little different but still fails:

/ # vainfo
Trying display: drm
libva info: VA-API version 1.22.0
libva info: Trying to open /lib/dri/iHD_drv_video.so
libva error: dlopen of /lib/dri/iHD_drv_video.so failed: /lib/libm.so.6: version `GLIBC_2.29' not found (required by /lib/dri/iHD_drv_video.so)
libva info: va_openDriver() returns -1
libva info: Trying to open /lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva error: /lib/dri/i965_drv_video.so init failed
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

I'll try looking around the forums a bit more.

  • Solution
Posted

I was looking around the forums and it appears the latest Emby beta has updated Intel drivers (Emby version 4.9.2.6 beta at the time of writing). I changed the image to the beta version within my docker compose (image: emby/embyserver:beta) and that did the trick. I can confirm hardware transcoding is now working :)

Thanks all for the troubleshooting help!

image.thumb.png.495c95f7c1ea0406e1222aec84032960.png

  • Like 2
  • Thanks 1

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...