Skip to content

[Question]: AMF initialization issue for VCE encoding in NoMachine (nxserver/nxnode) on Radeon HD 8330E (Kabini, VCE 2.0) #567

@kszwaba

Description

@kszwaba

Description

I am trying to use AMF for hardware H.264 encoding in NoMachine (processes nxserver / nxnode) on a system with an AMD Radeon HD 8330E (integrated in AMD GX-424CC SoC, GCN 1.1 "Kabini", VCE 2.0) in HP T620 terminal.

GPU identification:

root@kszwaba-HP-t620-Quad-Core-TC:/home/kszwaba# dmesg | grep -iE 'vce|uvd|amdgpu|radeon'
[    0.459555] smpboot: CPU0: AMD GX-415GA SOC with Radeon(tm) HD Graphics (family: 0x16, model: 0x0, stepping: 0x1)
[    5.829795] [drm] amdgpu kernel modesetting enabled.
[    5.829806] [drm] amdgpu version: 6.12.12
[    5.830117] amdgpu: Virtual CRAT table created for CPU
[    5.830168] amdgpu: Topology: Add CPU node
[    5.872846] amdgpu: PeerDirect support was initialized successfully
[    5.873620] amdgpu 0000:00:01.0: amdgpu: detected ip block number 0 <cik_common>
[    5.873628] amdgpu 0000:00:01.0: amdgpu: detected ip block number 1 <gmc_v7_0>
[    5.873633] amdgpu 0000:00:01.0: amdgpu: detected ip block number 2 <cik_ih>
[    5.873638] amdgpu 0000:00:01.0: amdgpu: detected ip block number 3 <gfx_v7_0>
[    5.873642] amdgpu 0000:00:01.0: amdgpu: detected ip block number 4 <cik_sdma>
[    5.873646] amdgpu 0000:00:01.0: amdgpu: detected ip block number 5 <kv_dpm>
[    5.873650] amdgpu 0000:00:01.0: amdgpu: detected ip block number 6 <dce_v8_0>
[    5.873654] amdgpu 0000:00:01.0: amdgpu: detected ip block number 7 <uvd_v4_2>
[    5.873658] amdgpu 0000:00:01.0: amdgpu: detected ip block number 8 <vce_v2_0>
[    5.924848] amdgpu 0000:00:01.0: amdgpu: Fetched VBIOS from ROM BAR
[    5.924858] amdgpu: ATOM BIOS: 1950150001
[    5.925014] kfd kfd: amdgpu: KABINI  not supported in kfd
[    5.925282] amdgpu 0000:00:01.0: vgaarb: deactivate vga console
[    5.925291] amdgpu 0000:00:01.0: amdgpu: Trusted Memory Zone (TMZ) feature not supported
[    5.926938] amdgpu 0000:00:01.0: amdgpu: VRAM: 1024M 0x0000000F00000000 - 0x0000000F3FFFFFFF (1024M used)
[    5.926946] amdgpu 0000:00:01.0: amdgpu: GART: 1024M 0x0000000000000000 - 0x000000003FFFFFFF
[    5.927192] [drm] amdgpu: 1024M of VRAM memory ready
[    5.927198] [drm] amdgpu: 3429M of GTT memory ready.
[    5.929771] [drm] amdgpu: dpm initialized
[    5.929870] [drm] AMDGPU Display Connectors
[    5.930400] [drm] Found UVD firmware Version: 1.64 Family ID: 9
[    5.931017] [drm] Found VCE firmware Version: 50.10 Binary ID: 2
[    5.957746] [drm] UVD initialized successfully.
[    6.067080] [drm] VCE initialized successfully.
[    6.068386] amdgpu 0000:00:01.0: amdgpu: SE 1, SH per SE 1, CU per SH 2, active_cu_number 2
[    6.069357] amdgpu: legacy kernel without apple_gmux_detect()
[    6.069363] amdgpu 0000:00:01.0: amdgpu: Runtime PM not available
[    6.071017] [drm] Initialized amdgpu 3.63.0 20150101 for 0000:00:01.0 on minor 0
[    6.170497] fbcon: amdgpudrmfb (fb0) is primary device
[    6.170521] amdgpu 0000:00:01.0: [drm] fb0: amdgpudrmfb frame buffer device
[    7.100670] [drm:amdgpu_device_ip_set_powergating_state [amdgpu]] *ERROR* set_powergating_state of IP block <vce_v2_0> failed -22

