Jump to content

AMD GPU not showing up as transcoding option


ProAce
Go to solution Solved by softworkz,

Recommended Posts

A couple days ago I switched to Emby from Plex and have loved every minute of it.
Hardware transcoding worked out of the box on my (old) Intel I5. To give it a bit more power I added a RX460 that I had lying around to my ubuntu (20.04) server.

However after adding the GPU and installing the drivers Emby doesn't show any hardware decoding options, not even the CPU ones I had previously.
I tried installing the different flavours of AMD drivers as well as installing the Emby beta, without any luck.

I gathered some logs from when I had only the CPU installed and when I added the GPU. In the logs I spotted the following error:

Failed to initialize VA /dev/dri/renderD128. Error -1

But I wasn't able to find an apparent solution for it. What could I try to get it to work?

Emby logs.zip

Link to comment
Share on other sites

I have followed that guide yeah. I opted for the headless install, but even with a display attached it doesn't function. It seems to come from the initialization error I posted.

Is there no fallback mechanism where Emby would use the CPU HA if the GPU fails to load?

Link to comment
Share on other sites

Quote

Is there no fallback mechanism where Emby would use the CPU HA if the GPU fails to load?

Hi, yes we have this automatically.

Link to comment
Share on other sites

@ProAce - The availability of your CPU-integrated graphics is controlled by the BIOS. 

The default, it's often working in a way that the integrated GPU gets disabled when a discrete graphics adapter is installed.
You'll need to check your BIOS setting to find a way to have both active at the same time.

On 10/14/2020 at 9:24 PM, ProAce said:

I opted for the headless install,

Where did you have a choice to do a "headless install"?

Which AMD driver did you install exactly?

Could you please post the hardware detection log?

  • Like 1
Link to comment
Share on other sites

@softworkz Now you mention it I did know about this setting, but never thought about it when trouble shooting. That explains why emby isn't able to fall back onto the CPU hardware acceleration.

As for the headless install, I followed this guide from AMD where they have the option to do the headless install: https://www.amd.com/en/support/kb/faq/amdgpu-installation
I installed the newest version, namely 20.04.1

I included the hardware detection logs in my first post. The zip contains the logs from the CPU only and the CPU+GPU cases.

Edited by ProAce
Link to comment
Share on other sites

It falls back to the software en/decoder currently. When the iGPU is disabled when a dGPU is installed I assume Emby can't access the hardware acceleration? 

The point is that when both the CPU and dGPU are installed the server offers no hardware acceleration options and throws the following error in the hardware_detection log:

Failed to initialize VA /dev/dri/renderD128. Error -1

 

Link to comment
Share on other sites

BAlGaInTl

Out of curiosity... how old is the i5? 

In general, Quick Sync on Intel is pretty good.  What's the justification for adding the RX460?  I'm not sure that will really help much with decoding unless I'm missing something.

Link to comment
Share on other sites

By configuring the iGPU correctly in BIOS the fallback is working. So now it uses the CPU when the GPU is installed as well, but that doesn't make the situation exactly better.

@BAlGaInTl The CPU in my server is an older I5-3570k without hardware support for HVEC (h.265) and the RX460 does have support. And as I wanted to be able to decode multiple streams it didn't seem like a bad idea to add some more power.

I added the latest hardware detection with the fallback working.

hardware_detection-63738894384.txt

Link to comment
Share on other sites

@ProAce - Thanks for the latest detection log.

Let's clear up the terms first:

  • We say "fallback", when hardware accelerated transcoding fails and Emby uses CPU-based (software-)transcoding
  • Intel processors that can do hw acceleration, have an integrated GPU which does the acceleration. As such, it is neither "CPU-based" nor "fallback"

What you have done is this:

  • You had set up Emby with hw acceleration (Intel integrated graphics) working
  • Then you added another graphics adapter which disabled the Intel Graphics
    => no more acceleration
  • You changed the Bios so it doesn't disable the Intel graphics
    => Intel graphics acceleration working again

So why no AMD graphics acceleration?

I looked it up on the AMD page from where you downloaded the drivers:

image.png.79004ad56a0afdcf7ca8cf8dd61785f5.png

Link to comment
Share on other sites

@softworkz Thank you for looking into this and clearing things up for me! I totally mist that bit of explanation on AMD's website.

So to fix this I would need to reinstall the driver properly this time and install one of those display faker dongles right?

Link to comment
Share on other sites

  • Solution
On 10/27/2020 at 11:42 PM, ProAce said:

install one of those display faker dongles right?

Probably not. Both devices show up in hw detection as enabled, with the AMD even being the boot vga:

image.png.8c98dd20c192c49c16b8afcc3ae82f50.png

Installing the driver should be sufficient.

Edited by softworkz
Link to comment
Share on other sites

  • 2 weeks later...

That indeed did the trick, now I can select all the available hardware decoders.
It's not as performant as I had hoped, but that is due to my hardware and not Emby's software.

@softworkz Thank you for helping figuring this out!

Link to comment
Share on other sites

  • 2 months later...

Hi,

@softworkz I'm currently trying to get this to work on Unraid and your official Emby container and eventually write a plugin for the users so that the installation is easier for the users.

So does this mean I only need to install the Pro OpenCL driver on the Host (Unraid), 'modprobe amdgpu' pass through '/dev/dri' to the Container and I'm good to go?

The Background to this is that so many users have actually a Ryzen 3200G system and they want to use hardware accelerated transcoding.

Link to comment
Share on other sites

Unfortunately, "Docker" is one of the very few things where I have absolutely no knowledge about, but I'm sure that a few other users will be able to help you with this.!

sw

Edited by softworkz
Link to comment
Share on other sites

Okay and thank you for the speedy response @softworkz. :)

I only can imagine that I have to install the driver also in the container and on the host!?

 

If anyone else can help here it would be really great, will try and if I found a solution I will let you know.

 

I included also the hardware detection log.

hardware_detection.log

Link to comment
Share on other sites

18 minutes ago, gudszent said:

I have also 3200g, here my docker img. Ubunutu 20.04, os not need the amd driver

I don't understand that completely. So you are saying that the host doesn't need the AMD driver installed, it is enough to install it in the container and only do a modprobe on the host?

Link to comment
Share on other sites

gudszent

I didnt install driver on host, only in docker, so my steps:

Install clear ubuntu 20.04.2

install docker

run that docker image, and:(dont forget run the permission settings :))

1718440053_kp.thumb.png.3e4d6d9a2e716c9586af905e1bc91b58.png

My compose:

version: "2.1"
services:
  emby:
    image: gudszent/emby_ryzen
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
    volumes:
      - emby_config:/config
    ports:
      - 8096:8096
    devices:
      - /dev/dri:/dev/dri
    restart: unless-stopped
volumes:
  emby_config:

Edited by gudszent
Link to comment
Share on other sites

revkiemby

hi gudszent, thank you for the image. Works perfectly well with AMD Ryzen 5 3400G. Before pulled your image I used plain docker image:linuxserver/emby with drivers installed on host. vaapi hardware encoding didn't work in original image but did in a jellyfin container as well as in a undockerized tvheadend. So now I have the drivers installed in both host and docker image. It´s using double space but runnig ok.

 

 

Link to comment
Share on other sites

@softworkz may I ask if you want/have interest to implement the required libraries from the AMDPRO drivers so that it actually supports it OOB?

 

The only files that you need should be:

libdrm_amdgpu.so.1.*
libdrm.so.2.*
libva-drm.so.2.*
libva.so.2.*
libstdc++.so.6.*
radeonsi_drv_video.so

If you need further assistance please contact me and I'm happy to help :)

Link to comment
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...