Ashark / archlinux-amdgpu-pro

Radeon Software for Linux (AMDGPU PRO) PKGBUILD generator for ArchLinux AUR
https://aur.archlinux.org/pkgbase/amdgpu-pro-installer/
119 stars 25 forks source link

ffmpeg Firmware expected error on amf encode 7900 XTX #85

Closed ShadwDrgn closed 1 year ago

ShadwDrgn commented 1 year ago

I'm curious if there is some way to get updated drivers such that I would not have to downgrade my system firmware package in order to utilize AMF encoding in ffmpeg. Currently I have: pacman -Q | grep stuff linux-firmware 20230210.bf4115c-1 mesa 23.0.2-2 amf-amdgpu-pro 22.40_1538781-1 amdgpu-pro-oglp 22.40_1538781-1 vulkan-amdgpu-pro 22.40_1538781-1

and I'm getting the following error trying to ffmpeg encode to amf av1: https://pastebin.com/YbS9RFPj

Let me know if there is any further detail i can provide. Any help or advise would be greatly appreciated! Thanks in advance P.S. Came here from https://aur.archlinux.org/packages/amdgpu-pro-oglp where user mesmer suggested posting debug logs to an issue on this github, but didn't see anyone having posted them, so i thought i'd drop them in this issue

mesmerx commented 1 year ago

first thx for coming here, its easier to write and get fixed as we only translate the deb package to a arch package sometimes this can be hard or even broken saying that there`s a big chance that the driver is broken in amd itself, it happened a bunch of times in other days for 6k series and i found that the latest driver have some issues in the amd github this log tell me that too

v1_amf @ 0x5606b52a6900] EncodeCore: 0123-03-12 15:26:52 B14F7080 [EncodeCore]   Error: ./sources/drivers/enc_core/cmn/vcn4commandpacker.cpp(90):system VCN FW Encode interface version=1.9, expected version=1.8
[av1_amf @ 0x5606b52a6900] EncodeCore: 0123-03-12 15:26:52 B14F7080 [EncodeCore]   Error: ./sources/drivers/enc_core/cmn/av1config.cpp(239):Av1Config::CheckFirmwareVersion(): FirmwareVersion mismatch!

what i gonna ask you so we can debug that is

1: with older firmware this version works? 2: try older version of this package with the newest firmware, if it works we can try to a workaround mixing versions 3: if you can try a ubuntu (maybe a live iso) to see if in ubuntu the problem keep happening, if so yeah we dont have much to do

if we found with older firmware it works i`ll add in a wiki about that

mesmerx commented 1 year ago

and last thing if you find a solution or a fix fell free to open a PR for it

mesmerx commented 1 year ago

https://github.com/GPUOpen-LibrariesAndSDKs/AMF/issues/369 can you see if you are in this issue?

ShadwDrgn commented 1 year ago

It does not appear that issue is the same as mine as no mention of firmware is really in that thread's logs. I haven't tested downgrading my linux-firmware package because i really prefer avoiding that for security reasons in general, and i'm not certain how to use an older version via aur of this package. I can look into those things temporarily for debugging purposes but it may take me some time. Will try to test ubuntu live iso this weekend. hopefully w/e amd's next driver release is will fix this though and that'll be that.

mesmerx commented 1 year ago

The part that i pasted here is from your log, with av1 encoder, that tell me that it's happening a firmware mismatch I'll paste here a how to downgrade this package, but should be easier as go to tag get a older version get the PKGBUILD and makepkg -if

RiantAnda commented 1 year ago

I'm getting the same error: [h264_amf @ 0x55ab62cc2cc0] CreateComponent(AMFVideoEncoderVCE_AVC) failed with error 1 [vost#0:0/h264_amf @ 0x55ab62cc19c0] Error initializing output stream: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

I tried 22.40_1538781-1 and 22.20.5_1511376-2, issue is identical.

mesmerx commented 1 year ago

@RiantAnda please tell me your GPU, the command that generated it (what was the ffmped parameters), if firmware downgrade worked for you

this log can say that the encoder is not working or the api changed not working, the obs-amf-test returns what?

mesmerx commented 1 year ago

vk_pro vkmark works? https://wiki.archlinux.org/title/AMDGPU_PRO

meutraa commented 1 year ago

Just adding some logs and information.

Package Version
linux 6.2.12-arch1-1
linux-firmware 20230210.bf4115c-1
amdgpu-pro-oglp 22.40_1538781-1
amf-amdgpu-pro 22.40_1538781-1
vulkan-amdgpu-pro 22.40_1538781-1
ffmpeg 2:6.0-4
vk_pro vkmark ``` ======================================================= vkmark 2017.08 ======================================================= Vendor ID: 0x1002 Device ID: 0x744C Device Name: AMD Radeon RX 7900 XTX Driver Version: 8388855 Device UUID: e7f7358b159956e5b6fc0ada206de0fb ======================================================= [vertex] device-local=true: FPS: 28088 FrameTime: 0.036 ms ```
vk_pro obs-amf-test ``` 0123-03-24 13:38:47 546F740 [AMFVideoCore] Warning: AMFVideoCore::Init() Versions Differ, hostVersion=20003 videoCoreVersion=20002 0123-03-24 13:38:47 546F740 [EncodeCore] Error: ./sources/drivers/enc_core/cmn/vcn4commandpacker.cpp(90):system VCN FW Encode interface version=1.9, expected version=1.8 0123-03-24 13:38:47 546F740 [EncodeCore] Error: ./sources/drivers/enc_core/cmn/h264config.cpp(559):H264Config::CheckFirmwareVersion(): FirmwareVersion mismatch! 0123-03-24 13:38:47 546F740 [AMFEncoderCoreH264] Error: ../../../../../runtime/src/components/EncoderCore/EncoderCoreH264Impl.cpp(185):Assertion failed:Failed to create service! 0123-03-24 13:38:47 546F740 [AMFEncoderCoreH264] Error: ../../../../../runtime/src/components/EncoderCore/EncoderCoreH264Impl.cpp(345):AMF_ERROR 1 : AMF_FAIL: Failed to create encode service! 0123-03-24 13:38:47 546F740 [AMFEncoderCoreH264] Warning: CreateServices failed. 0123-03-24 13:38:47 546F740 [AMFVideoCore] Warning: AMFVideoCore::Init() Versions Differ, hostVersion=20003 videoCoreVersion=20002 0123-03-24 13:38:47 546F740 [EncodeCore] Error: ./sources/drivers/enc_core/cmn/vcn4commandpacker.cpp(90):system VCN FW Encode interface version=1.9, expected version=1.8 0123-03-24 13:38:47 546F740 [EncodeCore] Error: ./sources/drivers/enc_core/cmn/hevcconfig.cpp(387):HevcConfig::CheckFirmwareVersion(): FirmwareVersion mismatch! 0123-03-24 13:38:47 546F740 [AMFEncoderCoreHevc] Error: ../../../../../runtime/src/components/EncoderCore/EncoderCoreHevcImpl.cpp(167):Assertion failed:Failed to create service! 0123-03-24 13:38:47 546F740 [AMFEncoderCoreHevc] Error: ../../../../../runtime/src/components/EncoderCore/EncoderCoreHevcImpl.cpp(337):AMF_ERROR 1 : AMF_FAIL: Failed to create encode service! 0123-03-24 13:38:47 546F740 [AMFEncoderCoreHevc] Warning: CreateServices failed. 0123-03-24 13:38:47 546F740 [AMFVideoCore] Warning: AMFVideoCore::Init() Versions Differ, hostVersion=20003 videoCoreVersion=20002 0123-03-24 13:38:47 546F740 [EncodeCore] Error: ./sources/drivers/enc_core/cmn/vcn4commandpacker.cpp(90):system VCN FW Encode interface version=1.9, expected version=1.8 0123-03-24 13:38:47 546F740 [EncodeCore] Error: ./sources/drivers/enc_core/cmn/av1config.cpp(239):Av1Config::CheckFirmwareVersion(): FirmwareVersion mismatch! 0123-03-24 13:38:47 546F740 [AMFEncoderCoreAv1] Warning: AMFEncoderCoreAv1Impl::CreateEncodeService() not supported VCN instance 0! 0123-03-24 13:38:47 546F740 [AMFEncoderCoreAv1] Error: ../../../../../runtime/src/components/EncoderCore/EncoderCoreAv1Impl.cpp(315):AMF_ERROR 1 : AMF_FAIL: Failed to create encode service! 0123-03-24 13:38:47 546F740 [AMFEncoderCoreAv1] Warning: CreateServices failed. 0123-03-24 13:38:47 546F740 [AMFEncoderCoreAv1] Warning: *****Failed to create AV1 encoder component. [0] is_amd=true supports_avc=false supports_hevc=false supports_av1=false ```
vk_pro ffmpeg -v verbose -i SampleVideo_1280x720_20mb.mp4 -c:v av1_amf output.mp4 ``` ffmpeg version n6.0 Copyright (c) 2000-2023 the FFmpeg developers built with gcc 12.2.1 (GCC) 20230201 configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-version3 --enable-vulkan libavutil 58. 2.100 / 58. 2.100 libavcodec 60. 3.100 / 60. 3.100 libavformat 60. 3.100 / 60. 3.100 libavdevice 60. 1.100 / 60. 1.100 libavfilter 9. 3.100 / 9. 3.100 libswscale 7. 1.100 / 7. 1.100 libswresample 4. 10.100 / 4. 10.100 libpostproc 57. 1.100 / 57. 1.100 [h264 @ 0x557f812ea4c0] Reinit context to 1280x720, pix_fmt: yuv420p Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'SampleVideo_1280x720_20mb.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 creation_time : 1970-01-01T00:00:00.000000Z encoder : Lavf53.24.2 Duration: 00:01:57.31, start: 0.000000, bitrate: 1436 kb/s Stream #0:0[0x1](und): Video: h264 (Main), 1 reference frame (avc1 / 0x31637661), yuv420p(progressive, left), 1280x720 [SAR 1:1 DAR 16:9], 1048 kb/s, 25 fps, 25 tbr, 12800 tbn (default) Metadata: creation_time : 1970-01-01T00:00:00.000000Z handler_name : VideoHandler vendor_id : [0][0][0][0] Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default) Metadata: creation_time : 1970-01-01T00:00:00.000000Z handler_name : SoundHandler vendor_id : [0][0][0][0] File 'output.mp4' already exists. Overwrite? [y/N] y Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> av1 (av1_amf)) Stream #0:1 -> #0:1 (aac (native) -> aac (native)) Press [q] to stop, [?] for help [graph_1_in_0_1 @ 0x557f8244d700] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:5.1 [h264 @ 0x557f812fe400] Reinit context to 1280x720, pix_fmt: yuv420p [graph 0 input from stream 0:0 @ 0x557f829fc480] w:1280 h:720 pixfmt:yuv420p tb:1/12800 fr:25/1 sar:1/1 [av1_amf @ 0x557f81353040] AMF initialisation succeeded via Vulkan. [av1_amf @ 0x557f813137c0] CreateComponent(AMFVideoEncoderHW_AV1) failed with error 1 [vost#0:0/av1_amf @ 0x557f81312400] Error initializing output stream: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height [aac @ 0x557f813089c0] Qavg: 4485.697 [aac @ 0x557f813089c0] 2 frames left in the queue on closing [AVIOContext @ 0x557f81353d80] Statistics: 0 bytes written, 0 seeks, 0 writeouts Terminating demuxer thread 0 [AVIOContext @ 0x557f812f19c0] Statistics: 304586 bytes read, 2 seeks Conversion failed! ```