The problem is that AMF initialization for VCE encoding appears to fail silently — NoMachine falls back to software encoding.

I have tested both the newest and oldest available AMDGPU PRO drivers (with AMF) from the official AMD repositories:

Newest driver tested

Source: https://repo.radeon.com/amdgpu-install/latest/ubuntu/jammy/

ii  amdgpu-core                   1:6.4.60402-2187269.22.04
ii  amdgpu-dkms                   1:6.12.12.60402-2187269.22.04
ii  amdgpu-dkms-firmware          1:6.12.12.60402-2187269.22.04
ii  amdgpu-install                6.4.60402-2187269.22.04
ii  amdgpu-pro-core               25.10-2187634.22.04
ii  amf-amdgpu-pro:amd64          1.4.37-2187634.22.04
ii  libamdenc-amdgpu-pro:amd64    25.10-2187634.22.04
ii  libdrm-amdgpu-amdgpu1:amd64   1:2.4.124.60402-2187269.22.04
ii  libdrm-amdgpu-common          1.0.0.60402-2187269.22.04
ii  libdrm-amdgpu1:amd64          2.4.113-2~ubuntu0.22.04.1
ii  libdrm2-amdgpu:amd64          1:2.4.124.60402-2187269.22.04
ii  xserver-xorg-video-amdgpu     22.0.0-1ubuntu0.2

Oldest driver tested

Source: https://repo.radeon.com/amdgpu/23.20.00.48/ubuntu/

ii  amdgpu-core                   1:5.7.00.48.50700-1666569.22.04
ii  amdgpu-dkms                   1:6.2.4.50700-1666569.22.04
ii  amdgpu-dkms-firmware          1:6.2.4.50700-1666569.22.04
ii  amdgpu-install                5.7.00.48.50700-1666569.22.04
ii  amdgpu-pro-core               23.20.00.48-1666589.22.04
ii  amf-amdgpu-pro:amd64          1.4.31-1666589.22.04
ii  libamdenc-amdgpu-pro:amd64    1.0-1666589.22.04
ii  libdrm-amdgpu-amdgpu1:amd64   1:2.4.115.50700-1666569.22.04
ii  libdrm-amdgpu-common          1.0.0.50700-1666569.22.04
ii  libdrm-amdgpu1:amd64          2.4.113-2~ubuntu0.22.04.1
ii  libdrm2-amdgpu:amd64          1:2.4.115.50700-1666569.22.04
ii  xserver-xorg-video-amdgpu     22.0.0-1ubuntu0.2
ii  vulkan-amdgpu-pro:amd64       23.20.00.48-1666589.22.04

I also attempted to test with suggested by NoMachine driver version amdgpu-install_22.20.50200-1_all.deb but some required packages are no longer available.


Observations / strace output

nxnode opens /opt/amdgpu-pro/lib/x86_64-linux-gnu/libamfrt64.so but encoding still falls back to software.

Example from lsof:

nxnode.bin 9216 mem REG 8,2 8359976 /opt/amdgpu-pro/lib/x86_64-linux-gnu/libamfrt64.so.1.4.31

From strace:

openat(AT_FDCWD, "/sys/class/drm/renderD128/device/vendor", O_RDONLY) = ...
/sys/class/drm/renderD128/device/vendor -> 0x1002 (AMD)

System details

  • OS: Linux Mint 21.3 (based on Ubuntu 22.04.4 LTS)
  • Kernel: 5.15.0-144-generic
  • GPU: AMD Radeon HD 8330E (VCE 2.0, GCN 1.1 "Kabini")
  • CPU: AMD GX-424CC SoC
  • AMF library: from amdgpu-pro package (see versions above)
  • Application: NoMachine 9.1.24 (nxserver/nxnode)
  • DISPLAY: X11 session, MATE desktop

Question

Does AMF currently support VCE-based hardware encoding on Radeon HD 8330E / Kabini (VCE 2.0) with the above driver versions?
If yes, is there a known requirement or workaround to ensure that AMF initializes properly in a headless/non-GUI process like nxnode?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions