Discussion:
[Bug 107992] New: xf86-video-amdgpu-18.1.0: video freezes in firefox
b***@freedesktop.org
2018-09-19 20:18:30 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=107992

Bug ID: 107992
Summary: xf86-video-amdgpu-18.1.0: video freezes in firefox
Product: xorg
Version: unspecified
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: Driver/AMDgpu
Assignee: xorg-driver-***@lists.x.org
Reporter: ***@tsoy.me
QA Contact: xorg-***@lists.x.org

Created attachment 141654
--> https://bugs.freedesktop.org/attachment.cgi?id=141654&action=edit
Xorg.1.log

I get constant video freezes in firefox (e.g. on youtube) with
xf86-video-amdgpu-18.1.0. This is a regression since 18.0.1. Long freezes can
be stopped by hovering mouse cursor over the video.


$ git bisect bad
739181c8d3334ff14b5a607895dfdeb29b0d9020 is the first bad commit
commit 739181c8d3334ff14b5a607895dfdeb29b0d9020
Author: Michel DÀnzer <***@amd.com>
Date: Wed Jul 25 13:00:15 2018 +0200

Add amdgpu_drm_handle_event wrapper for drmHandleEvent

Instead of processing DRM events directly from drmHandleEvent's
callbacks, there are three phases:

1. drmHandleEvent is called, and signalled events are re-queued to
_signalled lists from its callbacks.
2. Signalled page flip completion events are processed.
3. Signalled vblank events are processed.

This should make sure that we never call drmHandleEvent from one of its
callbacks, which would usually result in blocking forever.

:040000 040000 02eec05d22520cd515a137b18ab912a7f2fdc77e
cec6036a94d5f35eceb772a8de0b86c2b62cf913 M src


$ git bisect log
git bisect start
# good: [9f37a44473ded8c669897379acbc750362c15ec6] Bump version for 18.0.1
release
git bisect good 9f37a44473ded8c669897379acbc750362c15ec6
# bad: [d5e17dc4c78aee5d37de399728066b9be881e044] Bump version for the 18.1.0
release
git bisect bad d5e17dc4c78aee5d37de399728066b9be881e044
# good: [14db71a606128c4a207f43298809af279b77e2a8] modesetting: Record
non-desktop kernel property at PreInit time
git bisect good 14db71a606128c4a207f43298809af279b77e2a8
# good: [7f65a8c9e03bddf2378aaa928460632ed6b1a688] glamor: Check glamor module
version for depth 30 support
git bisect good 7f65a8c9e03bddf2378aaa928460632ed6b1a688
# bad: [34e851d1f284da5afcfe449f349cf1eb5e962408] Use AC_CONFIG_MACRO_DIR
instead of AC_CONFIG_MACRO_DIRS
git bisect bad 34e851d1f284da5afcfe449f349cf1eb5e962408
# bad: [e52872da69ecc84dafb3355839e35b0383f0d228] Defer vblank event handling
while waiting for a pending flip
git bisect bad e52872da69ecc84dafb3355839e35b0383f0d228
# good: [6029794e8a35417faf825491a89b85f713c77fc1] Add
amdgpu_drm_wait_pending_flip function
git bisect good 6029794e8a35417faf825491a89b85f713c77fc1
# bad: [739181c8d3334ff14b5a607895dfdeb29b0d9020] Add amdgpu_drm_handle_event
wrapper for drmHandleEvent
git bisect bad 739181c8d3334ff14b5a607895dfdeb29b0d9020
# first bad commit: [739181c8d3334ff14b5a607895dfdeb29b0d9020] Add
amdgpu_drm_handle_event wrapper for drmHandleEvent
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2018-09-19 20:18:55 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=107992

Alexander Tsoy <***@tsoy.me> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #141654|text/x-log |text/plain
mime type| |
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2018-09-20 08:52:27 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=107992

--- Comment #1 from Michel DÀnzer <***@daenzer.net> ---
I'm unable to reproduce the problem. Please attach the following:

* The output of about:support in Firefox
* The output of glxinfo, xrandr --verbose and dmesg

Can you provide an URL of a video which reproduces the problem? Does it only
happen if the video is (not) in fullscreen? How long after starting playback
does it start freezing?

Does only the video itself freeze, or also the rest of the Firefox window, or
even the whole desktop?
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2018-09-20 17:59:25 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=107992

--- Comment #2 from Dudu Edri <***@outlook.com> ---
Can confirm that the problem reproduces to me too. It happens on youtube or
other HTML5 videos, as well as when scrolling around on webpages. It's not
constant though - there could be several seconds without hangs, but the overall
experience is sluggish.

The freezes only happen when hardware acceleration is enabled in Firefox
(OpenGL under "Compositing" in about:support. It could be enabled by changing
"layers.acceleration.force-enabled" to "true" in about:config).

As for your question, the whole Firefox window becomes unresponsive for a
second or two.
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2018-09-20 19:27:03 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=107992

