Bug 97119 - screen flickerin under KDE when compositor was dis- and reenabled
Summary: screen flickerin under KDE when compositor was dis- and reenabled
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-28 19:21 UTC by Johannes Hirte
Modified: 2019-09-25 17:54 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
screenshot.png (196.80 KB, image/png)
2016-07-28 19:21 UTC, Johannes Hirte
Details
Xorg.0.log (26.23 KB, text/plain)
2016-08-23 19:28 UTC, Johannes Hirte
Details
screencast with flickering (2.33 MB, video/x-matroska)
2016-08-25 18:27 UTC, Johannes Hirte
Details
distortion in window after leaving fullscreen in mpv (282.58 KB, image/png)
2016-09-05 19:50 UTC, Johannes Hirte
Details

Description Johannes Hirte 2016-07-28 19:21:20 UTC
Created attachment 125385 [details]
screenshot.png

When running without compositor, I get the screen distortion like in the screenshot on my Carrizo. This can be triggered either by disabling the checkbox "Enable compositor on startup" in the kwin config or by enabling "Suspend compositor for full screen windows", start an application in fullscreen like mpv and switch to another virtual desktop. The distortions go away after reenabling the compositor, but I have heavy flickering around the window that has the focus. Switching focus or resizing the window helps temporarily but reappears with every newly opened window. At least logout and re-login into X is needed.

Hardware is a "CARRIZO" (ChipID = 0x9874)

software components are:

xserver 1.18.4
llvm git (at commit 5e00cf65e23656cbeba353efb5a7d85ba8e25f4a)
drm git (at commit 0caa84cb046156b9b2ca248d32af9548b04316e1)
mesa git (at commit 2f57e578812f277c87966279a728dd2a60b4e9be)
xf86-video-amdgpu git (at commit abd1a7901c95e4bc78415cf1b7923623b9177152)

kernel 4.7.0-04773-g194dc87

Gentoo Linux
Comment 1 Johannes Hirte 2016-08-18 13:28:44 UTC
I don't need to disable compositing myself. Just putting mpv in fullscreen when playing a video is sufficient to get a garbled screen on other virtual desktops. Not sure, if mpv is forcing compositing off by itself.

Looks like a bug in xf86-video-amdgpu, cause with modesetting driver everything works fine.
Comment 2 Michel Dänzer 2016-08-19 01:55:39 UTC
Please attach the corresponding Xorg log file, preferably captured after the problem occurred.
Comment 3 Johannes Hirte 2016-08-23 19:28:20 UTC
Created attachment 125982 [details]
Xorg.0.log

Xorg.0.log when screen distortions started. Looks pretty normal to me. Are there any debug options I need to enable?
Comment 4 Johannes Hirte 2016-08-23 22:19:09 UTC
I've noticed now, that with modesetting the flickering happens too. Again it's happening when putting a video into fullscreen and switching to another virtual desktop of KDE. It's not as heavy as with amdgpu, so I didn't noticed this before.
Comment 5 Michel Dänzer 2016-08-24 08:44:21 UTC
Since it happens with modesetting as well, it's more likely a Mesa issue.

