Screen capture preview disables when OBS Studio is minimized, and can't be re-enabled thereafter without disposing of OBS's configuration directory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
obs-studio (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Bug found on Ubuntu Unity 22.10 on my main laptop. I only have one screen, in case it matters.
Steps to reproduce:
1. Install OBS Studio using apt (sudo apt install obs-studio).
2. Open OBS Studio.
3. Proceed through the initial configuration steps.
4. In the Sources pane, click the "+" button, and add a "Screen Capture (XSHM)" source.
5. Click OK in the popup window, then OK again in the next popup window.
6. Minimize the OBS Studio window.
7. Click the OBS Studio icon in the Launcher to bring it back. The preview will be disabled.
8. Click the "Enable Preview" button.
Expected result: The preview should appear.
Actual result: Nothing seems to happen at all.
Notes: Right-clicking in the preview area and clicking "Enable Preview" in the popup menu also fails to cause the preview to appear. It does, however, make the "Enable Preview" button in the middle of the screen appear "active" (which doesn't happen when you first trigger the bug). However, clicking the button again still doesn't bring the preview back, it just makes the button go inactive.
What's really weird is that closing and re-opening OBS Studio does *not* bring the preview back! I have to run "rm -rf .config/obs-studio" in a terminal, and then open OBS Studio again, then re-add my monitor. Then it works.
Here's the output I get in the terminal if I wipe the OBS Studio config directory, then launch OBS from the terminal and reproduce the bug. The line "info: User added source 'Screen Capture (XSHM)' (xshm_input) to scene 'Scene'" is the last line that appears before the bug triggers. Noticeably, no log output is generated when I trigger the bug, nor does anything appear when I do the other steps with clicking the two "Enable Preview" buttons.
debug: Found portal inhibitor
Attempted path: share/obs/
Attempted path: /usr/share/
Attempted path: share/obs/
Attempted path: /usr/share/
Attempted path: share/obs/
Attempted path: /usr/share/
info: Using EGL/X11
info: CPU Name: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
info: CPU Speed: 3476.697MHz
info: Physical Cores: 4, Logical Cores: 8
info: Physical Memory: 31883MB Total, 18745MB Free
info: Kernel Version: Linux 5.19.0-29-generic
info: Distribution: "Ubuntu" "22.10"
info: Session Type: x11
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1
info: Qt Version: 5.15.6 (runtime), 5.15.6 (compiled)
info: Portable mode: false
qt.svg: Cannot open file '/usr/share/
qt.svg: Cannot open file '/usr/share/
qt.svg: Cannot open file '/usr/share/
qt.svg: Cannot open file '/usr/share/
Attempted path: share/obs/
Attempted path: /usr/share/
QMetaObject:
QMetaObject:
QMetaObject:
info: OBS 28.0.1.11-3 (linux)
info: -------
info: -------
info: audio settings reset:
samples per sec: 48000
speakers: 2
max buffering: 960 milliseconds
buffering type: dynamically increasing
info: -------
info: Initializing OpenGL...
info: Loading up OpenGL on adapter Intel Mesa Intel(R) Xe Graphics (TGL GT2)
info: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 22.2.1, shading language 4.60
info: -------
info: video settings reset:
base resolution: 1920x1080
output resolution: 1280x720
downscale filter: Bicubic
fps: 30/1
format: NV12
YUV mode: Rec. 709/Partial
info: NV12 texture support not available
info: P010 texture support not available
info: Audio monitoring device:
name: Default
id: default
info: -------
warning: Failed to load 'en-US' text for module: 'decklink-
warning: Failed to load 'en-US' text for module: 'decklink-
libDeckLinkAPI.so: cannot open shared object file: No such file or directory
warning: A DeckLink iterator could not be created. The DeckLink drivers may not be installed
warning: Failed to initialize module 'decklink.so'
info: [pipewire] No captures available
info: FFMPEG VAAPI supported
info: [obs-websocket] [obs_module_load] you can haz websockets (Version: 5.0.1 | RPC Version: 1)
info: [obs-websocket] [obs_module_load] Qt version (compile-time): 5.15.6 | Qt version (run-time): 5.15.6
info: [obs-websocket] [obs_module_load] Linked ASIO Version: 102201
info: [obs-websocket] [Config::Load] (FirstLoad) Generating new server password.
info: [obs-websocket] [obs_module_load] Module loaded.
info: [vlc-video]: VLC 3.0.17.4 Vetinari 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-websocket.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-pipewire.so
info: linux-jack.so
info: linux-capture.so
info: linux-alsa.so
info: image-source.so
info: frontend-tools.so
info: decklink-
info: decklink-
info: -------
QLayout: Attempting to add QLayout "" to OBSBasic "OBSBasic", which already has a layout
QWidget:
info: ==== Startup complete =======
info: No scene file found, creating default scene
info: All scene data cleared
info: -------
info: pulse-input: Server name: 'pulseaudio 16.1'
info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.
info: pulse-input: Server name: 'pulseaudio 16.1'
info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_input.
info: Switched to scene 'Scene'
warning: Failed to glob scene collections
warning: [rtmp-services plugin] Successfully updated file 'services.json' (version 216)
warning: [rtmp-services plugin] Successfully updated package (version 216)
Attempted path: share/obs/
Attempted path: /usr/share/
info: xshm-input: Geometry 1920x1080 @ 0,0
info: User added source 'Screen Capture (XSHM)' (xshm_input) to scene 'Scene'
info: ==== Shutting down =======
info: Switched to scene 'Scene'
info: Switched to scene 'Scene'
info: pulse-input: Stopped recording from 'alsa_output.
info: pulse-input: Got 4904 packets with 1086068 frames
info: pulse-input: Stopped recording from 'alsa_input.
info: pulse-input: Got 2706 packets with 1173192 frames
info: All scene data cleared
info: -------
info: [obs-websocket] [obs_module_unload] Shutting down...
info: [obs-websocket] [obs_module_unload] Finished shutting down.
info: [Scripting] Total detached callbacks: 0
info: Freeing OBS context data
warning: 1 views remain at shutdown
info: == Profiler Results =======
info: run_program_init: 454.927 ms
info: ┣OBSApp::AppInit: 12.93 ms
info: ┃ ┗OBSApp:
info: ┗OBSApp::OBSInit: 370.055 ms
info: ┣obs_startup: 0.705 ms
info: ┗OBSBasic::OBSInit: 297.563 ms
info: ┣OBSBasic:
info: ┣OBSBasic:
info: ┣OBSBasic:
info: ┣OBSBasic:
info: ┣OBSBasic:
info: ┣obs_load_
info: ┃ ┣obs_init_
info: ┃ ┣obs_init_
info: ┃ ┣obs_init_
info: ┃ ┣obs_init_
info: ┃ ┣obs_init_
info: ┃ ┣obs_init_
info: ┃ ┣obs_init_
info: ┃ ┣obs_init_
info: ┃ ┣obs_init_
info: ┃ ┣obs_init_
info: ┃ ┣obs_init_
info: ┃ ┣obs_init_
info: ┃ ┃ ┗nvenc_check: 0.315 ms
info: ┃ ┣obs_init_
info: ┃ ┣obs_init_
info: ┃ ┣obs_init_
info: ┃ ┣obs_init_
info: ┃ ┣obs_init_
info: ┃ ┣obs_init_
info: ┃ ┣obs_init_
info: ┃ ┗obs_init_
info: ┣OBSBasic:
info: ┣OBSBasic:
info: ┣OBSBasic:
info: ┣OBSBasic:
info: ┗OBSBasic::Load: 158.332 ms
info: obs_hotkey_
info: audio_thread(
info: obs_graphics_
info: ┣tick_sources: min=0 ms, median=5.987 ms, max=24.285 ms, 99th percentile=12.422 ms
info: ┣output_frame: min=0.019 ms, median=0.224 ms, max=1.116 ms, 99th percentile=0.457 ms
info: ┃ ┗gs_context(
info: ┃ ┣render_video: min=0.014 ms, median=0.122 ms, max=1.008 ms, 99th percentile=0.312 ms
info: ┃ ┃ ┗render_
info: ┃ ┗gs_flush: min=0.003 ms, median=0.083 ms, max=0.455 ms, 99th percentile=0.24 ms
info: ┗render_displays: min=0.001 ms, median=0.006 ms, max=2.973 ms, 99th percentile=2.429 ms
info: =======
info: == Profiler Time Between Calls ==================
info: obs_hotkey_
info: obs_graphics_
info: =======
info: Number of memory leaks: 0
ProblemType: Bug
DistroRelease: Ubuntu 22.10
Package: obs-studio 28.0.1+dfsg1-3
ProcVersionSign
Uname: Linux 5.19.0-29-generic x86_64
ApportVersion: 2.23.1-0ubuntu3
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: Unity:Unity7:ubuntu
Date: Sun Jan 15 19:09:12 2023
InstallationDate: Installed on 2023-01-06 (9 days ago)
InstallationMedia: Ubuntu-Unity 22.10 "Kinetic Kudu" - Release amd64 (20221018)
SourcePackage: obs-studio
UpgradeStatus: No upgrade log present (probably fresh install)