Bug 110539

Summary: radv: OBS video capture broken by anti-aliasing in Vulkan games after upgrade to Mesa 19
Product: Mesa Reporter: Kon <v34969>
Component: Drivers/Vulkan/radeonAssignee: mesa-dev
Status: RESOLVED NOTOURBUG QA Contact: mesa-dev
Severity: normal    
Priority: medium    
Version: 19.0   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Kon 2019-04-28 10:14:46 UTC
Kubuntu 18.04.2
Kernel 4.18.0-18
Mesa 19.0.1-3~b~padoka0 (Padoka Stable PPA)
Radeon RX 570
Ryzen 7 1700X
Proton 4.2-3 (where applicable)


After upgrading today from 18.3.3, I noticed OBS Studio's video capture of all tested Vulkan games becomes exceptionally dark and washed out. This could not be resolved through any change to OBS' capture settings or color space settings.

I found this bug to be directly related to anti-aliasing in all tested DXVK titles, but AA settings seemed to have no effect in No Man's Sky, a Vulkan title run through Wine (thus not using DXVK).

The bug did not appear in any tested native OpenGL games, or Wine games that used WineD3D.

In 2 affected DXVK titles, setting the game to use FXAA appears to resolve the issue. Any other setting, including Off or Disabled, brings on the bug.

Here is a video showing the bug in action in an OBS recording of Redout:
https://youtu.be/y5v-PDoVzNo

No Man's Sky was still affected with FXAA enabled. This is a non-native game which uses Vulkan as its primary renderer (when using the beta branch). I am not sure if I own a fully native game which uses Vulkan first.

I don't know if bug 110259 is related to this. That's the only radv issue fixed in subsequent patch notes.

Your help is much appreciated as this is a serious problem for those of us who stream games on Linux. Thank you!
Comment 1 Kon 2019-04-29 01:40:10 UTC
The issue persists after removing the PPA and downgrading to Ubuntu's 18.2.8 packages.

This makes me think the problem lies in some configuration file which was unaffected by the rollback.

I had previous existing footage of all the tested games, so I can confirm this was working fine while I was on 18.3.3 from the PPA.
Comment 2 Samuel Pitoiset 2019-05-09 16:04:36 UTC
Can you reproduce the problem without OBS?
Comment 3 Kon 2019-05-16 15:59:18 UTC
Thanks for getting back to me. The problem seems to occur when using Xcomposite window capture mode.

XShm capture mode renders correctly in both OBS and SimpleScreenRecorder. XShm captures the entire desktop.

I looked around and couldn't find another application that uses Xcomposite capture, so I don't know how to replicate this outside of OBS.

If you have any suggestions for software which capture through Xcomposite, please let me know and I'll test it.

For further clarification on how the bug manifests, this video shows 2D GUI elements completely blacked out in No Man's Sky. A bit different from the other games tested.
https://youtu.be/qquZdH2mAgk
Comment 4 Kon 2019-06-17 04:33:01 UTC
This would appear to be an OBS bug after all. Someone has tracked down the problematic commit.

https://obsproject.com/mantis/view.php?id=1488

There is a workaround as of OBS 23.2. Simply add a Luma Key filter with default settings to the affected Xcomposite source and this should correct the transparency issues.

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.