Video Playback on AMD Vega 64 (amdgpu) flashes corrupt frames often
Categories
(Core :: Graphics, defect)
Tracking
()
People
(Reporter: hasezoey, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0
Steps to reproduce:
Watch a Youtube Video in fullscreen
i could not get a proper image, because those flashes happen for 1 frame only and i cannot get them to consistently reproduce
but there is a video i could made (though not properly showing that flash) at https://youtu.be/YdaZx9QxXSU
also the frame where it happens in the video is attached to this bug report
Actual results:
Video playback (plus sound) but intermittent flashes when in fullscreen
Expected results:
No flashes
Additional System Information:
Operating System: Manjaro Linux
KDE Plasma Version: 5.24.6
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Kernel Version: 5.18.7-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-7700K CPU @ 4.20GHz
Memory: 31.2 GiB of RAM
Graphics Processor: AMD Radeon RX Vega
This flashing happens across various formats (av1, vp9) and happens more often when something like "Cookie Clicker" (through Proton) is open (in my case on another screen).
I cannot reproduce this flashing consistently, but it happens pretty often, i also cannot just go back and replay, because then it does not happen again.
This flashing happens since upgrading to 101 or 102 (i cant quite remember), i did not test another firefox version yet, because i dont want to mess with my install or profile.
Also this problem only occurs on the listed machine, but not on others that i have tested.
I also know that my GPU is still "fine" because it did not happen before the firefox upgrade and other things just work fine too.
Comment 3•4 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 4•4 years ago
|
||
Hi, thanks for the report. Any chance you could use our regression tool to help us find a regression range?
Comment 5•4 years ago
|
||
Probably rendering related, but TBD based on the regressing bug.
(In reply to Jim Mathies [:jimm] from comment #4)
Hi, thanks for the report. Any chance you could use our regression tool to help us find a regression range?
I tried, but cant run it
when running the latest downloaded package (4.0.8 mozregression-gui.tar.gz) with ./mozregression-gui, it Segfaults with:
Fontconfig warning: "/etc/fonts/fonts.conf", line 5: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/11-lcdfilter-default.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/20-unhint-small-vera.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/45-generic.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/48-spacing.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/49-sansserif.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/51-local.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/60-generic.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/60-latin.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/65-nonlatin.conf", line 4: unknown element "description"
Fontconfig warning: FcPattern object weight does not accept value [40 210)
[1] 50079 segmentation fault (core dumped) ./mozregression-gui
gdb output:
Process 50079 (mozregression-g) of user 1000 dumped core.
Module /home/hasezoey/Downloads/mozregression-gui/mozregression-gui with build-id 24675b0091f38f45c5c1c5484cf24925b439b164
Module linux-vdso.so.1 with build-id 8b671f426198e43e71faa728eb191a8931c2dfcb
Module ld-linux-x86-64.so.2 with build-id 0effd0e43efa4468d3c31871c93af0b7f3005673
Module libc.so.6 with build-id 60df1df31f02a7b23da83e8ef923359885b81492
Module libpthread.so.0 with build-id 95ae4f30a6f12ccbff645d30f8e1a3ee23ec7d36
Module libz.so.1 with build-id fefe3219a96d682ec98fcfb78866b8594298b5a2
Module libdl.so.2 with build-id 94198b268228074fa9f405bbedbbae94112593ed
Stack trace of thread 50079:
#0 0x00007f833ada636c n/a (libc.so.6 + 0x8e36c)
#1 0x00007f833ad56838 raise (libc.so.6 + 0x3e838)
#2 0x000055c46f89f213 n/a (/home/hasezoey/Downloads/mozregression-gui/mozregression-gui + 0x6213)
ELF object binary architecture: AMD x86-64
---
(gdb) bt
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0)
at pthread_kill.c:44
#1 0x00007f833ada63d3 in __pthread_kill_internal (signo=11, threadid=<optimized out>) at pthread_kill.c:78
#2 0x00007f833ad56838 in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
#3 0x000055c46f89f213 in ?? ()
#4 0x000055c46f89d15d in ?? ()
#5 0x00007f833ad41290 in __libc_start_call_main (main=main@entry=0x55c46f89b4d0, argc=argc@entry=1,
argv=argv@entry=0x7fff01a1dd58) at ../sysdeps/nptl/libc_start_call_main.h:58
#6 0x00007f833ad4134a in __libc_start_main_impl (main=0x55c46f89b4d0, argc=1, argv=0x7fff01a1dd58,
init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff01a1dd48)
at ../csu/libc-start.c:389
#7 0x000055c46f89b50a in ?? ()
and manually building / running the repo also does not work with:
ERROR: Ignored the following versions that require a different python version: 5.14.0 Requires-Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <3.9; 5.14.1 Requires-Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <3.9; 5.14.2 Requires-Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <3.9; 5.14.2.1 Requires-Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <3.9; 5.14.2.2 Requires-Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <3.9; 5.14.2.3 Requires-Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <3.9; 5.15.0 Requires-Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <3.9; 5.15.1 Requires-Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <3.10; 5.15.2 Requires-Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <3.10
ERROR: Could not find a version that satisfies the requirement pyside2==5.15.2 (from versions: 0.0.0a1, 5.11.0, 5.11.1, 5.11.2, 5.12.0, 5.12.1, 5.12.2, 5.12.3, 5.12.4, 5.12.5, 5.12.6, 5.13.0, 5.13.1, 5.13.2, 5.15.2.1)
ERROR: No matching distribution found for pyside2==5.15.2
and i dont use python, so i dont quite know how to resolve this (installed python is 3.10 and i will not mess with that install because it is required somewhere else)
Comment 7•4 years ago
|
||
Ok, lets try something else. Could you try to record and upload a Firefox Performance Profile with the Graphics preset selected in the profile type drop down for us?
Enable the toolbar button, click the toolbar button drop down and select Graphics, then start recording a profile by clicking the main toolbar button, and viewing something in youtube fullscreen where the issue reproduces.
After you exit fullscreen and click the toolbar button to stop recording, a tab will open with the profile. Click upload and post the resulting link here.
will try to provide the link, i have been testing for ~3 hours now, but since i have this profiler activated, the issue did not come up again, also i cannot use the profiler more than ~1 minute, because otherwise when stopping firefox will just crash (without a crash report and also no core-dumps)
I have now upgraded to firefox 103, where it happened again, and this time i got the profiler to not crash: https://share.firefox.dev/3S9yoaU
This upload had this flash happen 2 times while it was active.
Comment 10•4 years ago
|
||
The severity field is not set for this bug.
:jimm, could you have a look please?
For more information, please visit auto_nag documentation.
| Reporter | ||
Comment 11•4 years ago
|
||
in case it help, i could get another profile: https://share.firefox.dev/3zItYzt (in this case it happened 1 time while active)
| Reporter | ||
Comment 12•4 years ago
|
||
Since the opening of this issue, i have also noticed that this flicker happens when the video is paused (nothing is played), but still in full-screen
and also sometimes happens when window focus changes (from firefox to something else, and from something else to firefox (both while firefox is in fullscreen)).
but i have not been able to capture such a flicker yet, because they rarely happen, and are "unpredictable" when they happen (and relatively far apart for me to start the profiler just after one happened)
PS: i still cannot run the profiler for long, because otherwise when stopping it, it just crashes firefox and the profile is gone after a restart (if the page did not open yet)
| Reporter | ||
Comment 13•4 years ago
|
||
i just wanted to add another profile after having captured more than 10 occurences in ~5minuts, but the profiler failed with the following in the console:
Error: DataCloneError: JSWindowActorParent.sendAsyncMessage: JSWindowActorParent serialization error: data too large, in actor 'WebChannel'
e web-channel.js:252
AppViewRouter.js:91:20
Error: DataCloneError: JSWindowActorParent.sendAsyncMessage: JSWindowActorParent serialization error: data too large, in actor 'WebChannel'
e web-channel.js:252
receive-profile.js:1027:14
and was just stuck at Importing the profile directly from Firefox… and after ~5 minutes i closed the importing page, thinking it was not going to do anything
i have also noticed that this flicker happens in all fullscreen pages, not just video playback, though i have no profile yet for that
| Reporter | ||
Comment 14•4 years ago
|
||
i have also noticed that this flicker happens in all fullscreen pages, not just video playback, though i have no profile yet for that
i could get a capture of it https://share.firefox.dev/3dQlhvL, this was done while being in fullscreen with mangadex.org open (in this case it happened ~2 times)
Updated•4 years ago
|
Comment 15•4 years ago
|
||
Sotaro, could you please have a look at this when you get a chance?
Comment 16•4 years ago
|
||
(In reply to hasezoey from comment #11)
in case it help, i could get another profile: https://share.firefox.dev/3zItYzt (in this case it happened 1 time while active)
From the profile data, BufferTextureHost seemed to be used for video frame data. And partial present was used by WebRender to swap buffer.
Hello :hasezoey, can you check if the problem happen by disabling partial present? It could be changed from about:support and setting pref gfx.webrender.max-partial-present-rects to 0. And can you upload about:support to this bug?
Comment 17•4 years ago
|
||
:stransky, do you have any ideas about what could cause the problem?
Updated•4 years ago
|
Comment 18•4 years ago
|
||
Hasezoey: hi, can you please also share your about:support from Firefox? ("Copy text to clipboard" -> paste here in a comment -> bugzilla will ask to create an attachment from it -> yes).
i have also noticed that this flicker happens in all fullscreen pages, not just video playback, though i have no profile yet for that
To me this sounds like a hint towards a driver (Mesa) or compositor (Kwin) issue, possibly related to "direct scanout" - something still relatively new in the Wayland world.
| Reporter | ||
Comment 19•4 years ago
|
||
Add about:support Copy as Text as attachment, as requested (before change of gfx.webrender.max-partial-present-rects)
Comment 20•4 years ago
|
||
(In reply to hasezoey from comment #19)
Add
about:supportCopy as Textas attachment, as requested (before change ofgfx.webrender.max-partial-present-rects)
Thanks! Some follow up question regarding the only things that stand out to me:
- does the issue happen on all displays? Does it happen when you only have one connected, instead of three?
- is any display connected via the Intel GPU instead of the AMD one? Can you disable the Intel GPU in BIOS to ensure it doesn't interfere here?
- did you check if any other DE than KDE shows the issue? E.g. Gnome?
Checking this would be super helpful, hope you find time for it :)
| Reporter | ||
Comment 21•4 years ago
|
||
i have noticed that when it happens in one firefox window, opening a new window (while the other is still there) with something like CTRL+N, and then moving the tabs (in my case mangadex tabs) over to the new window, then this flicker does not (yet) happen in the new window (while it happened while the tabs were not yet moved, or are moved back to the window where it flickered)
also noticed that when no video was played in the window yet, the flicker does not (yet) happen in fullscreen modes (though this might just be a coincidence)
i dont know if this is relevant but it might be:
since around firefox 100, when in fullscreen and a notification or overlay appears (with kde plasma wayland, overlay like "volume" or "screen brightness"), firefox reverts to the first fullscreen frame until a update (/ new frame) is made from firefox (or at least when in mangadex a key (to move the page, like arrow key) is pressed) and the notification is still displayed, after the notification / overlay is gone (and no new update is made), firefox reverts back to what it should be
(the above was written without the gfx.webrender.max-partial-present-rects applied yet)
| Reporter | ||
Comment 22•4 years ago
|
||
does the issue happen on all displays?
it happens on all displays connected, when the firefox window is in fullscreen there (3 connected)
is any display connected via the Intel GPU instead of the AMD one? Can you disable the Intel GPU in BIOS to ensure it doesn't interfere here?
all displays are connected to the only AMD GPU in the system (i had the Intel GPU activated in the hopes that firefox would be able to use the capabilities for video decode, but it seemes like firefox only uses the active gpu's capabilities with vaapi, from what i read in other issues and from my tries)
did you check if any other DE than KDE shows the issue? E.g. Gnome?
no i do not have any other installed currently and i would rather not mess with that
Does it happen when you only have one connected, instead of three?
i currently rather would not mess with display setup, but i will try if i can
also in case it helps: the KDE Compositor config i have set:
Scale Method: Accurate
Latency: Balance of Latency and smoothness
Tearing prevention (vsync): Automatic
Comment 23•4 years ago
•
|
||
since around firefox 100
For the record, I see you have gfx.webrender.compositor manually changed - is there a chance that you used to have gfx.webrender.compositor.force-enabled set as well at some point? It was force-disabled in release build in bug 1770404 / FF 102.
Using that experimental setting would disable direct scanout, possibly hiding issues you'd otherwise have seen a few month earlier already.
since around firefox 100, when in fullscreen and a notification or overlay appears (with kde plasma wayland, overlay like "volume" or "screen brightness"), firefox reverts to the first fullscreen frame until a update (/ new frame) is made from firefox
More indication that Kwins direct scanout implementation is to blame (or Mesa) :)
| Reporter | ||
Comment 24•4 years ago
|
||
For the record, I see you have gfx.webrender.compositor manually changed
i think this was related to having vaapi enabled (i wanted to try vaapi because (even currently) firefox uses ~20-40% cpu (all cores) for 1080p video-playback on youtube)
OR was related to get firefox working on wayland natively (not through xwayland) for better performance / efficiency (in hopes it would use the GPU more instead of CPU)
is there a chance that you used to have gfx.webrender.compositor.force-enabled set as well at some point?
i think i had this once enabled to try to get vaapi to work, but reverted it to default (false) when i found that it didnt work
Comment 25•4 years ago
|
||
i think this was related to having vaapi enabled
FTR: as of FF 104 media.hardware-video-decoding.force-enabled is the toggle to use for that. Or media.ffmpeg.vaapi.enabled (now deprecated, but still works, also in 103).
(In reply to hasezoey from comment #22)
...
Thanks. I think for the time being there's nothing actionable from our side yet and we'll have to wait for either more reports from other users or until you find time/motivation to test more of those scenarios to pinpoint the problem. I also wouldn't be surprised if the problem goes away in a future kernel, kwin or mesa update. It's also of course worth to watch out whether you see a similar issues with GTK4 or QT apps, however even if that's not the case it does not automatically mean that FF is to blame.
| Reporter | ||
Comment 26•4 years ago
|
||
I also wouldn't be surprised if the problem goes away in a future kernel, kwin or mesa update
i would also not be surprised
I also wouldn't be surprised if the problem goes away in a future kernel, kwin or mesa update
It's also of course worth to watch out whether you see a similar issues with GTK4 or QT apps, however even if that's not the case it does not automatically mean that FF is to blame.
i didnt know if it is a KDE, Mesa or firefox problem, but because it only happened in firefox (and after a update at that) i had filed it here in the hopes of getting send to the right place once figured out
Comment 27•4 years ago
|
||
i had filed it here in the hopes of getting send to the right place once figured out
Which is great and and a good start :) Given that your setup is doesn't look that unusual I'd expect that we get more similar reports sooner or later, allowing us a better diagnosis.
| Reporter | ||
Comment 28•4 years ago
|
||
It could be changed from about:support and setting pref gfx.webrender.max-partial-present-rects to 0
i have tried it setting to 0 (from a previous default of 1), but the issue still happens, profile: https://share.firefox.dev/3KwhT5g
for now i am going to reset it to the default
Comment 29•4 years ago
|
||
It's not a VA-API issue. May be related to direct decode? Try to set media.ffmpeg.customized-buffer-allocation to false at about:config and restart browser.
Thanks.
Updated•4 years ago
|
| Reporter | ||
Comment 30•4 years ago
|
||
As a update, it seems like with the recent Manjaro update stable-update-2022-09-12, and firefox 104, it stopped (or at very least very infrequently now) happening, though now it also happened in some special cases that are non-firefox and so i think this may be a issue with KDE or MESA directly.
KDE Report:
Operating System: Manjaro Linux
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.5
Kernel Version: 5.19.7-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-7700K CPU @ 4.20GHz
Memory: 31.2 GiB of RAM
Graphics Processor: AMD Radeon RX Vega
Manufacturer: MSI
Product Name: MS-7972
System Version: 2.0
Description
•