Bug Report artifacts with amgpu-pro + xcomposite

Tietou

New Member
Hi everybody, first post here, and sorry for my bad english :-(

I use ubuntu 18.04 (with new 5.x kernels) with an AMD RX 590 graphic card. I have to use amdgpu-pro drivers in order to run DaVinci Resolve, Blender with GPU computing and Darktable with GPU computing.

But when I install amdgpu-pro drivers, window capture on OBS gets bad:



I tried every possible combinations of the xcomposite options, but the result is always the same.

OBS version is 25.0.7 from official PPA, but it does the same with any other version.

This is what obs says while it attempts to capture a window:
Code:
error: glCopyImageSubData failed, glGetError returned GL_INVALID_OPERATION(0x502)
error: device_copy_texture (GL) failed
and, for some other windows:
Code:
error: xcompcap: no matching fb config found
And this is what OBS says when it starts:
Code:
:~$ obs
Attempted path: share/obs/obs-studio/locale/en-US.ini
Attempted path: /usr/share/obs/obs-studio/locale/en-US.ini
Attempted path: share/obs/obs-studio/locale.ini
Attempted path: /usr/share/obs/obs-studio/locale.ini
Attempted path: share/obs/obs-studio/locale/it-IT.ini
Attempted path: /usr/share/obs/obs-studio/locale/it-IT.ini
info: Using preferred locale 'it-IT'
Attempted path: share/obs/obs-studio/themes/Dark.qss
Attempted path: /usr/share/obs/obs-studio/themes/Dark.qss
info: CPU Name: Intel(R) Core(TM) i5 CPU         760  @ 2.80GHz
info: CPU Speed: 1312.789MHz
info: Physical Cores: 4, Logical Cores: 4
info: Physical Memory: 11977MB Total, 3493MB Free
info: Kernel Version: Linux 5.3.0-46-generic
info: Distribution: "Ubuntu" "18.04"
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.20.5
info: Portable mode: false
Attempted path: share/obs/obs-studio/themes/Dark/no_sources.svg
Attempted path: /usr/share/obs/obs-studio/themes/Dark/no_sources.svg
QMetaObject::connectSlotsByName: No matching signal for on_advAudioProps_clicked()
QMetaObject::connectSlotsByName: No matching signal for on_advAudioProps_destroyed()
QMetaObject::connectSlotsByName: No matching signal for on_actionGridMode_triggered()
QMetaObject::connectSlotsByName: No matching signal for on_program_customContextMenuRequested(QPoint)
info: OBS 25.0.7 (linux)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
    samples per sec: 44100
    speakers:        2
info: ---------------------------------
info: Initializing OpenGL...
info: Loading up OpenGL on adapter ATI Technologies Inc. Radeon RX 590 Series
info: OpenGL loaded successfully, version 3.3.13594 Core Profile Context 20.10, shading language 4.60
info: ---------------------------------
info: video settings reset:
    base resolution:   1920x1080
    output resolution: 1920x1080
    downscale filter:  Bicubic
    fps:               30/1
    format:            NV12
    YUV mode:          601/Partial
info: NV12 texture support not available
info: Audio monitoring device:
    name: Predefinito
    id: default
info: ---------------------------------
warning: Failed to load 'en-US' text for module: 'decklink-ouput-ui.so'
libDeckLinkAPI.so: impossibile aprire il file oggetto condiviso: File o directory non esistente
warning: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
info: No blackmagic support
error: os_dlopen(libnvidia-encode.so.1->libnvidia-encode.so.1): libnvidia-encode.so.1: impossibile aprire il file oggetto condiviso: File o directory non esistente

info: FFMPEG VAAPI supported
info: VLC found, VLC video source enabled
info: ---------------------------------
info:   Loaded Modules:
info:     vlc-video.so
info:     text-freetype2.so
info:     rtmp-services.so
info:     obs-x264.so
info:     obs-transitions.so
info:     obs-outputs.so
info:     obs-libfdk.so
info:     obs-filters.so
info:     obs-ffmpeg.so
info:     linux-v4l2.so
info:     linux-pulseaudio.so
info:     linux-jack.so
info:     linux-decklink.so
info:     linux-capture.so
info:     linux-alsa.so
info:     image-source.so
info:     frontend-tools.so
info:     decklink-ouput-ui.so
info: ---------------------------------
info: ==== Startup complete ===============================================
info: All scene data cleared
info: ------------------------------------------------
info: pulse-input: Server name: 'pulseaudio 11.1'
info: pulse-input: Audio format: s32le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.usb-Focusrite_Scarlett_2i2_USB-00.analog-stereo.monitor'
info: [Loaded global audio device]: 'Audio del desktop'
info: pulse-input: Server name: 'pulseaudio 11.1'
info: pulse-input: Audio format: s32le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_input.usb-Focusrite_Scarlett_2i2_USB-00.analog-stereo'
info: [Loaded global audio device]: 'Microfono/disp. ausiliario'
info: xshm-input: Geometry 1920x1080 @ 0,0
error: xcompcap: no matching fb config found
info: Switched to scene 'Scena'
info: ------------------------------------------------
info: Loaded scenes:
info: - scene 'Scena':
info:     - source: 'Cattura dello schermo (XSHM)' (xshm_input)
info:     - source: 'Cattura la finestra (Xcomposite)' (xcomposite_input)
info: ------------------------------------------------
Attempted path: share/obs/obs-studio/images/overflow.png
Attempted path: /usr/share/obs/obs-studio/images/overflow.png
I install amdgpu-pro 20.10 drivers with these options:
Code:
./amdgpu-pro-install -y --opencl=pal,legacy
If I install only the opencl stack, obs works:
Code:
./amdgpu-pro-install -y --opencl=pal,legacy --headless
In this case obs uses openGL from mesa drivers (amdgpu), not from AMD proprietary ones, and it works.
Also Blender works, being able to use openGL from mesa drivers and opencl from amdgpu-pro ones.
But DaVinci Resolve doesn't run: it says opencl is ok but there's "no Glmap found".

So I'm stuck with it: I can't run DaVinci Resolve capturing its window from OBS. I can only use screen capture, which is bad when I go live and use OBS Studio to switch scenes. Not mentioning the fact that I have to uninstall amdgpu-pro, restart, install amdgpu-pro, restart and vice versa every time I want to use DaVinci or window capture on obs-studio.

I know this is likely more an amdgpu-pro issue than an obs one, but I'd be glad to read what you people think about it and if some of you had the same problems.
 

mys31f

New Member
I actually have the same issue: I use DaVinci Resolve, and I use amdgpu-pro drivers (everything: OpenCL, Vulkan, Mesa, ...).
When I open OBS, it artefacts when I use Xcomposite. Haven't restarted my PC yet, just uninstalled amdgpu-pro, so hopefully I'll update here what happens.

I use Manjaro though.
 

zeptic

New Member
I am having this EXACT same issue running OBS and DaVinci Resolve on the same install. Interestingly enough, the FlatPak version of OBS seems to work fine, but the NDI plugin doesn't seem to work, so it's useless for my use case. I'd also like to point out - running Pop!_os 19.04, both obs and davinci resolve worked perfectly after having installed the opencl drivers from AMD's website manually.
 

Tietou

New Member
Thanks to this thread on ArchLinux Wiki, I was able to find a workaround!

This is how I did on Ubuntu 20.04:

- Download the drivers from AMD site, unpack the file and enter the folder with the terminal.
- Uninstall the previous version:
Code:
amdgpu-pro-uninstall
- Install the drivers in the full version:
Code:
./amdgpu-pro-install --opencl=legacy,pal
- reboot
- Copy the two folders DaVinci needs to start:
Code:
sudo cp -R /opt/amdgpu-pro/lib/x86_64-linux-gnu /opt/amd1
sudo cp -R /usr/lib/x86_64-linux-gnu/dri /opt/amd2
- Uninstall AMD drivers:
Code:
amdgpu-pro-uninstall
- Install the drivers in headless mode:
Code:
./amdgpu-pro-install --opencl=legacy,pal --headless
- reboot

Now, every time I want to to run DaVinci I type:
Code:
LD_LIBRARY_PATH="/opt/amd1" LIBGL_DRIVERS_PATH="/opt/amd2" dri_driver="amdgpu" /opt/resolve/bin/resolve
Done!
I'm so happy, now I don't have to sell my AMD graphic card :-)
 

Tietou

New Member
P.P.S.: Working until kernel 5.4.0-54 (included). Revert to 5.4.0-54 otherwise AMDGPU-Pro won't compile.
 

Tietou

New Member
SOLVED!

AMD just released new drivers (20.50).
- They install on 5.8.x kernels too
- They have to be installed with "opencl=rocr,legacy" instead of "opencl=pal,legacy"
- even if fully installed (without "--headless" option) in order to make DaVinci resolve to start, glx libraries don't cause the artifacts in OBS
 

tharraeth0634

New Member
SOLVED!

AMD just released new drivers (20.50).
- They install on 5.8.x kernels too
- They have to be installed with "opencl=rocr,legacy" instead of "opencl=pal,legacy"
- even if fully installed (without "--headless" option) in order to make DaVinci resolve to start, glx libraries don't cause the artifacts in OBS
Wow, thanks it really help me, i used RX 580 and ubuntu 20.04 and it works perfectly. No more artifacts on the OBS. Thanks!
 
Top