[Question]: AMF can run on centos 7.9?
OS: Centos 7.9 Display Adapter: AMD RX 470 Amd Driver: Radeon™ Software for Linux® installer version 22.20 for RHEL/CentOS 7.9
The m_pDisplayCapture->Init return AMF_FAIL
In journallog, has error message
[AMFScreenCaptureEngineImplDRM] Error: ../../../../../runtime/src/components/ScreenCapture/drm/ScreenCaptureEngineDRM.
cpp(944):Couldn't open /dev/dri/by-path
[AMFScreenCaptureEngineImplDRM] Error: ../../../../../runtime/src/components/ScreenCapture/drm/ScreenCaptureEngineDRM.
cpp(209):Assertion failed:Couldn't find matching path in /dev/dri/by-path
[AMFScreenCaptureImpl] Error: ../../../../../runtime/src/components/ScreenCapture/ScreenCaptureImpl.cpp(289):AMF_ERROR
1 : AMF_FAIL: InitDisplayCapture() failed
The Xorg is running OK, and gnome desktop is running OK. lspci command show GPU driver is loading. But /dev/dri/by-path not exist.
lspci -k
00:08.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X] (rev cf)
Subsystem: PC Partner Limited / Sapphire Technology Radeon RX 470/480
Kernel driver in use: amdgpu
Kernel modules: amdgpu
ls /dev/dri
card0 renderD128
It seems that missing /dev/dri/by-path ? how it generated?
What does "ls -l /dev/dri/by-path" return? Do you run Virtual Machine or Baremetal? Do you run as sudo?
ls -l /dev/dri/by-path ls: cannot access /dev/dri/by-path: No such file or directory run user: root Virtual Machine and Baremetal has the same issue.
By compare Ubuntu 20.04, we found the /dev/dri/by-path is created by udev /usr/lib/udev/rules.d/60-drm.rules
# do not edit this file, it will be overwritten on update
ACTION!="remove", SUBSYSTEM=="drm", SUBSYSTEMS=="pci|usb|platform", IMPORT{builtin}="path_id"
# by-path
ENV{ID_PATH}=="?*", KERNEL=="card*", SYMLINK+="dri/by-path/$env{ID_PATH}-card"
ENV{ID_PATH}=="?*", KERNEL=="controlD*", SYMLINK+="dri/by-path/$env{ID_PATH}-control"
ENV{ID_PATH}=="?*", KERNEL=="renderD*", SYMLINK+="dri/by-path/$env{ID_PATH}-render"
In centos 7.9, the file /usr/lib/udev/rules.d/60-drm.rules has no by-path content
# do not edit this file, it will be overwritten on update
ACTION!="remove", SUBSYSTEM=="drm", SUBSYSTEMS=="pci|usb|platform", IMPORT{builtin}="path_id"
Is the centos 7.9 UDEV version lower?