Jump to content

AMD GPU not showing up as transcoding option


Go to solution Solved by softworkz,

Recommended Posts

Posted

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

Posted

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?

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

Posted

@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
Posted (edited)

@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
Posted

Well that's not quite true. Emby can always fall back to cpu.

Posted

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

 

Posted

Right well as softworkz is alluding to you may need to configure them in your bios.

BAlGaInTl
Posted

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.

Posted

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

Posted

@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

Posted (edited)

wrong account 😶

Edited by Smigie
Posted

@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?

  • Solution
Posted (edited)
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
  • 2 weeks later...
Posted

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!

Posted

Thanks for the feedback!

  • 2 months later...
Posted

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.

Posted (edited)

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
Posted

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

Posted (edited)

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

https://hub.docker.com/r/gudszent/emby_ryzen

dont forget to set the permission from the description

 

ps.: Yes, I know, the img big, but the AMD driver 800MB :D

Edited by gudszent
  • Like 1
Posted
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?

Posted (edited)

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
Posted

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.

 

 

Posted

@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 :)

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