I wonder if this might be a duplicate of bug 97029. Maybe try if setting the environment variable R600_DEBUG=nodma for the kwin process avoids the problem.
Comment 6 Michel Dänzer 2016-08-24 08:47:50 UTC
Actually, it's better to set the environment variable for the Xorg process as well, since that might perform the corrupted rendering.
Comment 7 Johannes Hirte 2016-08-24 12:42:44 UTC
(In reply to Michel Dänzer from comment #5)
> Since it happens with modesetting as well, it's more likely a Mesa issue.
> 
> I wonder if this might be a duplicate of bug 97029. Maybe try if setting the
> environment variable R600_DEBUG=nodma for the kwin process avoids the
> problem.

Yes, seems this fixes the distortions as well as the flickering. I've set R600_DEBUG globally, so kwin and Xorg are affected both.
Comment 8 Michel Dänzer 2016-08-24 13:34:59 UTC

*** This bug has been marked as a duplicate of bug 97029 ***
Comment 9 Johannes Hirte 2016-08-25 18:26:06 UTC
Reopening for tracking flickering separately from 97029.

Flickering is happening mostly with amdgpu driver. Sometimes I've observed this with modesetting too, but I can't trigger it reliable with this driver.

With amdgpu I can trigger this easily by starting a video with mpv and putting it into fullscreen. Ending the video or the fullscreen mode causes the flickering around newly created windows. I'll add a screencast how this look like.

The flickering can be stopped by starting again a video in fullscreen. As long as the video is on one virtual desktop, everything works like expected. It doesn't matter if xv, opengl, vdpau or vaapi output is used.
Comment 10 Johannes Hirte 2016-08-25 18:27:38 UTC
Created attachment 126033 [details]
screencast with flickering
Comment 11 Johannes Hirte 2016-08-25 18:38:22 UTC
It seems the flickering is related to the repaint rate of the screen. With video playback it's more heavy than by typing some text. The faster the typing is, the heavier the flickering becomes.
Comment 12 network723 2016-08-25 18:47:11 UTC
The video resembles kwin bug: https://bugs.kde.org/show_bug.cgi?id=361154 which was fixed in plasma 5.7.4.
Comment 13 Johannes Hirte 2016-08-25 19:31:24 UTC
(In reply to network723 from comment #12)
> The video resembles kwin bug: https://bugs.kde.org/show_bug.cgi?id=361154
> which was fixed in plasma 5.7.4.

I'm running plasma 5.7.4 here and still have the problem. Additionally it's only affecting amdgpu systems like Carrizo. I don't see this on a Sumo system (radeon/r600). Tomorrow I can try if I can trigger this on Kabini too.
Comment 14 Michel Dänzer 2016-08-29 09:51:09 UTC
Which 'Tearing prevention ("vsync")' mode are you using in the kwin compositor settings? Maybe attach a screenshot of that settings page.
Comment 15 Johannes Hirte 2016-09-03 18:47:36 UTC
(In reply to Michel Dänzer from comment #14)
> Which 'Tearing prevention ("vsync")' mode are you using in the kwin
> compositor settings? Maybe attach a screenshot of that settings page.

Was "Automatic" , but test with "Never" shows the same behavior. I've suspected glamor to be related here, but a test on Sumo with AccelMethod glamor doesn't reproduce the error.
Comment 16 Christoph Haag 2016-09-05 15:10:09 UTC
I've seen similar flickering with kwin 5.7.4 from archlinux:
https://www.youtube.com/watch?v=EnzI7dmjihI

With latest kwin git it does not happen anymore. So if anyone wants to try it an confirm whether kwin git fixes it: you only need kwayland git, the rest of kde plasma can stay on the latest release version.
Comment 17 Johannes Hirte 2016-09-05 19:46:43 UTC
Flickering seems to be gone for me too, but I didn't update kwin or related. The parts I've updated last weekend:

llvm
drm
mesa
xf86-video-amdgpu

I have some distortions in the top frame of the window (screenshot of chromium appended). I will test an update of kwin, if it will fix this.
Comment 18 Johannes Hirte 2016-09-05 19:50:01 UTC
Created attachment 126230 [details]
distortion in window after leaving fullscreen in mpv
Comment 19 Christoph Haag 2016-09-06 13:16:15 UTC
Discard that. It still happens with kwin git.
Comment 20 Johannes Hirte 2016-09-07 13:38:46 UTC
(In reply to Johannes Hirte from comment #17)
> Flickering seems to be gone for me too, but I didn't update kwin or related.
> The parts I've updated last weekend:
>

No it isn't. The one time I've thought it was gone, it was restricted to the title bar, where the distortions happened. After reboot it's back as before.

I've tested on a Kabini system, cause I thought it's using amdgpu too. But I was wrong, it's only using radeonsi from mesa. On kernel and ddx side it's still the radeon driver. I will update everything to current git and re-test with amdgpu.
Comment 21 network723 2016-09-12 18:02:52 UTC
This also happens with intel gpu, but no flickering, black areas stand still, until something causes update of that part of the screen.
Comment 22 GitLab Migration User 2019-09-25 17:54:55 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1236.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.