--- Comment #3 from Alexander Tsoy <***@tsoy.me> ---
(In reply to Dudu Edri from comment #2)
Post by b***@freedesktop.org
The freezes only happen when hardware acceleration is enabled in Firefox
(OpenGL under "Compositing" in about:support. It could be enabled by
changing "layers.acceleration.force-enabled" to "true" in about:config).
Confirming this. Can't reproduce the bug with hardware compositing disabled
(layers.acceleration.force-enabled = false).
Post by b***@freedesktop.org
As for your question, the whole Firefox window becomes unresponsive for a
second or two.
I sometimes have much longer freezes.


(In reply to Michel DÀnzer from comment #1)
Post by b***@freedesktop.org
* The output of about:support in Firefox
* The output of glxinfo, xrandr --verbose and dmesg
Do you still need this info?
Post by b***@freedesktop.org
Can you provide an URL of a video which reproduces the problem?
I did bisect using the following video:

Post by b***@freedesktop.org
Does it only happen if the video is (not) in fullscreen?
Both fullscreen and non-fullscreen.
Post by b***@freedesktop.org
How long after starting playback does it start freezing?
It's random. Maybe ~10 seconds.
Post by b***@freedesktop.org
Does only the video itself freeze, or also the rest of the Firefox window,
or even the whole desktop?
The whole firefox window. Not sure about the whole desktop - when I move mouse
to gnome shell panel firefox unfreezes.
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2018-09-20 21:31:53 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=107992

--- Comment #4 from Alexander Tsoy <***@tsoy.me> ---
I see similar freezes in Steam client when playing videos on the store pages.
But unlike firefox this doesn't happen in fullscreen mode.
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2018-09-21 07:19:46 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=107992

--- Comment #5 from Michel DÀnzer <***@daenzer.net> ---
(In reply to Alexander Tsoy from comment #3)
Post by b***@freedesktop.org
Post by b***@freedesktop.org
* The output of about:support in Firefox
* The output of glxinfo, xrandr --verbose and dmesg
Do you still need this info?
Yes, please.

I have hardware acceleration enabled in my Firefox configurations as well, but
am still unable to reproduce.
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2018-09-21 07:50:20 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=107992

--- Comment #6 from Alexander Tsoy <***@tsoy.me> ---
Created attachment 141667
--> https://bugs.freedesktop.org/attachment.cgi?id=141667&action=edit
firefox about:support
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2018-09-21 07:51:22 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=107992

--- Comment #7 from Alexander Tsoy <***@tsoy.me> ---
Created attachment 141668
--> https://bugs.freedesktop.org/attachment.cgi?id=141668&action=edit
glxinfo
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2018-09-21 07:52:07 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=107992

--- Comment #8 from Alexander Tsoy <***@tsoy.me> ---
Created attachment 141669
--> https://bugs.freedesktop.org/attachment.cgi?id=141669&action=edit
xrandr --verbose
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2018-09-21 07:53:07 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=107992

--- Comment #9 from Alexander Tsoy <***@tsoy.me> ---
Created attachment 141670
--> https://bugs.freedesktop.org/attachment.cgi?id=141670&action=edit
dmesg
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2018-09-21 17:00:33 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=107992

--- Comment #10 from Michel DÀnzer <***@daenzer.net> ---
Thanks. I was able to reproduce the problem after all. It's actually
gnome-shell/mutter that freezes, not Firefox itself. My best guess so far is
that it's somehow related to delivery / processing of X11 events, but I'm not
sure yet what's going on.

A possible workaround might be having something in the session which updates
regularly. E.g. I suspect I might not have noticed this before myself because I
usually have gkrellm running in my session.
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2018-09-24 17:05:34 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=107992

--- Comment #11 from Michel DÀnzer <***@daenzer.net> ---
I suspect this is the same issue as bug 108008 =>
https://gitlab.freedesktop.org/xorg/lib/libx11/issues/79 .
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2018-09-25 15:21:38 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=107992

--- Comment #12 from Michel DÀnzer <***@daenzer.net> ---
This libX11 patch fixes it for me:
https://gitlab.freedesktop.org/xorg/lib/libx11/merge_requests/1
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2018-09-25 19:11:51 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=107992

--- Comment #13 from Alexander Tsoy <***@tsoy.me> ---
(In reply to Michel DÀnzer from comment #12)
Post by b***@freedesktop.org
https://gitlab.freedesktop.org/xorg/lib/libx11/merge_requests/1
Thanks! It fixes it for me as well.
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2018-09-27 21:43:02 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=107992

--- Comment #14 from Dudu Edri <***@outlook.com> ---
(In reply to Michel DÀnzer from comment #12)
Post by b***@freedesktop.org
https://gitlab.freedesktop.org/xorg/lib/libx11/merge_requests/1
Can confirm that this patch fixes the problem for me as well.
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2018-09-28 15:35:15 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=107992

--- Comment #15 from Michel DÀnzer <***@daenzer.net> ---
Thanks for the report and for testing the fix, which has now landed in libX11
Git master:

commit 406afe4b0f1b655c0db19bbc9a0c48da9a46acf5
Author: Michel DÀnzer <***@amd.com>
Date: Tue Sep 25 17:10:58 2018 +0200

poll_for_response: Call poll_for_event again if xcb_poll_for_reply fails
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2018-09-28 15:35:22 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=107992

Michel DÀnzer <***@daenzer.net> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--
You are receiving this mail because:
You are the assignee for the bug.
Loading...