[RESPONDED] VP9 HW decoding issue

And to that I ask the same I asked there: why does decode only (without displaying anything) use 3x as much power on linux as deconde and display uses on windows? Also why does software decoding use less power <1080p30 when both use as little fixed function stuff for the rest?

I am very glad to see there are related optimizations made in stuff I use but the point of the decoder itself using way too much power.

2 Likes

The thing mentioned above about the cursor isnā€™t quite obvious to everyone; but the issue with the cursor is that itā€™s composited with the desktop plane rather than running on itā€™s own hardware plane.

So IIUC that means youā€™re spinning up the GFX engine in order to have a cursor. Moving it to itā€™s own plane will mean that the compositor doesnā€™t need to have GFX running as frequently. Doing direct scanout will mean that the compositor doesnā€™t need to have GFX running.

All these optimizations to use the hardware more efficiently should add up.

6 Likes

Very nice and I am looking forward to those improvements, however: Y HW-DECODER USE SO MUCH POWER XD

Without scannout to the display (like just to dmabuf) can you see if the new PHX VCN F/W that was upsteamed today still consumes too much (specifically with EPP set to balanced)?

The one that fixes the vp9 stuttering? If itā€™s that one, at least the beta one didnā€™t do anything power wise (it did remove youtube stuttering in firefox though), I could retest the release one next week.

1 Like

Yeah itā€™s the release one for that issue. I havenā€™t personally looked at it so I donā€™t know for sure if there was anything else added to it from beta to release.

1 Like

I donā€™t have high hopes but Iā€™ll retest it once I get back.

Itā€™s important to test it specifically in a non-composited environment such as direct scan out or with a compositor not running to ensure the graphics engine doesnā€™t spin up so that youā€™re only looking at the hardware decoder.

1 Like

Fair enough, though I am pretty sure the ffmpeg into /dev/null cut out pretty much everything. Also the vaapi vs software decoding tests should also have everything else pretty much equal and jet the hw decoder uses significantly more power than software below 1080p30 (and both use significantly more power than doing the same takes on my t480s with an 8th gen i5), something fishy is going o there that isnā€™t just scaling and compositing.

2 Likes

Iā€™ve been following this because I would prefer to use firefox with hw video decoding, and currently cant because of this bug.

The firmware has been made available by AMD upstream (Thanks @Mario_Limonciello ) vaapi vp9 decoding glitches on rembrandt [Reproducer in comments] (#8044) Ā· Issues Ā· Mesa / mesa Ā· GitLab

Waiting for fedora to push out updated RPMs that contain the updated firmware 2267714 ā€“ update amd-gpu-firmware to fix VP9 video decode stuttering issue

2 Likes

The test firmware has worked well for me for the past 2 weeks, I have not noticed any video stutters. It did however unfortunately do nothing about the absurd power consumption.

2 Likes

Seems to be pushed now!

1 Like

yes, I installed the updated firmware for fedora 39 this past weekend. Unfortunately, there is still stuttering when playing videos with hardware acceleration in firefox. It happens less frequently than before, but it is still happening :frowning:

1 Like

I wonder if itā€™s the same case as mine, it happens on 4k60 fps videos? Especially if you play it at 2x??

@David_Corning @1115 apologies if this is an obvious question but, did you re-generate the boot-time initrd image? The firmware thatā€™s present in that (which is taken from the amd-gpu-firmware package thatā€™s installed at the time of image creation) is what runs. Normally images are generated on new kernel version installs but in Fedora you can also run sudo dracut --force then reboot.

1 Like

Hello, thanks for asking! I think yes because using dmesg and finding the VCN version of the firmware, itā€™s running the latest version: VCN firmware Version ENC: 1.30 DEC. Iā€™m on rembrandt btw (not a framework user yet)

Got it. If you have any reproducer video URLs you can share, please post them here and/or upstream.

I tried this one for a couple of minutes (made sure to set to 4K), no stuttering or other issues:

1 Like

I think on phoenix people should expect ā‰„ ENC: 1.17. With last firmware from gitlab I get:
[drm] Found VCN firmware Version ENC: 1.19 DEC: 7 VEP: 0 Revision: 0

1 Like

Playing this back at 4k60 and at normal speed thereā€™s like 8 dropped frames/1000 total. At 2x speed it just turns to a static image.

1 Like

did you re-generate the boot-time initrd image?

No, I didnā€™t. It turns out I was on VCN firmware Version ENC: 1.12 DEC: 5 VEP: 0 Revision: 0.

After regenerating the initrd, now Iā€™m at VCN firmware Version ENC: 1.19 DEC: 7 VEP: 0 Revision: 0.

There was a kernel update released roughly around the same time (kernel-6.7.9-200) and I thought Iā€™d pulled in updated kernel + updated firmware all at the same time, but I misrememberd :slight_smile: The kernel update came in first, and then hours later I pulled in the firmware.

Thanks for the reminder to check the basics first @dimitris :+1:

I tested a 4k60 vid today, and no stuttering so far, fingers crossed.

1 Like