The same thing happens with hevc_amf and h264_amf. The same output when using VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/amd_pro_icd64.json ffmpeg and also the same when not specifying amdgpu-pro at all.

I'm installing older versions of linux-firmware now to see if that resolves the issue.

With 20221214.f3c283e1-1 and a mkinitcpio rebuild and restart:

vk_pro obs-amf-test ``` 0123-03-24 14:31:50 8F444740 [AMFVideoCore] Warning: AMFVideoCore::Init() Versions Differ, hostVersion=20003 videoCoreVersion=20002 0123-03-24 14:31:50 8F444740 [AMFEncoderCoreH264] Warning: Failed to create video core service! 0123-03-24 14:31:50 8F444740 [AMFEncoderCoreBaseImpl] Warning: Failed to QueryThroughput()! 0123-03-24 14:31:50 8F444740 [AMFVideoCore] Warning: AMFVideoCore::Init() Versions Differ, hostVersion=20003 videoCoreVersion=20002 0123-03-24 14:31:50 8F444740 [AMFEncoderCoreHevc] Warning: Failed to create video core service! 0123-03-24 14:31:50 8F444740 [AMFEncoderCoreBaseImpl] Warning: Failed to QueryThroughput()! 0123-03-24 14:31:50 8F444740 [AMFVideoCore] Warning: AMFVideoCore::Init() Versions Differ, hostVersion=20003 videoCoreVersion=20002 0123-03-24 14:31:50 8F444740 [AMFEncoderCoreAv1] Warning: Failed to create video core service! 0123-03-24 14:31:50 8F444740 [AMFEncoderCoreAv1] Warning: Codec disabled 0123-03-24 14:31:50 8F444740 [AMFEncoderCoreAv1] Warning: CreateServices failed. 0123-03-24 14:31:50 8F444740 [AMFEncoderCoreAv1] Warning: *****Failed to create AV1 encoder component. [0] is_amd=true supports_avc=true supports_hevc=true supports_av1=false ```

Which I can confirm, hevc_amf and h264_amf are working with ffmpeg, and av1 is not.

RiantAnda commented 1 year ago

@mesmerx I had to downgrade linux-firmware to linux-firmware-20221214.f3c283e-1 to get amf working. I'm also using a RX7900 XTX card. The ffmpeg command I'm running is: VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/amd_pro_icd64.json ffmpeg -hwaccel auto -vaapi_device /dev/dri/renderD128 -i input.mp4 -c:v hevc_amf -rc 1 -b:v 8M output_hevc.mp4

mesmerx commented 1 year ago

the av1 is a problem right now, even in github for amd itself https://github.com/GPUOpen-LibrariesAndSDKs/AMF/issues/369 really thx for the debug this, i`ll add this in the wiki (or anyone can do that too) from while to while amd break things with firmware in last year for 6000 series to work the same need to be done

mesmerx commented 1 year ago

@RiantAnda @ShadwDrgn a new version is updated can you test with that?

meutraa commented 1 year ago

@mesmerx I just tested with it, not working. Same errors as the previous latest firmware.

ShadwDrgn commented 1 year ago

