HW encoding not working on Manjaro with AMD GPU

Forum / NoMachine for Linux / HW encoding not working on Manjaro with AMD GPU

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #42973
    kkalnins
    Participant

    I’ve tried many different things to try and get the H264 hardware encoding working in Manjaro running on a AMD Ryzen 5 PRO 3500U with Vega 8 graphics, but nothing seems to work. I looked in the node logs and there doesn’t seem to be a reason given for the use of the software encoder it just says:

    “Using H.264 software encoder.”

    I’m using version 8.2.3 connecting to a physical display with a Windows client. I’ve attached the session logs.

    Do I need to use some specific AMD driver for it to work?

    #42978
    kkalnins
    Participant

    Added the log with correct extension.

    #43018
    Britgirl
    Participant

    We have had a similar case with another user also using an AMD GPU (albeit a different model). We’ve not been able to reproduce this problem with any of the test set-ups we have (and we have many!). We cannot say if you are experiencing the same problem, but we can give some pointers to check.

    The first thing you need to do is make sure that the resolution is not higher than 1920×1200. Higher resolutions are not supported yet because of problems with some AMD drivers

    Then make sure you have the correct drivers and that they were installed correctly:

    The drivers can be found here https://www.amd.com/en/support/linux-drivers and to install, run

    sudo apt-get install ./amdgpu-install_5.4.50401-1_all.deb

    And after that:

    sudo amdgpu-install --usecase=amf

    Does this change anything?

    By the way, your attachment (was it the server log?) did not attach, so send it to forum[at]nomachine[dot]com.

    #43034
    kkalnins
    Participant

    Hi!
    I’m using Manjaro so the installation was a bit different, but I was able to install AMF together with the AMDGPU-PRO driver and now I get actually some errors:

    0123-01-22 15:53:46 5EFFD6C0 [AMFVideoCore] Warning: AMFVideoCore::Init() Versions Differ, hostVersion=20003 videoCoreVersion=20002

    0123-01-22 15:53:46 5EFFD6C0 [EncodeCore]   Error: ./sources/drivers/enc_core/cmn/vcn1commandpacker.cpp(91):system VCN FW Encode interface version=1.13, expected version=1.14

    0123-01-22 15:53:46 5EFFD6C0 [EncodeCore]   Error: ./sources/drivers/enc_core/cmn/h264config.cpp(559):H264Config::CheckFirmwareVersion(): FirmwareVersion mismatch!

    0123-01-22 15:53:46 5EFFD6C0 [AMFEncoderCoreH264]   Error: ../../../../../runtime/src/components/EncoderCore/EncoderCoreH264Impl.cpp(185):Assertion failed:Failed to create service!

    0123-01-22 15:53:46 5EFFD6C0 [AMFEncoderCoreH264]   Error: ../../../../../runtime/src/components/EncoderCore/EncoderCoreH264Impl.cpp(345):AMF_ERROR 1 : AMF_FAIL: Failed to create encode service!

    0123-01-22 15:53:46 5EFFD6C0 [AMFEncoderCoreH264] Warning: CreateServices failed.

    VCE: WARNING! Failed to create encoder.

    Info: Using H.264 software encoder.

    Looks like I haven’t updated something.

    #43066
    Britgirl
    Participant

    We prepared an article which also includes a section on trouble-shooting AMD drivers, please take a look:

    How to use AMD HW encoder with NoMachine on Linux platforms
    https://kb.nomachine.com/AR02U01190

    and follow the tips there. Do they help?

    #43069
    kkalnins
    Participant

    I finally got hardware encoding to work by installing the 21.XX version of the amdgpu-pro driver.

    The problem now is that the hardware encoder seems to be much worse that the software encoder. I get strange color artifacts and frequent stutters and even complete lockups. Are there any other settings I could tweak?

    My display resolution is 1920×1080

    #43681
    Britgirl
    Participant

    Unfortunately, the problem is with the drivers of your HW encoder and not with NoMachine, so in this particular case, tweaking NoMachine will not help.

    #44389

    I have encountered the same problem with Ubuntu 22.04: “system VCN FW Encode interface version=1.19, expected version=1.20”

    It seems that the Linux-firmware shipped with Ubuntu can be too old for the AMD GPU driver

    The solution is to update the firmware for my Renoir APU:

    $ git clone –depth 1 https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git

    $ sudo cp linux-firmware/amdgpu/renoir_* /lib/firmware/amdgpu/

    $ sudo update-initramfs -u

    After that I verified that the driver loads the firmware it wants:

    $ sudo dmesg |grep VCN

    [drm] Found VCN firmware Version ENC: 1.20 DEC: 5 VEP: 0 Revision: 3

    Now I got hardware encoding acceleration:

    $ grep VCE .nx/node/C-*/session

    Info: Using VCE hardware encoder

    I am not getting glitches nor lockups with the latest AMD GPU driver as of right now.

    apt show amdgpu

    Package: amdgpu

    Version: 1:5.4.50405-1577590.22.04

    #44396
    Britgirl
    Participant

    Thanks for your contribution. It confirms what I previously wrote. This topic is now going to be closed.

Viewing 9 posts - 1 through 9 (of 9 total)

This topic was marked as solved, you can't post.