Bug 103868

Summary: VK_PRESENT_MODE_MAILBOX_KHR blacks out the whole screen intermittently when using X11 compositing window managers
Product: xorg Reporter: Spencer Brown <sbrown124>
Component: Driver/modesettingAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED MOVED QA Contact: Xorg Project Team <xorg-team>
Severity: minor    
Priority: medium CC: jan.public
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Xorg log
none
dmesg none

Description Spencer Brown 2017-11-23 17:27:30 UTC
If you can reproduce this on your computer, you should be able to with the LunarG Vulkan SDK cube program. Run it like so:

$ ./cube --present_mode 1

You need to run a compositing window manager and alt-tab out or go to a different window to reproduce this, as far as I can tell. It doesn't happen when running under XMonad or Kwin with composition disabled with Alt+Shift+F12. You should see the screen blank out to black.

OS: Arch Linux x86_64
GPU: Radeon RX 460 2GB
Display connected by DVI-D
Window managers with the issue: Kwin, Mutter

I haven't tested whether the issue shows up with Wayland yet. I don't expect it to, but if it does, I'll leave a comment.
Comment 1 Michel Dänzer 2017-11-23 17:46:03 UTC
Please attach the corresponding Xorg log file and dmesg output, preferably captured after reproducing the problem.
Comment 2 Spencer Brown 2017-11-23 17:55:50 UTC
Created attachment 135681 [details]
Xorg log

The Xorg log.

Notable are these lines:

[   115.785] (WW) modeset(0): flip queue failed: Cannot allocate memory
[   115.785] (WW) modeset(0): Page flip failed: Cannot allocate memory
[   115.973] (WW) modeset(0): flip queue failed: Cannot allocate memory
[   115.973] (WW) modeset(0): Page flip failed: Cannot allocate memory
[   115.973] (EE) modeset(0): present flip failed
Comment 3 Spencer Brown 2017-11-23 17:58:21 UTC
Created attachment 135682 [details]
dmesg

Nothing really seems interesting to me here.

Also, I tested this on Wayland and there seems to be no problem with the mailbox present mode there.
Comment 4 Michel Dänzer 2017-11-24 15:15:16 UTC
(In reply to Spencer Brown from comment #3)
> dmesg
> 
> Nothing really seems interesting to me here.

Did you capture it after reproducing the problem as well?

This doesn't look directly related to RADV but rather like some kind of resource shortage preventing page flipping from working for the compositor.

Does this also happen with xf86-video-amdgpu instead of the modesetting driver? If yes, please attach the Xorg log file from that as well.
Comment 5 Spencer Brown 2017-11-24 16:14:45 UTC
Okay, it looks like this doesn't happen with the AMDGPU driver. It's only a problem with modesetting.
Comment 6 GitLab Migration User 2018-12-13 18:10:26 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/xorg/xserver/issues/44.

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.