After a reboot (in case it needs to load this at boot as a driver:

[av1_amf @ 0x559d30fb2900] AMF initialisation succeeded via Vulkan.
[av1_amf @ 0x559d30fb2900] AMFVideoCore: 0123-03-27 16:35:20 F5052080 [AMFVideoCore] Warning: AMFVideoCore::Init() Versions Differ, hostVersion=20003 videoCoreVersion=20002
[av1_amf @ 0x559d30fb2900] EncodeCore: 0123-03-27 16:35:20 F5052080 [EncodeCore]   Error: ./sources/drivers/enc_core/cmn/vcn4commandpacker.cpp(90):system VCN FW Encode interface version=1.9, expected version=1.8
[av1_amf @ 0x559d30fb2900] EncodeCore: 0123-03-27 16:35:20 F5052080 [EncodeCore]   Error: ./sources/drivers/enc_core/cmn/av1config.cpp(239):Av1Config::CheckFirmwareVersion(): FirmwareVersion mismatch!
[av1_amf @ 0x559d30fb2900] AMFEncoderCoreAv1: 0123-03-27 16:35:20 F5052080 [AMFEncoderCoreAv1] Warning:  AMFEncoderCoreAv1Impl::CreateEncodeService() not supported VCN instance 0! 
[av1_amf @ 0x559d30fb2900] EncodeCore: 0123-03-27 16:35:20 F5052080 [EncodeCore]   Error: ./sources/drivers/enc_core/cmn/vcn4commandpacker.cpp(90):system VCN FW Encode interface version=1.9, expected version=1.8
[av1_amf @ 0x559d30fb2900] EncodeCore: 0123-03-27 16:35:20 F5052080 [EncodeCore]   Error: ./sources/drivers/enc_core/cmn/av1config.cpp(239):Av1Config::CheckFirmwareVersion(): FirmwareVersion mismatch!
[av1_amf @ 0x559d30fb2900] AMFEncoderCoreAv1: 0123-03-27 16:35:20 F5052080 [AMFEncoderCoreAv1] Warning:  AMFEncoderCoreAv1Impl::CreateEncodeService() not supported VCN instance 0! 
[av1_amf @ 0x559d30fb2900] AMFEncoderCoreAv1: 0123-03-27 16:35:20 F5052080 [AMFEncoderCoreAv1]   Error: ../../../../../runtime/src/components/EncoderCore/EncoderCoreAv1Impl.cpp(315):AMF_ERROR 1 : AMF_FAIL: Failed to create encode service!
[av1_amf @ 0x559d30fb2900] AMFEncoderCoreAv1: 0123-03-27 16:35:20 F5052080 [AMFEncoderCoreAv1] Warning: CreateServices failed.
[av1_amf @ 0x559d30fb2900] AMFEncoderCoreAv1: 0123-03-27 16:35:20 F5052080 [AMFEncoderCoreAv1] Warning: *****Failed to create AV1 encoder component.
[av1_amf @ 0x559d30fb2900] AMFEncoderCoreAv1: 0123-03-27 16:35:20 F5052080 [AMFEncoderCoreAv1]   Debug: AMFEncoderCoreAv1Impl::Terminate()
user@archlinux  ~  sudo pacman -Qm | grep amd
amdgpu-pro-oglp 22.40_1577631-1
amf-amdgpu-pro 22.40_1577631-1
lib32-amdgpu-pro-oglp 22.40_1577631-1
lib32-vulkan-amdgpu-pro 22.40_1577631-1
vulkan-amdgpu-pro 22.40_1577631-1
ShadwDrgn commented 1 year ago

Is there a way to downgrade ONLY the amd gpu firmware without downgrading all other linux firmware? Ideally if i can find the specific files for my GPU to replace it'd be great because then i'd be less concerned about any security issues with other hardware.

mesmerx commented 1 year ago

ofc, the easier method is to get another version from here or the aur with git commit and $makepkg -if $pacman -U *.pkg.tar.zst https://github.com/Ashark/archlinux-amdgpu-pro/releases for releases from here

mesmerx commented 1 year ago

this should not need you to reboot tho

mesmerx commented 1 year ago

Very strange, someone in aur commented that worked for their 7900, av1 too

rLy07 commented 1 year ago

I have a 7900xtx and had this issue. Just updated linux-firmware to 20230404.2e92a49f-1 and it's working now. Also have the latest amdgpu-pro:

amdgpu-pro-oglp 22.40_1577631-1 (Radeon_Software_for_Linux)
amf-amdgpu-pro 22.40_1577631-1 (Radeon_Software_for_Linux)
lib32-amdgpu-pro-oglp 22.40_1577631-1 (Radeon_Software_for_Linux)
lib32-vulkan-amdgpu-pro 22.40_1577631-1 (Radeon_Software_for_Linux)
vulkan-amdgpu-pro 22.40_1577631-1 (Radeon_Software_for_Linux)

AV1 also working

vk_pro obs-amf-test
0123-03-28 07:19:51 6B2CF740 [AMFVideoCore] Warning: AMFVideoCore::Init() Versions Differ, hostVersion=20003 videoCoreVersion=20002
0123-03-28 07:19:51 6B2CF740 [AMFEncoderCoreH264] Warning: Failed to create video core service!
0123-03-28 07:19:51 6B2CF740 [AMFEncoderCoreBaseImpl] Warning: Failed to QueryThroughput()!
0123-03-28 07:19:51 6B2CF740 [AMFVideoCore] Warning: AMFVideoCore::Init() Versions Differ, hostVersion=20003 videoCoreVersion=20002
0123-03-28 07:19:51 6B2CF740 [AMFEncoderCoreHevc] Warning: Failed to create video core service!
0123-03-28 07:19:51 6B2CF740 [AMFEncoderCoreBaseImpl] Warning: Failed to QueryThroughput()!
0123-03-28 07:19:51 6B2CF740 [AMFVideoCore] Warning: AMFVideoCore::Init() Versions Differ, hostVersion=20003 videoCoreVersion=20002
0123-03-28 07:19:51 6B2CF740 [AMFEncoderCoreAv1] Warning: Failed to create video core service!
0123-03-28 07:19:51 6B2CF740 [AMFEncoderCoreBaseImpl] Warning: Failed to QueryThroughput()!
[0]
is_amd=true
supports_avc=true
supports_hevc=true
supports_av1=true

vk_pro ffmpeg -i 2023-04-08\ 13-18-56.mkv -vaapi_device /dev/dri/renderD128 -b:v 15000K -c:v av1_amf -c:a copy /home/rly/Videos/amf_render_test.mkv 
...
frame= 1059 fps=194 q=-0.0 Lsize=   32355kB time=00:00:17.87 bitrate=14826.6kbits/s speed=3.28x    
video:31644kB audio:699kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.038374%

UPDATE: It still doesn't work. After I updated the firmware I didn't do anything else and got the above. It was the morning I think mesmerx's comment to not need a restart confused me.. Anyway after some time I did run mkinitcpio and did a restart and well.. still doesn't work. The new amdgpu-pro did however make av1 working. Also tried to use the same ffmpeg command as the aur commenter used because noticed the higher fps and that for some reason completely kills my system. But the one from above do work for me(on the old firmware)

mesmerx commented 1 year ago

I mean that the AMD GPU pro driver update don't need to restart, but the firmware need, sorry to confuse you

mesmerx commented 1 year ago

So what I get sometimes firmware works or not... Strange... Av1 works anyway, that's right?

rLy07 commented 1 year ago

So what I get sometimes firmware works or not... Strange... Av1 works anyway, that's right?

Wasn't the only working report is from the AUR commenter? They could've made the same mistake as me by not running mkinitcpio? AV1 does seem to work for me but does have an issue. If I run the following:

vk_pro ffmpeg -hwaccel vaapi -i 2023-04-08\ 13-18-56.mkv -b:v 15M -c:v av1_amf -c:a copy /home/rly/Videos/amf_render_test.mkv

The driver/gpu hung completely and the only option is to reset (or sysrq). Not specifying the hwaccel does work and looks like it still utilizes the GPU. Doing the same with hevc_amf is working fine in both cases. Or am I missing something with this? Because there is a noticeable difference in speed.

PlaidCat commented 1 year ago

False Positive AUR commenter here.

Yes In my fight with OBS and AMF I forgot to mkinitcpio -P after doing both the AMD pro update AND the linux-firmware update. The Kernel update that came in through today broke it again, due to regenerating the init.

So I'll just be down grading and waiting again.

$ sudo pacman -U file:///var/cache/pacman/pkg/linux-firmware-20221214.f3c283e-1-any.pkg.tar.zst file:///var/cache/pacman/pkg/linux-firmware-whence-20221214.f3c283e-1-any.pkg.tar.zst

$ sudo mkinit -P

$ systemctrl reboot

$ ffmpeg -i Horizon_test.mov -c:v av1_amf -c:a copy Horizon_amf_av1_test.mkv
Stream mapping:
  Stream #0:0 -> #0:0 (prores (native) -> av1 (av1_amf))
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
Output #0, matroska, to 'Horizon_amf_av1_test.mkv':
  Metadata:
    major_brand     : qt  
    minor_version   : 512
    compatible_brands: qt  
    date            : 2021
    encoder         : Lavf60.3.100
  Stream #0:0: Video: av1 (AV01 / 0x31305641), yuv420p(tv, smpte170m, progressive), 2560x1440 [SAR 1:1 DAR 16:9], q=2-31, 2000 kb/s, 60 fps, 1k tbn (default)
    Metadata:
      handler_name    : VideoHandle
      vendor_id       : FFMP
      encoder         : Lavc60.3.100 av1_amf
  Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s (default)
    Metadata:
      handler_name    : SoundHandle
      vendor_id       : [0][0][0][0]
frame= 3230 fps=378 q=-0.0 Lsize=   23335kB time=00:00:53.81 bitrate=3552.1kbits/s speed= 6.3x    
video:13238kB audio:10064kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.145305%

FYI I'm using this build on my host currently: https://aur.archlinux.org/packages/ffmpeg-obs

mesmerx commented 1 year ago

so to summarize it seems that to work correctly it need 20221214.f3c283e1-1

mesmerx commented 1 year ago

a new version is live, but need the linux-firmware-git to work correct i think, at least for 6000 series

rLy07 commented 1 year ago

Tried to test it but I'm getting cpu softlocked with linux-firmware-git.

RiantAnda commented 1 year ago

Can confirm that linux-firmware-git is currently needed for 7900 series and amdgpu-pro-23.10. If I remember correctly, VCN FW Encode interface version=1.11 is needed by driver, but linux-firmware 20230515 only provides VCN FW Encode interface version=1.09.

ShadwDrgn commented 1 year ago

Is there some way to simply make the specific firmware files required by the driver to be part of this package without breaking existing arch packaging? it would be nice to not have to mess around with system packages and just have a plug and play experience with just one AUR package installed getting everything going? I suspect not, but thought i'd ask.

Thx in advance.

mesmerx commented 1 year ago

its very hard @ShadwDrgn adding firmware files in the package breaks the KISS by a lot, and neither me or shark have the knowledge to debug and makes sure everything works or bugs happens because of it, the correct way is to put the firmware as a dependency, but as @rLy07 showed this even generate problems like cpu lock

mesmerx commented 1 year ago

@rLy07 the cpu is a firmware-git problem, can you issue that there? i`ll try to think a workaround for that at least use a older version with older firmware should still work https://wiki.archlinux.org/title/AMDGPU_PRO#Firmware_and_AMD_drivers

rLy07 commented 1 year ago

@mesmerx I might try to open an issue there but not entirely sure if it's actually the cpu or mesa/amdgpu. Because while I saw the following during boot(the first line shows up during boot):

máj 29 23:33:14 valhalla kernel: watchdog: BUG: soft lockup - CPU#5 stuck for 26s! [NetworkManager:1219]
máj 29 23:33:14 valhalla kernel: Modules linked in: cmac algif_hash algif_skcipher af_alg bnep zram zsmalloc nct6775 nct6775_core hwmon_vid binfmt_misc nls_iso8859_1 raid0 dm_raid raid456 async_raid6_recov async_memcpy async_pq async_x>
máj 29 23:33:14 valhalla kernel:  vboxnetadp(OE) vboxdrv(OE) dm_multipath crypto_user dmi_sysfs ip_tables x_tables autofs4 amdgpu hid_generic drm_ttm_helper ttm iommu_v2 video gpu_sched i2c_algo_bit drm_buddy drm_display_helper drm_kms>
máj 29 23:33:14 valhalla kernel: CPU: 5 PID: 1219 Comm: NetworkManager Tainted: G        W  OE      6.3.4-zen2-xanmod1-1 #1
máj 29 23:33:14 valhalla kernel: Hardware name: System manufacturer System Product Name/TUF GAMING X570-PLUS (WI-FI), BIOS 4403 04/27/2022
máj 29 23:33:14 valhalla kernel: RIP: 0010:__do_softirq+0x69/0x1f8
máj 29 23:33:14 valhalla kernel: Code: 8b 70 2c 48 89 04 24 81 60 2c ff f7 ff ff 89 74 24 14 c7 44 24 10 0a 00 00 00 65 66 c7 05 fd 9f e3 72 00 00 fb 0f 1f 44 00 00 <bb> ff ff ff ff 41 0f bc df ff c3 74 75 49 c7 c2 c0 60 a0 8d 8d 43
máj 29 23:33:14 valhalla kernel: RSP: 0018:ffffb48080378fa0 EFLAGS: 00000206
máj 29 23:33:14 valhalla kernel: RAX: ffff8c33c77f1940 RBX: ffffb480840a7958 RCX: 000000000076f92e
máj 29 23:33:14 valhalla kernel: RDX: 000000000021af29 RSI: 0000000000440100 RDI: ffff8c33c09d6500
máj 29 23:33:14 valhalla kernel: RBP: 0000000000000000 R08: 000000019f71c280 R09: 7fffffffffffffff
máj 29 23:33:14 valhalla kernel: R10: 000000019f533e00 R11: 0000000003090282 R12: 0000000000000000
máj 29 23:33:14 valhalla kernel: R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000282
máj 29 23:33:14 valhalla kernel: FS:  00007fc1d9489200(0000) GS:ffff8c3ace940000(0000) knlGS:0000000000000000
máj 29 23:33:14 valhalla kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
máj 29 23:33:14 valhalla kernel: CR2: 0000563172eec008 CR3: 000000016173e000 CR4: 0000000000350ee0
máj 29 23:33:14 valhalla kernel: Call Trace:
máj 29 23:33:14 valhalla kernel:  <IRQ>
máj 29 23:33:14 valhalla kernel:  __irq_exit_rcu+0x7e/0xb0
máj 29 23:33:14 valhalla kernel:  sysvec_apic_timer_interrupt+0x6e/0x90
máj 29 23:33:14 valhalla kernel:  </IRQ>
máj 29 23:33:14 valhalla kernel:  <TASK>
máj 29 23:33:14 valhalla kernel:  asm_sysvec_apic_timer_interrupt+0x16/0x20
máj 29 23:33:14 valhalla kernel: RIP: 0010:ext4_es_insert_extent+0x2/0x380
máj 29 23:33:14 valhalla kernel: Code: 3c 85 00 e9 63 ff ff ff 41 39 d7 4c 89 f7 41 0f 93 c4 e8 01 3c 85 00 e9 4f ff ff ff e8 a7 0b 84 00 0f 1f 80 00 00 00 00 41 57 <41> 56 41 55 41 89 d5 41 54 55 53 48 89 fb 48 83 ec 70 48 8b 7f 28
máj 29 23:33:14 valhalla kernel: RSP: 0018:ffffb480840a7a00 EFLAGS: 00000246
máj 29 23:33:14 valhalla kernel: RAX: 0000000000000001 RBX: ffffb480840a7ad8 RCX: 0000000000340001
máj 29 23:33:14 valhalla kernel: RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff8c341efcab10
máj 29 23:33:14 valhalla kernel: RBP: ffff8c341efcab10 R08: 0000000000000001 R09: ffff8c341efca9f4
máj 29 23:33:14 valhalla kernel: R10: 0000000000000000 R11: ffff8c33ec4db4e0 R12: 0000000000000000
máj 29 23:33:14 valhalla kernel: R13: 0000000000000000 R14: ffff8c341efcaae8 R15: 0000000000000001
máj 29 23:33:14 valhalla kernel:  ext4_map_blocks+0x130/0x5f0
máj 29 23:33:14 valhalla kernel:  ? xa_load+0x86/0xe0
máj 29 23:33:14 valhalla kernel:  ext4_mpage_readpages+0x527/0x920
máj 29 23:33:14 valhalla kernel:  ? __filemap_add_folio+0x1bf/0x3d0
máj 29 23:33:14 valhalla kernel:  read_pages+0x56/0x230
máj 29 23:33:14 valhalla kernel:  page_cache_ra_unbounded+0x122/0x170
máj 29 23:33:14 valhalla kernel:  filemap_get_pages+0x10c/0x570
máj 29 23:33:14 valhalla kernel:  filemap_read+0xca/0x320
máj 29 23:33:14 valhalla kernel:  ? apparmor_file_permission+0x67/0x170
máj 29 23:33:14 valhalla kernel:  vfs_read+0x1ee/0x2c0
máj 29 23:33:14 valhalla kernel:  ksys_read+0x5e/0xe0
máj 29 23:33:14 valhalla kernel:  do_syscall_64+0x5c/0x90
máj 29 23:33:14 valhalla kernel:  ? exit_to_user_mode_prepare+0x2b/0x130
máj 29 23:33:14 valhalla kernel:  ? syscall_exit_to_user_mode+0x22/0x50
máj 29 23:33:14 valhalla kernel:  ? do_syscall_64+0x68/0x90
máj 29 23:33:14 valhalla kernel:  ? exit_to_user_mode_prepare+0x2b/0x130
máj 29 23:33:14 valhalla kernel:  entry_SYSCALL_64_after_hwframe+0x63/0xcd
máj 29 23:33:14 valhalla kernel: RIP: 0033:0x7fc1d9bd5b5c
máj 29 23:33:14 valhalla kernel: Code: ec 28 48 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 89 9c f8 ff 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 34 44 89 c7 48 89 44 24 08 e8 df 9c f8 ff 48
máj 29 23:33:14 valhalla kernel: RSP: 002b:00007ffe555f6830 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
máj 29 23:33:14 valhalla kernel: RAX: ffffffffffffffda RBX: 0000563172ed2090 RCX: 00007fc1d9bd5b5c
máj 29 23:33:14 valhalla kernel: RDX: 0000000000001000 RSI: 00007ffe555f6910 RDI: 0000000000000013
máj 29 23:33:14 valhalla kernel: RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
máj 29 23:33:14 valhalla kernel: R10: 0000000000001000 R11: 0000000000000246 R12: 0000000000000013
máj 29 23:33:14 valhalla kernel: R13: 00007ffe555f7960 R14: 00007ffe555f6910 R15: 00007ffe555f6878
máj 29 23:33:14 valhalla kernel:  </TASK>

I also see tons of amdgpu errors in the journal:

máj 29 23:33:19 valhalla kernel: amdgpu 0000:0c:00.0: amdgpu: [gfxhub] page fault (src_id:0 ring:24 vmid:9 pasid:32768, for process  pid 0 thread  pid 0)
máj 29 23:33:19 valhalla kernel: amdgpu 0000:0c:00.0: amdgpu:   in page starting at address 0x0000ffff00224000 from client 10
máj 29 23:33:19 valhalla kernel: amdgpu 0000:0c:00.0: amdgpu: GCVM_L2_PROTECTION_FAULT_STATUS:0x00900831
máj 29 23:33:19 valhalla kernel: amdgpu 0000:0c:00.0: amdgpu:          Faulty UTCL2 client ID: CPF (0x4)
máj 29 23:33:19 valhalla kernel: amdgpu 0000:0c:00.0: amdgpu:          MORE_FAULTS: 0x1
máj 29 23:33:19 valhalla kernel: amdgpu 0000:0c:00.0: amdgpu:          WALKER_ERROR: 0x0
máj 29 23:33:19 valhalla kernel: amdgpu 0000:0c:00.0: amdgpu:          PERMISSION_FAULTS: 0x3
máj 29 23:33:19 valhalla kernel: amdgpu 0000:0c:00.0: amdgpu:          MAPPING_ERROR: 0x0
máj 29 23:33:19 valhalla kernel: amdgpu 0000:0c:00.0: amdgpu:          RW: 0x0

and:

máj 29 23:34:11 valhalla kernel: amdgpu 0000:0c:00.0: [drm] *ERROR* flip_done timed out
máj 29 23:34:11 valhalla kernel: amdgpu 0000:0c:00.0: [drm] *ERROR* [PLANE:55:plane-3] commit wait timed out
máj 29 23:34:11 valhalla kernel: ------------[ cut here ]------------
máj 29 23:34:11 valhalla kernel: WARNING: CPU: 18 PID: 1252 at amdgpu_dm_atomic_commit_tail+0x2e2e/0x3050 [amdgpu]
máj 29 23:34:11 valhalla kernel: Modules linked in: cmac algif_hash algif_skcipher af_alg bnep zram zsmalloc nct6775 nct6775_core hwmon_vid binfmt_misc nls_iso8859_1 raid0 dm_raid raid456 async_raid6_recov async_memcpy async_pq async_x>
máj 29 23:34:11 valhalla kernel:  vboxnetadp(OE) vboxdrv(OE) dm_multipath crypto_user dmi_sysfs ip_tables x_tables autofs4 amdgpu hid_generic drm_ttm_helper ttm iommu_v2 video gpu_sched i2c_algo_bit drm_buddy drm_display_helper drm_kms>
máj 29 23:34:11 valhalla kernel: CPU: 18 PID: 1252 Comm: Xorg.wrap Tainted: G        W  OEL     6.3.4-zen2-xanmod1-1 #1
máj 29 23:34:11 valhalla kernel: Hardware name: System manufacturer System Product Name/TUF GAMING X570-PLUS (WI-FI), BIOS 4403 04/27/2022
máj 29 23:34:11 valhalla kernel: RIP: 0010:amdgpu_dm_atomic_commit_tail+0x2e2e/0x3050 [amdgpu]
máj 29 23:34:11 valhalla kernel: Code: e9 10 fb ff ff 49 8b 4d 28 49 39 4b 28 41 0f 95 c1 0f 95 85 c8 fc ff ff 45 0f b6 c9 48 85 f6 0f 85 5d f8 ff ff e9 5c f8 ff ff <0f> 0b e9 e6 f3 ff ff 0f 0b 0f 0b e9 87 f3 ff ff 48 89 85 90 fc ff
máj 29 23:34:11 valhalla kernel: RSP: 0018:ffffb48084d3f898 EFLAGS: 00010002
máj 29 23:34:11 valhalla kernel: RAX: 0000000000000002 RBX: 0000000000000286 RCX: ffff8c33d2f62118
máj 29 23:34:11 valhalla kernel: RDX: 0000000000000001 RSI: 0000000000000297 RDI: ffff8c33d1800178
máj 29 23:34:11 valhalla kernel: RBP: ffffb48084d3fc18 R08: ffffb48084d3f7c4 R09: 0000000000000000
máj 29 23:34:11 valhalla kernel: R10: ffffb48084d3f7f8 R11: ffffb48084d3f7fc R12: ffff8c33d2f62118
máj 29 23:34:11 valhalla kernel: R13: 0000000000000000 R14: ffff8c33d2f62000 R15: ffff8c34215a5e00
máj 29 23:34:11 valhalla kernel: FS:  00007fd681649680(0000) GS:ffff8c3acec80000(0000) knlGS:0000000000000000
máj 29 23:34:11 valhalla kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
máj 29 23:34:11 valhalla kernel: CR2: 0000557aec535350 CR3: 0000000106f6e000 CR4: 0000000000350ee0
máj 29 23:34:11 valhalla kernel: Call Trace:
máj 29 23:34:11 valhalla kernel:  <TASK>
máj 29 23:34:11 valhalla kernel:  commit_tail+0x8d/0x120 [drm_kms_helper]
máj 29 23:34:11 valhalla kernel:  drm_atomic_helper_commit+0x111/0x140 [drm_kms_helper]
máj 29 23:34:11 valhalla kernel:  drm_atomic_commit+0x91/0xc0 [drm]
máj 29 23:34:11 valhalla kernel:  ? __drm_printfn_seq_file+0x20/0x20 [drm]
máj 29 23:34:11 valhalla kernel:  drm_client_modeset_commit_atomic+0x1ce/0x210 [drm]
máj 29 23:34:11 valhalla kernel:  drm_client_modeset_commit_locked+0x51/0x150 [drm]
máj 29 23:34:11 valhalla kernel:  drm_client_modeset_commit+0x1c/0x40 [drm]
máj 29 23:34:11 valhalla kernel:  drm_fb_helper_lastclose+0x40/0x70 [drm_kms_helper]
máj 29 23:34:11 valhalla kernel:  drm_fbdev_client_restore+0x8/0x10 [drm_kms_helper]
máj 29 23:34:11 valhalla kernel:  drm_client_dev_restore+0x63/0xb0 [drm]
máj 29 23:34:11 valhalla kernel:  drm_release+0x11e/0x130 [drm]
máj 29 23:34:11 valhalla kernel:  __fput+0x8c/0x250
máj 29 23:34:11 valhalla kernel:  task_work_run+0x54/0x80
máj 29 23:34:11 valhalla kernel:  exit_to_user_mode_prepare+0x10e/0x130
máj 29 23:34:11 valhalla kernel:  syscall_exit_to_user_mode+0x22/0x50
máj 29 23:34:11 valhalla kernel:  ? __x64_sys_close+0x8/0x40
máj 29 23:34:11 valhalla kernel:  do_syscall_64+0x68/0x90
máj 29 23:34:11 valhalla kernel:  ? handle_mm_fault+0x111/0x2f0
máj 29 23:34:11 valhalla kernel:  ? do_user_addr_fault+0x1cc/0x690
máj 29 23:34:11 valhalla kernel:  ? exit_to_user_mode_prepare+0x2b/0x130
máj 29 23:34:11 valhalla kernel:  entry_SYSCALL_64_after_hwframe+0x63/0xcd
máj 29 23:34:11 valhalla kernel: RIP: 0033:0x7fd681558274
máj 29 23:34:11 valhalla kernel: Code: 00 eb b1 67 e8 7d 0a 02 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 f3 0f 1e fa 80 3d 8d 92 0e 00 00 74 13 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 44 c3 0f 1f 00 48 83 ec 18 89 7c 24 0c e8 43
máj 29 23:34:11 valhalla kernel: RSP: 002b:00007ffe46a99ca8 EFLAGS: 00000202 ORIG_RAX: 0000000000000003
máj 29 23:34:11 valhalla kernel: RAX: 0000000000000000 RBX: 0000000000000003 RCX: 00007fd681558274
máj 29 23:34:11 valhalla kernel: RDX: 0000000000000000 RSI: 00000000c04064a0 RDI: 0000000000000003
máj 29 23:34:11 valhalla kernel: RBP: 0000000000000001 R08: 0000000000000064 R09: 0000000000000000
máj 29 23:34:11 valhalla kernel: R10: 00007fd6814714d8 R11: 0000000000000202 R12: 00007ffe46a99d10
máj 29 23:34:11 valhalla kernel: R13: 0000000000000001 R14: 00000000c04064a0 R15: 0000000000000000
máj 29 23:34:11 valhalla kernel:  </TASK>
máj 29 23:34:11 valhalla kernel: ---[ end trace 0000000000000000 ]---
máj 29 23:34:11 valhalla kernel: ------------[ cut here ]------------
máj 29 23:34:11 valhalla kernel: WARNING: CPU: 18 PID: 1252 at amdgpu_dm_atomic_commit_tail+0x2fac/0x3050 [amdgpu]
máj 29 23:34:11 valhalla kernel: Modules linked in: cmac algif_hash algif_skcipher af_alg bnep zram zsmalloc nct6775 nct6775_core hwmon_vid binfmt_misc nls_iso8859_1 raid0 dm_raid raid456 async_raid6_recov async_memcpy async_pq async_x>
máj 29 23:34:11 valhalla kernel:  vboxnetadp(OE) vboxdrv(OE) dm_multipath crypto_user dmi_sysfs ip_tables x_tables autofs4 amdgpu hid_generic drm_ttm_helper ttm iommu_v2 video gpu_sched i2c_algo_bit drm_buddy drm_display_helper drm_kms>
máj 29 23:34:11 valhalla kernel: CPU: 18 PID: 1252 Comm: Xorg.wrap Tainted: G        W  OEL     6.3.4-zen2-xanmod1-1 #1
máj 29 23:34:11 valhalla kernel: Hardware name: System manufacturer System Product Name/TUF GAMING X570-PLUS (WI-FI), BIOS 4403 04/27/2022
máj 29 23:34:11 valhalla kernel: RIP: 0010:amdgpu_dm_atomic_commit_tail+0x2fac/0x3050 [amdgpu]
máj 29 23:34:11 valhalla kernel: Code: 48 83 c4 18 83 bd e8 fc ff ff 02 4c 8b 95 98 fc ff ff 48 8b 85 90 fc ff ff 77 27 c7 85 e8 fc ff ff 02 00 00 00 e9 a0 fd ff ff <0f> 0b e9 87 f2 ff ff 8b 85 14 fd ff ff 89 85 50 fd ff ff e9 95 fb
máj 29 23:34:11 valhalla kernel: RSP: 0018:ffffb48084d3f898 EFLAGS: 00010086
máj 29 23:34:11 valhalla kernel: RAX: 0000000000000001 RBX: 0000000000000286 RCX: ffff8c33d2f62118
máj 29 23:34:11 valhalla kernel: RDX: 0000000000000001 RSI: 0000000000000297 RDI: ffff8c33d1800178
máj 29 23:34:11 valhalla kernel: RBP: ffffb48084d3fc18 R08: ffffb48084d3f7c4 R09: 0000000000000000
máj 29 23:34:11 valhalla kernel: R10: ffffb48084d3f7f8 R11: ffffb48084d3f7fc R12: ffff8c33d2f62118
máj 29 23:34:11 valhalla kernel: R13: 0000000000000000 R14: ffff8c33d2f62000 R15: ffff8c34215a5e00
máj 29 23:34:11 valhalla kernel: FS:  00007fd681649680(0000) GS:ffff8c3acec80000(0000) knlGS:0000000000000000
máj 29 23:34:11 valhalla kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
máj 29 23:34:11 valhalla kernel: CR2: 0000557aec535350 CR3: 0000000106f6e000 CR4: 0000000000350ee0
máj 29 23:34:11 valhalla kernel: Call Trace:
máj 29 23:34:11 valhalla kernel:  <TASK>
máj 29 23:34:11 valhalla kernel:  commit_tail+0x8d/0x120 [drm_kms_helper]
máj 29 23:34:11 valhalla kernel:  drm_atomic_helper_commit+0x111/0x140 [drm_kms_helper]
máj 29 23:34:11 valhalla kernel:  drm_atomic_commit+0x91/0xc0 [drm]
máj 29 23:34:11 valhalla kernel:  ? __drm_printfn_seq_file+0x20/0x20 [drm]
máj 29 23:34:11 valhalla kernel:  drm_client_modeset_commit_atomic+0x1ce/0x210 [drm]
máj 29 23:34:11 valhalla kernel:  drm_client_modeset_commit_locked+0x51/0x150 [drm]
máj 29 23:34:11 valhalla kernel:  drm_client_modeset_commit+0x1c/0x40 [drm]
máj 29 23:34:11 valhalla kernel:  drm_fb_helper_lastclose+0x40/0x70 [drm_kms_helper]
máj 29 23:34:11 valhalla kernel:  drm_fbdev_client_restore+0x8/0x10 [drm_kms_helper]
máj 29 23:34:11 valhalla kernel:  drm_client_dev_restore+0x63/0xb0 [drm]
máj 29 23:34:11 valhalla kernel:  drm_release+0x11e/0x130 [drm]
máj 29 23:34:11 valhalla kernel:  __fput+0x8c/0x250
máj 29 23:34:11 valhalla kernel:  task_work_run+0x54/0x80
máj 29 23:34:11 valhalla kernel:  exit_to_user_mode_prepare+0x10e/0x130
máj 29 23:34:11 valhalla kernel:  syscall_exit_to_user_mode+0x22/0x50
máj 29 23:34:11 valhalla kernel:  ? __x64_sys_close+0x8/0x40
máj 29 23:34:11 valhalla kernel:  do_syscall_64+0x68/0x90
máj 29 23:34:11 valhalla kernel:  ? handle_mm_fault+0x111/0x2f0
máj 29 23:34:11 valhalla kernel:  ? do_user_addr_fault+0x1cc/0x690
máj 29 23:34:11 valhalla kernel:  ? exit_to_user_mode_prepare+0x2b/0x130
máj 29 23:34:11 valhalla kernel:  entry_SYSCALL_64_after_hwframe+0x63/0xcd
máj 29 23:34:11 valhalla kernel: RIP: 0033:0x7fd681558274
máj 29 23:34:11 valhalla kernel: Code: 00 eb b1 67 e8 7d 0a 02 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 f3 0f 1e fa 80 3d 8d 92 0e 00 00 74 13 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 44 c3 0f 1f 00 48 83 ec 18 89 7c 24 0c e8 43
máj 29 23:34:11 valhalla kernel: RSP: 002b:00007ffe46a99ca8 EFLAGS: 00000202 ORIG_RAX: 0000000000000003
máj 29 23:34:11 valhalla kernel: RAX: 0000000000000000 RBX: 0000000000000003 RCX: 00007fd681558274
máj 29 23:34:11 valhalla kernel: RDX: 0000000000000000 RSI: 00000000c04064a0 RDI: 0000000000000003
máj 29 23:34:11 valhalla kernel: RBP: 0000000000000001 R08: 0000000000000064 R09: 0000000000000000
máj 29 23:34:11 valhalla kernel: R10: 00007fd6814714d8 R11: 0000000000000202 R12: 00007ffe46a99d10
máj 29 23:34:11 valhalla kernel: R13: 0000000000000001 R14: 00000000c04064a0 R15: 0000000000000000
máj 29 23:34:11 valhalla kernel:  </TASK>
máj 29 23:34:11 valhalla kernel: ---[ end trace 0000000000000000 ]---
máj 29 23:34:11 valhalla kernel: ------------[ cut here ]------------
máj 29 23:34:11 valhalla kernel: WARNING: CPU: 18 PID: 1252 at amdgpu_dm_atomic_commit_tail+0x2e2e/0x3050 [amdgpu]
máj 29 23:34:11 valhalla kernel: Modules linked in: cmac algif_hash algif_skcipher af_alg bnep zram zsmalloc nct6775 nct6775_core hwmon_vid binfmt_misc nls_iso8859_1 raid0 dm_raid raid456 async_raid6_recov async_memcpy async_pq async_x>
máj 29 23:34:11 valhalla kernel:  vboxnetadp(OE) vboxdrv(OE) dm_multipath crypto_user dmi_sysfs ip_tables x_tables autofs4 amdgpu hid_generic drm_ttm_helper ttm iommu_v2 video gpu_sched i2c_algo_bit drm_buddy drm_display_helper drm_kms>
máj 29 23:34:11 valhalla kernel: CPU: 18 PID: 1252 Comm: Xorg.wrap Tainted: G        W  OEL     6.3.4-zen2-xanmod1-1 #1
máj 29 23:34:11 valhalla kernel: Hardware name: System manufacturer System Product Name/TUF GAMING X570-PLUS (WI-FI), BIOS 4403 04/27/2022
máj 29 23:34:11 valhalla kernel: RIP: 0010:amdgpu_dm_atomic_commit_tail+0x2e2e/0x3050 [amdgpu]
máj 29 23:34:11 valhalla kernel: Code: e9 10 fb ff ff 49 8b 4d 28 49 39 4b 28 41 0f 95 c1 0f 95 85 c8 fc ff ff 45 0f b6 c9 48 85 f6 0f 85 5d f8 ff ff e9 5c f8 ff ff <0f> 0b e9 e6 f3 ff ff 0f 0b 0f 0b e9 87 f3 ff ff 48 89 85 90 fc ff
máj 29 23:34:11 valhalla kernel: RSP: 0018:ffffb48084d3f898 EFLAGS: 00010002
máj 29 23:34:11 valhalla kernel: RAX: 0000000000000002 RBX: 0000000000000286 RCX: ffff8c33d2f67918
máj 29 23:34:11 valhalla kernel: RDX: 0000000000000001 RSI: 0000000000000293 RDI: ffff8c33d1800178
máj 29 23:34:11 valhalla kernel: RBP: ffffb48084d3fc18 R08: ffffb48084d3f7c4 R09: 0000000000000000
máj 29 23:34:11 valhalla kernel: R10: ffffb48084d3f7f8 R11: ffffb48084d3f7fc R12: ffff8c33d2f67918
máj 29 23:34:11 valhalla kernel: R13: 0000000000000001 R14: ffff8c33d2f67800 R15: ffff8c34215a4e00
máj 29 23:34:11 valhalla kernel: FS:  00007fd681649680(0000) GS:ffff8c3acec80000(0000) knlGS:0000000000000000
máj 29 23:34:11 valhalla kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
máj 29 23:34:11 valhalla kernel: CR2: 0000557aec535350 CR3: 0000000106f6e000 CR4: 0000000000350ee0
máj 29 23:34:11 valhalla kernel: Call Trace:
máj 29 23:34:11 valhalla kernel:  <TASK>
máj 29 23:34:11 valhalla kernel:  commit_tail+0x8d/0x120 [drm_kms_helper]
máj 29 23:34:11 valhalla kernel:  drm_atomic_helper_commit+0x111/0x140 [drm_kms_helper]
máj 29 23:34:11 valhalla kernel:  drm_atomic_commit+0x91/0xc0 [drm]
máj 29 23:34:11 valhalla kernel:  ? __drm_printfn_seq_file+0x20/0x20 [drm]
máj 29 23:34:11 valhalla kernel:  drm_client_modeset_commit_atomic+0x1ce/0x210 [drm]
máj 29 23:34:11 valhalla kernel:  drm_client_modeset_commit_locked+0x51/0x150 [drm]
máj 29 23:34:11 valhalla kernel:  drm_client_modeset_commit+0x1c/0x40 [drm]
máj 29 23:34:11 valhalla kernel:  drm_fb_helper_lastclose+0x40/0x70 [drm_kms_helper]
máj 29 23:34:11 valhalla kernel:  drm_fbdev_client_restore+0x8/0x10 [drm_kms_helper]
máj 29 23:34:11 valhalla kernel:  drm_client_dev_restore+0x63/0xb0 [drm]
máj 29 23:34:11 valhalla kernel:  drm_release+0x11e/0x130 [drm]
máj 29 23:34:11 valhalla kernel:  __fput+0x8c/0x250
máj 29 23:34:11 valhalla kernel:  task_work_run+0x54/0x80
máj 29 23:34:11 valhalla kernel:  exit_to_user_mode_prepare+0x10e/0x130
máj 29 23:34:11 valhalla kernel:  syscall_exit_to_user_mode+0x22/0x50
máj 29 23:34:11 valhalla kernel:  ? __x64_sys_close+0x8/0x40
máj 29 23:34:11 valhalla kernel:  do_syscall_64+0x68/0x90
máj 29 23:34:11 valhalla kernel:  ? handle_mm_fault+0x111/0x2f0
máj 29 23:34:11 valhalla kernel:  ? do_user_addr_fault+0x1cc/0x690
máj 29 23:34:11 valhalla kernel:  ? exit_to_user_mode_prepare+0x2b/0x130
máj 29 23:34:11 valhalla kernel:  entry_SYSCALL_64_after_hwframe+0x63/0xcd
máj 29 23:34:11 valhalla kernel: RIP: 0033:0x7fd681558274
máj 29 23:34:11 valhalla kernel: Code: 00 eb b1 67 e8 7d 0a 02 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 f3 0f 1e fa 80 3d 8d 92 0e 00 00 74 13 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 44 c3 0f 1f 00 48 83 ec 18 89 7c 24 0c e8 43
máj 29 23:34:11 valhalla kernel: RSP: 002b:00007ffe46a99ca8 EFLAGS: 00000202 ORIG_RAX: 0000000000000003
máj 29 23:34:11 valhalla kernel: RAX: 0000000000000000 RBX: 0000000000000003 RCX: 00007fd681558274
máj 29 23:34:11 valhalla kernel: RDX: 0000000000000000 RSI: 00000000c04064a0 RDI: 0000000000000003
máj 29 23:34:11 valhalla kernel: RBP: 0000000000000001 R08: 0000000000000064 R09: 0000000000000000
máj 29 23:34:11 valhalla kernel: R10: 00007fd6814714d8 R11: 0000000000000202 R12: 00007ffe46a99d10
máj 29 23:34:11 valhalla kernel: R13: 0000000000000001 R14: 00000000c04064a0 R15: 0000000000000000
máj 29 23:34:11 valhalla kernel:  </TASK>
máj 29 23:34:11 valhalla kernel: ---[ end trace 0000000000000000 ]---
máj 29 23:34:11 valhalla kernel: ------------[ cut here ]------------
máj 29 23:34:11 valhalla kernel: WARNING: CPU: 18 PID: 1252 at amdgpu_dm_atomic_commit_tail+0x2fac/0x3050 [amdgpu]
máj 29 23:34:11 valhalla kernel: Modules linked in: cmac algif_hash algif_skcipher af_alg bnep zram zsmalloc nct6775 nct6775_core hwmon_vid binfmt_misc nls_iso8859_1 raid0 dm_raid raid456 async_raid6_recov async_memcpy async_pq async_x>
máj 29 23:34:11 valhalla kernel:  vboxnetadp(OE) vboxdrv(OE) dm_multipath crypto_user dmi_sysfs ip_tables x_tables autofs4 amdgpu hid_generic drm_ttm_helper ttm iommu_v2 video gpu_sched i2c_algo_bit drm_buddy drm_display_helper drm_kms>
máj 29 23:34:11 valhalla kernel: CPU: 18 PID: 1252 Comm: Xorg.wrap Tainted: G        W  OEL     6.3.4-zen2-xanmod1-1 #1
máj 29 23:34:11 valhalla kernel: Hardware name: System manufacturer System Product Name/TUF GAMING X570-PLUS (WI-FI), BIOS 4403 04/27/2022
máj 29 23:34:11 valhalla kernel: RIP: 0010:amdgpu_dm_atomic_commit_tail+0x2fac/0x3050 [amdgpu]
máj 29 23:34:11 valhalla kernel: Code: 48 83 c4 18 83 bd e8 fc ff ff 02 4c 8b 95 98 fc ff ff 48 8b 85 90 fc ff ff 77 27 c7 85 e8 fc ff ff 02 00 00 00 e9 a0 fd ff ff <0f> 0b e9 87 f2 ff ff 8b 85 14 fd ff ff 89 85 50 fd ff ff e9 95 fb
máj 29 23:34:11 valhalla kernel: RSP: 0018:ffffb48084d3f898 EFLAGS: 00010082
máj 29 23:34:11 valhalla kernel: RAX: 0000000000000001 RBX: 0000000000000286 RCX: ffff8c33d2f67918
máj 29 23:34:11 valhalla kernel: RDX: 0000000000000001 RSI: 0000000000000293 RDI: ffff8c33d1800178
máj 29 23:34:11 valhalla kernel: RBP: ffffb48084d3fc18 R08: ffffb48084d3f7c4 R09: 0000000000000000
máj 29 23:34:11 valhalla kernel: R10: ffffb48084d3f7f8 R11: ffffb48084d3f7fc R12: ffff8c33d2f67918
máj 29 23:34:11 valhalla kernel: R13: 0000000000000001 R14: ffff8c33d2f67800 R15: ffff8c34215a4e00
máj 29 23:34:11 valhalla kernel: FS:  00007fd681649680(0000) GS:ffff8c3acec80000(0000) knlGS:0000000000000000
máj 29 23:34:11 valhalla kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
máj 29 23:34:11 valhalla kernel: CR2: 0000557aec535350 CR3: 0000000106f6e000 CR4: 0000000000350ee0
máj 29 23:34:11 valhalla kernel: Call Trace:
máj 29 23:34:11 valhalla kernel:  <TASK>
máj 29 23:34:11 valhalla kernel:  commit_tail+0x8d/0x120 [drm_kms_helper]
máj 29 23:34:11 valhalla kernel:  drm_atomic_helper_commit+0x111/0x140 [drm_kms_helper]
máj 29 23:34:11 valhalla kernel:  drm_atomic_commit+0x91/0xc0 [drm]
máj 29 23:34:11 valhalla kernel:  ? __drm_printfn_seq_file+0x20/0x20 [drm]
máj 29 23:34:11 valhalla kernel:  drm_client_modeset_commit_atomic+0x1ce/0x210 [drm]
máj 29 23:34:11 valhalla kernel:  drm_client_modeset_commit_locked+0x51/0x150 [drm]
máj 29 23:34:11 valhalla kernel:  drm_client_modeset_commit+0x1c/0x40 [drm]
máj 29 23:34:11 valhalla kernel:  drm_fb_helper_lastclose+0x40/0x70 [drm_kms_helper]
máj 29 23:34:11 valhalla kernel:  drm_fbdev_client_restore+0x8/0x10 [drm_kms_helper]
máj 29 23:34:11 valhalla kernel:  drm_client_dev_restore+0x63/0xb0 [drm]
máj 29 23:34:11 valhalla kernel:  drm_release+0x11e/0x130 [drm]
máj 29 23:34:11 valhalla kernel:  __fput+0x8c/0x250
máj 29 23:34:11 valhalla kernel:  task_work_run+0x54/0x80
máj 29 23:34:11 valhalla kernel:  exit_to_user_mode_prepare+0x10e/0x130
máj 29 23:34:11 valhalla kernel:  syscall_exit_to_user_mode+0x22/0x50
máj 29 23:34:11 valhalla kernel:  ? __x64_sys_close+0x8/0x40
máj 29 23:34:11 valhalla kernel:  do_syscall_64+0x68/0x90
máj 29 23:34:11 valhalla kernel:  ? handle_mm_fault+0x111/0x2f0
máj 29 23:34:11 valhalla kernel:  ? do_user_addr_fault+0x1cc/0x690
máj 29 23:34:11 valhalla kernel:  ? exit_to_user_mode_prepare+0x2b/0x130
máj 29 23:34:11 valhalla kernel:  entry_SYSCALL_64_after_hwframe+0x63/0xcd
máj 29 23:34:11 valhalla kernel: RIP: 0033:0x7fd681558274
máj 29 23:34:11 valhalla kernel: Code: 00 eb b1 67 e8 7d 0a 02 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 f3 0f 1e fa 80 3d 8d 92 0e 00 00 74 13 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 44 c3 0f 1f 00 48 83 ec 18 89 7c 24 0c e8 43
máj 29 23:34:11 valhalla kernel: RSP: 002b:00007ffe46a99ca8 EFLAGS: 00000202 ORIG_RAX: 0000000000000003
máj 29 23:34:11 valhalla kernel: RAX: 0000000000000000 RBX: 0000000000000003 RCX: 00007fd681558274
máj 29 23:34:11 valhalla kernel: RDX: 0000000000000000 RSI: 00000000c04064a0 RDI: 0000000000000003
máj 29 23:34:11 valhalla kernel: RBP: 0000000000000001 R08: 0000000000000064 R09: 0000000000000000
máj 29 23:34:11 valhalla kernel: R10: 00007fd6814714d8 R11: 0000000000000202 R12: 00007ffe46a99d10
máj 29 23:34:11 valhalla kernel: R13: 0000000000000001 R14: 00000000c04064a0 R15: 0000000000000000
máj 29 23:34:11 valhalla kernel:  </TASK>
máj 29 23:34:11 valhalla kernel: ---[ end trace 0000000000000000 ]---
rLy07 commented 1 year ago

So it turns out it needed 6.3.5 kernel which only appeared in the repo yesterday. Now it's working for me as well with linux-firmware-git.

$ vk_pro obs-amf-test
0123-04-31 22:06:09 730A2740 [AMFEncoderCoreBaseImpl] Warning: Failed to QueryThroughput()!
0123-04-31 22:06:09 730A2740 [AMFEncoderCoreBaseImpl] Warning: Failed to QueryThroughput()!
0123-04-31 22:06:09 730A2740 [AMFEncoderCoreBaseImpl] Warning: Failed to QueryThroughput()!
[0]
is_amd=true
supports_avc=true
supports_hevc=true
supports_av1=true
Taco0220 commented 11 months ago

GPUOpen-LibrariesAndSDKs/AMF#369 can you see if you are in this issue?

no...

mesmerx commented 9 months ago

@Taco0220 can you open other issue for your problem? this issue is for a specific firmware related issue, its been workaround, and its hard to maintain same context as its another patch overall