-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: AMF encoding does not work on Linux past driver version 21.30 #334
Comments
It looks like you have an installation issue, some mismatch between AMF/EncodeCore and VCN FW. What is your driver install command line? |
Output from dmesg:
I used a fresh install when testing on Ubuntu. All I did was download the 22.10.2 deb package from amd.com and run:
|
just dropping a note here to verify the same thing -- tested on both an rx 6600, 6700 XT, and 6900 XT, 21.40.2 with amf version 1.4.23 is the last version that works with these cards. I -did- also test 22.10.2 with an RX 5500 and an RX 580 -- both worked but none of the 6000 series worked. I will test the 22.10.3 and 22.20 drivers on the RX 5500 and RX 580 and report back -- these also did -not- work for the 6000 series. Another note/different bug -- the 6600 came up with an unidentified name in the 22.10.2 vulkan pro drivers. (the 6700 XT and 6900 XT were fine) |
more progress! if i keep the vulkan-pro files from 21.40.2: and use the amf and libamdenc from 22.20: -- encoding works on my 6000 series cards! |
In general, mixing components from different drivers is dangerous. One thing I noticed: the correct AMF install command; would be: |
I believe I've been able to make both h264 & hevc work with latest 22.20.1 ffmpeg -i re3_speedrun_orig.webm -vf format=nv12 -c:v hevc_amf -c:a copy re3_amfhevc.mp4
ffmpeg -i re3_speedrun_orig.webm -c:v h264_amf -c:a copy re3_amf.mp4
Maybe one of you can retry to confirm. I've used glorious's method for installing AMF |
22.20.1 amdgpu-pro-vulkan is still not compatible with 6000 series when installing just the amdgpu-pro and amf packages. Only 21.40.2's amdgpu-pro-vulkan works. I have -not- tried this method yet:
|
i have the same |
Look at the PKGBUILD. They are doing the same thing I recommended -- using 21.40.2 vulkan: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=amdgpu-pro-installer-fix#n14 As mentioned -- this is not a proper fix, it's a hacky workaround |
that works perfectly |
I still get freeze or seg fault with these amf 21-40-2 drivers using pkgbuild provided. Not sure whats wrong. VK_ICD_FILESNAMES=/usr/share/vulkan/icd.d/amd_pro_icd64.json:/usr/share/vulkan/icd.d/amd_pro_icd32.json OBS_USE_EGL=1 obs |
@jarrard And your games with vk_radv Does this change anything? Does it work for you now? |
Cheers it does appear to work now. I just test it by recording the desktop. I've been using obs_vkcapture for games which I think still works but i'll toss in vk_radv also to ensure radv gets used. Seems OBS_USE_EGL=1 vk_pro obs works in terminal but not in desktop exec=OBS_USE_EGL=1 vk_pro obs Yeah OBS_USE_EGL=1 vk_pro obs works in terminal but won't work in .desktop or sh/bash script... puzzling! |
@jarrard If you are using KDE, try adding
I have my json files moved out of |
Cheers, thought for some reason it works now. I'm using a sh script. |
So now we have some hacky workarounds to at least restore Almost everywhere I look, people say that I have a 6xxx GPU with Arch Linux, and during this one month period I used this package https://aur.archlinux.org/packages/amf-amdgpu-pro to install the proprietary AMD driver and AMF. This also pulled in Everything worked fine for a short time, but then in early April version 22.10 came out and suddenly AMF stopped working completely. Ever since then I've been trying to get back my
I would really love to get So... any word yet of For the record, this is the error that ffmpeg gives when I try to use
When using Now when I try to launch OBS with the StreamFX plugin with
Notice the last 2 lines. Of course, |
In general, AMF supports only distros supported by AMD GFX driver and driver installation script: |
hevc doesnt work for me either but give it a few months and it will likely fix itself |
I apologize if this doesn't fit here but if mixing components from different drivers is dangerous and not a good idea, shouldn't we all try to work towards a solution that doesn't require this rather than dismissing the problem as user fault? For starters, is this just specific to Arch Linux or is it happening even under officially supported distros? Have anyone actually tested and could confirm if hevc_amf on 6000 series actually works on the officially supported setup? 4k recording is already niche enough on top of doing that under Linux with expensive-ish (AMD) hardware. If it works, is there any way we could run OBS in a systemd-nspawn or similar and get HEVC_AMF to work? Or are only host systems supported? Also, for someone willing to test: Are there any live cd or similar that is officially supported or compatible that I could use to test if HEVC_AMF works on my GPU and give feedback here? |
Obviously, AMD tests AMF on all supported distros. Please report issues here. |
Quoting OP who seems to have tested the install script on a supported distro.
Along with your reply. I understand that we can take it as the bug is acknowledged and being investigated then? |
Any plans to support other distros - i.e. Fedora? The OP mentioned that this specific issue was duplicated on a supported distro...yet his issue has not been resolved and instead has been ignored. Besides AMF, the latest proprietary drivers do not work for certain games. i.e. - DoomEternal, Control The installation script installs a bunch of unnecessary files if someone just wants the pro vulkan drivers only, which is an option within the script. |
This place is dedicated to AMF SDK support. AMF is part of the driver, rely on the driver parts so the distro support is beyond AMF team to decide. |
Good news -- issue resolved! We (Nobara) dug around the packaging and found that libdrm-amdgpu libraries are needed in addition to the libamf, libamdfrt, libamdenc, and vulkan libraries. Additionally on fedora the opencl-filesystem package was needed. After this I now have fully working H264 and H265 encode on two different RDNA2 systems with the most up-to-date driver stack (no more vulkan legacy drivers for 6000+ series). |
Until mainline packages are fixed; it still broken. |
its not broken in AMD's driver stack when the full stack is used, and they dont provide packages for fedora or arch so this isn't their problem. As they mentioned its a problem when you start disecting and using parts of the stack without others. We had to find the missing parts (libdrm and the opencl-filesytem package). It should be noted on Fedora the opencl-filesystem package just creates an empty directory needed for opencl applications at /etc/OpenCL/vendors -- this can be done within the pre-existing packaging for other distros. |
Ok, well hopefully somebody can update those Arch repo's (and/or AUR) to have it fully working without manually copying files around to fix problems. |
Tried out the latest driver on Arch again and the issue seems to have fixed itself (without using libdrm from AMD). I'm not sure why, but I suspect it's because linux-firmware got an update that picked up this commit: amdgpu: update navy flounder to release 22.20. Mikhail mentioned something about a mismatch between the driver and VCN firmware version, so maybe I was running outdated firmware.
Strange, I wonder why it was broken when I tested it on Ubuntu 20.04. I was running it off a USB but I'm pretty sure I restarted the system after installing Radeon Software. |
Could you help what packages are you using? I have no sucess with amf-amdgpu-pro from aur. |
Hmm, seems 22.10 is still broken... I think this issue was fixed by a combination of the 22.20 driver and the recent firmware update. I submitted a PR so that the AUR package can be updated: Ashark/archlinux-amdgpu-pro#78. To build it yourself download this and run If others aren't still having issues I think this can be closed now. |
does launching OBS with OBS_USE_EGL=1 vk_pro obs still work fine? doesn't appear to work for me. NVM: Obs is broken for me, something must have broke in update. Damn Got it working again. Had to ditch obs-studio from aur as it uses Qt6 now which no plugins support. But unfortunately AMFx265 doesn't exist for me, only AMF264. I seem to get all the problems nobody else has. Well got the AUR of OBS studio working again, had to recompile several things it seems. However only AMD AMF H.264/AVC via FFmpeg shows up in the list. No 265. :( I think its because obs-hevc-vaapi-git is broken (fix doesn't work) and thus I have that missing. |
Are you using OBS with this StreamFX plugin https://github.com/Xaymar/obs-StreamFX ? That's the only way I've ever been able to get OBS to use AMF of either kind. |
EDIT: Not going to bother figuring it out. |
It's the firmware at least on my system; after I IDK about the full extent of the consequences of tampering with system firmware though... 👀 |
Think I managed to fix my AMF issues by using the default OBS studio... I was using OBS-studio-browser from AUR which is meant to incorporate twitch chat and some other plugins (they worked). Guess I'll just need to look for another solution at getting those missing windows OBS features on Linux.... PS. I WISH Twitch would support x265 or VP9 already! man that be nice! |
It looks like recent Arch linux-firmware update just broke it again. Anyone experience the same? |
I know this links to deb packages which aren't natively supported by Arch, but you might want to have a go at the packages beginning with "amdgpu-dkms-firmware" hosted here; the link is to a directory containing the second-latest firmware distributed directly by AMD as of the time I'm writing this (I didn't link the latest version as they were just released today and I haven't tested them on my machine yet). Hopefully once you extract the firmware files from the deb package (try the one for Ubuntu 20.04 first as that's what I'm running and works for me), place them in the appropriate directory (sorry I'm not sure what it is on Arch all I know is Ubuntu), and then reboot things will be fixed for you. 😄 EDIT: Also sorry I almost forgot to mention that one might have to "update-initramfs" before rebooting for the firmware to be loaded properly into the OS upon reboot. |
Yep, I just tried using the latest firmware distributed directly by AMD through "repo.radeon.com" and it broke AMF again on my machine 😕 So I reverted back to the firmware that I linked to above and everything was peachy again 😄 So yea just stick to the firmware that I previously linked to in my previous comment here for now and you hopefully should be good 👍 |
the firmware in 22.20.3 works like a charm, do not use the 5.3 repos it's a weird test repo , and it also lacks proprietary packages including amf , so there's no incentive over there to ship amf firmware, stick to relases that can be found on their website, and also they will 100% fix it sooner or later as NAVI3 GPUs need newer firmware , and by not fixing new relases they will break their own official distros |
and as i said sooner or later everything is gonna be fixed, AMD finally made the 5.X.X repositories complete and with proprietary packages, and as expected the firmware there works on all devices perfectly |
Describe the bug
Using any version of Radeon Software for Linux newer than 21.30 causes AMF to fail when attempting to encode video on an RX 6700 XT. This issue also occurred on an RX 590.
I usually use the unofficial AUR package for AMF to stream with OBS, but I can also reproduce the issue on Ubuntu 20.04 LTS which is a supported distro for AMF.
To Reproduce
Steps to reproduce the behavior:
h264_amf
encoder in FFmpeg or run the SimpleEncoder sample included in this repository.Setup:
Tests were done with AMD's proprietary Vulkan driver and not RADV. Using RADV causes a segfault on startup.
Debug Log:
When running
ffmpeg -loglevel verbose -i input.mp4 -c:v h264_amf -log_to_dbg true output.mp4
When running
SimpleEncoder input.mp4
Expected behavior
AMF should be able to encode the video successfully.
The text was updated successfully, but these errors were encountered: