NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.07k stars 14.05k forks source link

OBS-Studio: Stage is transparent under Wayland (sway) #62244

Closed colemickens closed 3 years ago

colemickens commented 5 years ago

Issue description

When using OBS-Studio with Wayland, the stage is transparent instead of visible. This makes using OBS highly impractical. It can be worked around by launching with env QT_QPA_PLATFORM=xcb obs

Steps to reproduce

  1. Make sure you're using Wayland. (It's possible this only repros under Sway.
  2. Make sure qt5.qtwayland is available in your (system) environment.
  3. Open OBS-Studio with the QT Wayland backend.
  4. Observe the other windows or background shining through.

output

Technical details

Please run nix-shell -p nix-info --run "nix-info -m" and paste the results.

colemickens commented 5 years ago

Amusingly, it does still work: https://photos.app.goo.gl/HbpKGF7uaHasQ88y5

colemickens commented 5 years ago

I'm having a heck of a time figuring out what's going on, might just be Qt being weird? Depending on what scale output is, if I have restarted Sway recently, OBS behaves differently and oddly.

For example, right now, I'm opening it with env QT_QPA_PLATFORM=wayland obs and it says as much in the log, yet it's clearly opening in Xwayland and crashes if I call pkill Xwayland. Bizarre.

output

NilsIrl commented 4 years ago

https://github.com/obsproject/obs-studio/pull/2097 might fix it.

stale[bot] commented 4 years ago

Hello, I'm a bot and I thank you in the name of the community for opening this issue.

To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.

The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it.

If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them.

Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel.

freemin7 commented 4 years ago

I am encountering the same problem on Fedora 32. When starting obs in the command line i get this output:

LC_TIME=en_US.utf8 obs
QSocketNotifier: Can only be used with threads started with QThread
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/de-DE.ini
Attempted path: /usr/share/obs/obs-studio/locale/de-DE.ini
info: Using preferred locale 'de-DE'
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-8250U CPU @ 1.60GHz
info: CPU Speed: 3000.053MHz
info: Physical Cores: 4, Logical Cores: 8
info: Physical Memory: 15912MB Total, 2475MB Free
info: Kernel Version: Linux 5.3.11-100.fc29.x86_64
info: Distribution: Fedora 32
info: Window System: X11.0 - vendor string: Fedora Project - vendor release: 12008000
info: Portable mode: false
qt.svg: Cannot open file '/usr/share/obs/obs-studio/themes/Dark/Close.svg', because: No such file or directory
qt.svg: Cannot open file '/usr/share/obs/obs-studio/themes/Dark/Close.svg', because: No such file or directory
qt.svg: Cannot open file '/usr/share/obs/obs-studio/themes/Dark/Popout.svg', because: No such file or directory
qt.svg: Cannot open file '/usr/share/obs/obs-studio/themes/Dark/Popout.svg', because: No such file or directory
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.8 (linux)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
    samples per sec: 44100
    speakers:        2
info: ---------------------------------
info: Initializing OpenGL...
info: Loading up OpenGL on adapter Intel Mesa Intel(R) UHD Graphics 620 (KBL GT2)
info: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 20.1.3, shading language 4.60
info: ---------------------------------
info: video settings reset:
    base resolution:   1280x720
    output resolution: 1280x720
    downscale filter:  Bilinear
    fps:               30/1
    format:            NV12
    YUV mode:          601/Partial
info: NV12 texture support not available
info: Audio monitoring device:
    name: Standard
    id: default
info: ---------------------------------
warning: Failed to load 'en-US' text for module: 'decklink-ouput-ui.so'
libDeckLinkAPI.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
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: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden

info: FFMPEG VAAPI supported
error: os_dlopen(libvlc.so.5->libvlc.so.5): libvlc.so.5: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden

info: Couldn't find VLC installation, VLC video source disabled
info: ---------------------------------
info:   Loaded Modules:
info:     libobs-linuxbrowser.so
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-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 13.99.1-rebootstrapped'
info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.pci-0000_00_1f.3.analog-stereo.monitor'
info: [Loaded global audio device]: 'Desktop-Audio'
info: pulse-input: Server name: 'pulseaudio 13.99.1-rebootstrapped'
info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_input.pci-0000_00_1f.3.analog-stereo'
info: [Loaded global audio device]: 'Mic/Aux'
info:     - filter: 'Rauschunterdrückung' (noise_suppress_filter)
info: adding 46 milliseconds of audio buffering, total audio buffering is now 46 milliseconds (source: Mic/Aux)

