Bug 1988772 - libva regression with radeonsi driver results in missing codecs
Summary: libva regression with radeonsi driver results in missing codecs
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 34
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-01 01:18 UTC by Wyatt Childers
Modified: 2021-08-23 14:34 UTC (History)
20 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-08-23 14:34:35 UTC
Type: Bug


Attachments (Terms of Use)
dmesg.txt as requested (124.23 KB, text/plain)
2021-08-01 01:18 UTC, Wyatt Childers
no flags Details


Links
System ID Private Priority Status Summary Last Updated
freedesktop.org Gitlab drm amd issues 1673 0 None None None 2021-08-10 14:02:44 UTC

Description Wyatt Childers 2021-08-01 01:18:22 UTC
Created attachment 1809784 [details]
dmesg.txt as requested

1. Please describe the problem:

This is coming from an issue I originally filed with Moonlight (https://github.com/moonlight-stream/moonlight-qt/issues/632).

Effectively when Fedora transitioned from 5.12.17-300.fc34.x86_64 to 5.13.4-200.fc34.x86_64, my vainfo regressed from:

~> LIBVA_DRIVER_NAME=radeonsi vainfo
libva info: VA-API version 1.11.0
libva info: User environment variable requested driver 'radeonsi'
libva info: Trying to open /usr/lib64/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_11
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.11 (libva 2.11.0)
vainfo: Driver version: Mesa Gallium driver 21.1.5 for AMD Radeon RX 6700 XT (NAVY_FLOUNDER, DRM 3.40.0, 5.12.17-300.fc34.x86_64, LLVM 12.0.0)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

To:

~> LIBVA_DRIVER_NAME=radeonsi vainfo
libva info: VA-API version 1.11.0
libva info: User environment variable requested driver 'radeonsi'
libva info: Trying to open /usr/lib64/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_11
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.11 (libva 2.11.0)
vainfo: Driver version: Mesa Gallium driver 21.1.5 for AMD Radeon RX 6700 XT (NAVY_FLOUNDER, DRM 3.41.0, 5.13.4-200.fc34.x86_64, LLVM 12.0.0)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

Showing a variety of missing decoders in the 5.13.x line. This results in Moonlight being unable to do any hardware decoding with HVEC and/or H264.

2. What is the Version-Release number of the kernel:

5.13.4-200.fc34.x86_64 AND 5.13.5-200.fc34.x86_64.

3. Did it work previously in Fedora? If so, what kernel version did the issue
   *first* appear?  Old kernels are available for download at
   https://koji.fedoraproject.org/koji/packageinfo?packageID=8 :

Yes, it worked previously in 5.12.17-300.fc34.x86_64. I haven't tested kernels older than 5.13.4-200.fc34.x86_64 (as it's the first in the 5.13.x line to hit my system via the updates). If requested I can potentially try installing some older kernels that weren't shipped via the update mechanisms.

4. Can you reproduce this issue? If so, please provide the steps to reproduce
   the issue below:

100% of the time, simply run the latest kernel, and use the above vainfo command.

5. Does this problem occur with the latest Rawhide kernel? To install the
   Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by
   ``sudo dnf update --enablerepo=rawhide kernel``:

This processes failed, as the packages failed the GPG check:

Fedora - Rawhide - Developmental packages for the next Fedora release
GPG key at file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-34-x86_64 (0x45719A39) is already installed
Fedora - Rawhide - Developmental packages for the next Fedora release
GPG key at file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-36-x86_64 (0x38AB71F4) is already installed
The GPG keys listed for the "Fedora - Rawhide - Developmental packages for the next Fedora release" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.. Failing package is: kernel-5.14.0-0.rc3.20210728git4010a528219e.32.fc35.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-34-x86_64, file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-36-x86_64
Public key for kernel-core-5.14.0-0.rc3.20210728git4010a528219e.32.fc35.x86_64.rpm is not installed. Failing package is: kernel-core-5.14.0-0.rc3.20210728git4010a528219e.32.fc35.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-34-x86_64, file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-36-x86_64
Public key for kernel-modules-5.14.0-0.rc3.20210728git4010a528219e.32.fc35.x86_64.rpm is not installed. Failing package is: kernel-modules-5.14.0-0.rc3.20210728git4010a528219e.32.fc35.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-34-x86_64, file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-36-x86_64
The downloaded packages were saved in cache until the next successful transaction.

6. Are you running any modules that not shipped with directly Fedora's kernel?:

Not to my knowledge, no.

7. Please attach the kernel logs. You can get the complete kernel log
   for a boot with ``journalctl --no-hostname -k > dmesg.txt``. If the
   issue occurred on a previous boot, use the journalctl ``-b`` flag.

Attached.

Comment 1 Wyatt Childers 2021-08-09 01:55:53 UTC
This is still an accurate picture as of 5.13.7-200.fc34.x86_64.

Comment 2 Wyatt Childers 2021-08-09 02:02:31 UTC
This is still an accurate picture as of 5.13.8-200.fc34.x86_64.

Comment 3 Wyatt Childers 2021-08-09 02:06:29 UTC
Similar thing happened for an Arch user: https://bugs.archlinux.org/task/71627 Likely an upstream issue.

Comment 4 Wyatt Childers 2021-08-09 02:14:08 UTC
This is still broken in the rawhide kernel 5.14.0-0.rc4.20210804gitd5ad8ec3cfb5.36.fc35.x86_64.

Comment 5 Mario Limonciello 2021-08-10 14:02:23 UTC
See if https://lists.freedesktop.org/archives/amd-gfx/2021-August/067432.html fixes it.

Comment 6 Wyatt Childers 2021-08-10 23:50:24 UTC
I made an effort to do so, but I have no idea how to build the Fedora kernel with a patch applied (which seems like it should be fairly trivial). 

There are multiple official versions of the documentation on how to build (https://fedoraproject.org/wiki/Building_a_custom_kernel and https://docs.fedoraproject.org/en-US/quick-docs/kernel/build-custom-kernel/). Neither are helpful (without kernel experience?) for this workflow.

What's the equivalent of?:

1. clone-the-source-for-5.13.x
2. install-the-deps
3. apply-the-patch
4. build-the-rpms-for-x86

I don't see a path for that outlined anywhere. Very frustrating from my perspective. I want to help but I don't have the time to piece this all together. 

Similar frustrations with the "Does this problem occur with the latest Rawhide kernel? To install the Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by ``sudo dnf update --enablerepo=rawhide kernel``:" line of the original bug report, and no clarity on how to get the right GPG keys, and no clear answer can be found googling either. I ended up just telling it "forget the GPG keys" which itself took a bit of research/was a workaround I found in trying to figure out how to install the thing in the first place -- still feel dirty about that.

Comment 7 Justin M. Forbes 2021-08-11 12:30:29 UTC
fedpkg clone --anonymous kernel
cd kernel
fedpkg switch-branch f34
cat /path/to/test.patch > linux-kernel-test.patch
fedpkg mockbuild

Comment 8 Wyatt Childers 2021-08-11 23:05:46 UTC
Thank you so much Justin.

Just tried this out, and I can confirm that the patch fixes the issue.

Comment 9 Wyatt Childers 2021-08-12 00:20:05 UTC
I've opened https://pagure.io/fedora-docs/quick-docs/pull-request/390# in hopes of reducing future friction.

Comment 10 Wyatt Childers 2021-08-23 14:34:35 UTC
Fixed by 5.13.12-200.fc34.x86_64


Note You need to log in before you can comment on or make changes to this bug.