OBS cannot record screen on AMD

LinXiaoDe

New Member
environment
computer:Lenovo Yoga 14s
OS: Arch Linux x86_64
CPU: AMD Ryzen 7 4800H with Radeo
GPU: AMD ATI 03:00.0 Renoir

problem
When I use OBS capture screen, OBS can get the sound normally, but it can't get the screen. So the result of the recording is a black screen. I start up OBS in konsole, and the information is as follow:

Bash:
$ obs
Icon theme "gnome" not found.
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/zh-CN.ini
Attempted path: /usr/share/obs/obs-studio/locale/zh-CN.ini
info: Using preferred locale 'zh-CN'
Attempted path: share/obs/obs-studio/themes/Dark.qss
Attempted path: /usr/share/obs/obs-studio/themes/Dark.qss
info: CPU Name: AMD Ryzen 7 4800H with Radeon Graphics
info: CPU Speed: 1411.276MHz
info: Physical Cores: 8, Logical Cores: 16
info: Physical Memory: 15425MB Total, 10406MB Free
info: Kernel Version: Linux 5.10.9-arch1-1
info: Distribution: "Arch Linux" Unknown
info: Session Type: wayland
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.20.99
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)
QMetaObject::connectSlotsByName: No matching signal for on_transitionRemove_clicked()
info: OBS 26.1.2.r84.gb460f025e (linux)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
        samples per sec: 48000
        speakers:        2
info: ---------------------------------
info: Initializing OpenGL...
info: Loading up OpenGL on adapter AMD AMD RENOIR (DRM 3.40.0, 5.10.9-arch1-1, LLVM 11.0.1)
info: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 20.3.3, shading language 4.60
info: ---------------------------------
info: video settings reset:
        base resolution:   2880x1800
        output resolution: 2880x1800
        downscale filter:  Bicubic
        fps:               30/1
        format:            RGBA
        YUV mode:          None
info: GPU conversion not available for format: 6
info: NV12 texture support not available
info: Audio monitoring device:
        name: 默认
        id: default
info: ---------------------------------
warning: Failed to load 'en-US' text for module: 'decklink-captions.so'
warning: Failed to load 'en-US' text for module: 'decklink-ouput-ui.so'
error: os_dlopen(/usr//lib/obs-plugins/frontend-tools.so->/usr//lib/obs-plugins/frontend-tools.so): libluajit-5.1.so.2: 无法打开共享对象文件: 没有那个文件或目录

warning: Module '/usr//lib/obs-plugins/frontend-tools.so' not loaded
libDeckLinkAPI.so: 无法打开共享对象文件: 没有那个文件或目录
warning: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
info: No blackmagic support
warning: v4l2loopback not installed, virtual camera disabled
info: [obs-browser]: Version 2.12.0
info: [obs-browser]: CEF Version 75.1.14+gc81164e+chromium-75.0.3770.100
error: os_dlopen(libnvidia-encode.so.1->libnvidia-encode.so.1): libnvidia-encode.so.1: 无法打开共享对象文件: 没有那个文件或目录

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:     obs-browser.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:     decklink-ouput-ui.so
info:     decklink-captions.so
info: ---------------------------------
error: os_dlopen(../obs-plugins/obs-browser->../obs-plugins/obs-browser.so): ../obs-plugins/obs-browser.so: 无法打开共享对象文件: 没有那个文件或目录

info: ==== Startup complete ===============================================
info: All scene data cleared
info: ------------------------------------------------
info: pulse-input: Server name: 'pulseaudio 14.2'
info: pulse-input: Audio format: s16le, 48000 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.pci-0000_03_00.6.analog-stereo.monitor'
info: [Loaded global audio device]: '桌面音频'
info: pulse-input: Server name: 'pulseaudio 14.2'
info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_input.pci-0000_03_00.6.analog-stereo'
info: [Loaded global audio device]: '麦克风/Aux'
info: xshm-input: Geometry 2880x1800 @ 0,0
info: Switched to scene '场景 2'
info: ------------------------------------------------
info: Loaded scenes:
info: - scene '场景':
info: - scene 'scence1':
info:     - source: '窗口采集 (Xcomposite)' (xcomposite_input)
info: - scene '场景 2':
info:     - source: '屏幕采集 (XSHM)' (xshm_input)
info: ------------------------------------------------
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
error: Failed to fetch parent window geometry!
error: gl_platform_init_swapchain  failed
error: obs_display_init: Failed to create swap chain
error: Failed to fetch parent window geometry!
error: gl_platform_init_swapchain  failed
error: obs_display_init: Failed to create swap chain
error: Failed to fetch parent window geometry!
error: gl_platform_init_swapchain  failed
error: obs_display_init: Failed to create swap chain
info: ---------------------------------
info: [x264 encoder: 'simple_h264_recording'] preset: veryfast
info: [x264 encoder: 'simple_h264_recording'] profile: high
info: [x264 encoder: 'simple_h264_recording'] settings:
        rate_control: CRF
        bitrate:      0
        buffer size:  0
        crf:          23
        fps_num:      30
        fps_den:      1
        width:        2880
        height:       1800
        keyint:       250

info: libfdk_aac encoder created
info: libfdk_aac bitrate: 192, channels: 2
info: ==== Recording Start ===============================================
info: [ffmpeg muxer: 'simple_file_output'] Writing file '/home/qdl/Videos/2021-01-24_19-28-46.mp4'...
info: Output format name and long_name: mp4, MP4 (MPEG-4 Part 14)
info: [ffmpeg muxer: 'simple_file_output'] Output of file '/home/qdl/Videos/2021-01-24_19-28-46.mp4' stopped
info: Output 'simple_file_output': stopping
info: Output 'simple_file_output': Total frames output: 110
info: Output 'simple_file_output': Total drawn frames: 155 (156 attempted)
info: Output 'simple_file_output': Number of lagged frames due to rendering lag/stalls: 1 (0.6%)
info: ==== Recording Stop ================================================
info: Video stopped, number of skipped frames due to encoding lag: 32/155 (20.6%)
info: libfdk_aac encoder destroyed
error: Failed to fetch parent window geometry!
error: gl_platform_init_swapchain  failed
error: obs_display_init: Failed to create swap chain


How can I solve this problem that has been bothering me for a long time? Thank you in advance!
 
Top