info: xshm-input: Geometry 1920x1080 @ 0,0
info: Switched to scene 'Text+Draw'
info: ------------------------------------------------
info: Loaded scenes:
info: - scene 'Szene':
info:     - source: 'Bild' (image_source)
info:     - source: 'Logo' (image_source)
info:     - source: 'Fensteraufnahme (Xcomposite) 2' (xcomposite_input)
info:     - source: 'Fensteraufnahme (Xcomposite)' (xcomposite_input)
info:     - source: 'Text (FreeType 2)' (text_ft2_source)
info:     - source: 'Text (FreeType 2) 2' (text_ft2_source)
info: - scene 'Szene 2':
info:     - source: 'Bild 2' (image_source)
info:     - source: 'Fensteraufnahme (Xcomposite) 3' (xcomposite_input)
info: - scene 'Browser1':
info:     - source: 'Firefox' (xcomposite_input)
info: - scene 'Text+Draw':
info:     - source: 'Bild 3' (image_source)
info:     - source: 'Fensteraufnahme (Xcomposite) 4' (xcomposite_input)
info:     - source: 'Fensteraufnahme (Xcomposite) 5' (xcomposite_input)
info:     - source: 'Fensteraufnahme (Xcomposite) 6' (xcomposite_input)
info: - scene 'Szene 3':
info:     - source: 'Bild 4' (image_source)
info:     - source: 'Fensteraufnahme (Xcomposite) 7' (xcomposite_input)
info:     - source: 'Text (FreeType 2) 3' (text_ft2_source)
info: - scene 'Fullscreen Clock':
info:     - source: 'Clock' (xcomposite_input)
info:     - source: 'Bildschirmaufnahme (XSHM)' (xshm_input)
info: - scene 'Window cut from all sides':
info:     - source: 'Fensteraufnahme (Xcomposite) 8' (xcomposite_input)
info: - scene 'Szene 6':
info:     - source: 'Bild 4' (image_source)
info:     - source: 'Fensteraufnahme (Xcomposite) 12' (xcomposite_input)
info:     - source: 'Fensteraufnahme (Xcomposite) 10' (xcomposite_input)
info:     - source: 'Fensteraufnahme (Xcomposite) 11' (xcomposite_input)
info:     - source: 'Fensteraufnahme (Xcomposite) 9' (xcomposite_input)
info:     - source: 'Clock' (xcomposite_input)
info: - scene 'Game':
info:     - source: 'ParticleGame' (xcomposite_input)
info: - scene 'scrr':
info:     - source: 'Farbquelle' (color_source_v2)
info: ------------------------------------------------
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
error: Failed to fetch parent window geometry!
error: gl_platform_init_swapchain  failed
error: obs_display_init: Failed to create swap chain
info: User switched to scene 'Window cut from all sides'
info: ==== Shutting down ==================================================
info: Switched to scene '(null)'
info: pulse-input: Stopped recording from 'alsa_output.pci-0000_00_1f.3.analog-stereo.monitor'
info: pulse-input: Got 2310 packets with 466785 frames
info: pulse-input: Stopped recording from 'alsa_input.pci-0000_00_1f.3.analog-stereo'
info: pulse-input: Got 1079 packets with 469376 frames
info: All scene data cleared
info: ------------------------------------------------
info: Freeing OBS context data
info: [Scripting] Total detached callbacks: 0
info: == Profiler Results =============================
info: run_program_init: 2694,58 ms
info:  ┣OBSApp::AppInit: 2,364 ms
info:  ┃ ┗OBSApp::InitLocale: 1,289 ms
info:  ┗OBSApp::OBSInit: 2495,98 ms
info:    ┣obs_startup: 14,147 ms
info:    ┗OBSBasic::OBSInit: 2309,95 ms
info:      ┣OBSBasic::InitBasicConfig: 0,107 ms
info:      ┣OBSBasic::ResetAudio: 0,182 ms
info:      ┣OBSBasic::ResetVideo: 68,404 ms
info:      ┣OBSBasic::InitOBSCallbacks: 0,003 ms
info:      ┣OBSBasic::InitHotkeys: 0,031 ms
info:      ┣obs_load_all_modules: 119,39 ms
info:      ┃ ┣obs_init_module(decklink-ouput-ui.so): 0,553 ms
info:      ┃ ┣obs_init_module(frontend-tools.so): 71,728 ms
info:      ┃ ┣obs_init_module(image-source.so): 0,005 ms
info:      ┃ ┣obs_init_module(linux-alsa.so): 0,001 ms
info:      ┃ ┣obs_init_module(linux-capture.so): 0,373 ms
info:      ┃ ┣obs_init_module(linux-decklink.so): 0,178 ms
info:      ┃ ┣obs_init_module(linux-jack.so): 0,001 ms
info:      ┃ ┣obs_init_module(linux-pulseaudio.so): 0,001 ms
info:      ┃ ┣obs_init_module(linux-v4l2.so): 0,002 ms
info:      ┃ ┣obs_init_module(obs-ffmpeg.so): 0,436 ms
info:      ┃ ┃ ┗nvenc_check: 0,418 ms
info:      ┃ ┣obs_init_module(obs-filters.so): 0,015 ms
info:      ┃ ┣obs_init_module(obs-outputs.so): 0,002 ms
info:      ┃ ┣obs_init_module(obs-transitions.so): 0,005 ms
info:      ┃ ┣obs_init_module(obs-x264.so): 0,001 ms
info:      ┃ ┣obs_init_module(rtmp-services.so): 0,403 ms
info:      ┃ ┣obs_init_module(text-freetype2.so): 0,012 ms
info:      ┃ ┣obs_init_module(vlc-video.so): 0,281 ms
info:      ┃ ┗obs_init_module(libobs-linuxbrowser.so): 0,004 ms
info:      ┣OBSBasic::ResetOutputs: 0,115 ms
info:      ┣OBSBasic::CreateHotkeys: 0,195 ms
info:      ┣OBSBasic::InitService: 1,158 ms
info:      ┣OBSBasic::InitPrimitives: 0,198 ms
info:      ┗OBSBasic::Load: 2068,76 ms
info: obs_hotkey_thread(25 ms): min=0,087 ms, median=0,61 ms, max=1,131 ms, 99th percentile=0,987 ms, 100% below 25 ms
info: audio_thread(Audio): min=0,011 ms, median=0,201 ms, max=0,73 ms, 99th percentile=0,347 ms
info: obs_graphics_thread(33,3333 ms): min=0,051 ms, median=0,978 ms, max=1982,86 ms, 99th percentile=11,181 ms, 99,2565% below 33,333 ms
info:  ┣tick_sources: min=0 ms, median=0,517 ms, max=1982,32 ms, 99th percentile=2,537 ms
info:  ┣output_frame: min=0,024 ms, median=0,357 ms, max=39,979 ms, 99th percentile=3,375 ms
info:  ┃ ┗gs_context(video->graphics): min=0,024 ms, median=0,357 ms, max=39,978 ms, 99th percentile=3,375 ms
info:  ┃   ┣render_video: min=0,02 ms, median=0,219 ms, max=0,569 ms, 99th percentile=0,56 ms
info:  ┃   ┃ ┗render_main_texture: min=0,016 ms, median=0,209 ms, max=0,558 ms, 99th percentile=0,549 ms
info:  ┃   ┗gs_flush: min=0 ms, median=0,084 ms, max=39,842 ms, 99th percentile=2,984 ms
info:  ┗render_displays: min=0,002 ms, median=0,014 ms, max=0,373 ms, 99th percentile=0,032 ms
info: =================================================
info: == Profiler Time Between Calls ==================
info: obs_hotkey_thread(25 ms): min=25,14 ms, median=25,74 ms, max=26,239 ms, 23,6111% within ±2% of 25 ms (0% lower, 76,3889% higher)
info: obs_graphics_thread(33,3333 ms): min=17,13 ms, median=33,333 ms, max=1982,86 ms, 98,5075% within ±2% of 33,333 ms (0,746269% lower, 0,746269% higher)
info: =================================================
info: Number of memory leaks: 0
NilsIrl commented 4 years ago

This issue should be closed, this is an OBS problem: https://github.com/obsproject/obs-studio/pull/2484

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

primeos commented 3 years ago

This issue should be closed, this is an OBS problem: obsproject/obs-studio#2484

Thanks, closing this then.