obsproject / obs-studio

OBS Studio - Free and open source software for live streaming and screen recording
https://obsproject.com
GNU General Public License v2.0
60.34k stars 7.99k forks source link

Display Capture says "No properties available" after quitting and reopening it #4011

Closed shaawh closed 1 month ago

shaawh commented 3 years ago

Platform

Operating system and version: macOS Big Sur 11.1 OBS Studio version: 26.1.0 (64-bit)

Expected Behavior

What should happen is when you close and reopen OBS, everything should've stayed the same and you start the stream/recording without any problems

Current Behavior

When closing OBS and reopening it, the display capture turns black and says "device not connected or not available". OBS has permission to record the screen and this only happens when closing and reopening the app. I have to add the display capture again every time I open OBS. 2021-01-03 19-45-30.txt

Steps to Reproduce

1.Screen Shot 2021-01-03 at 8 01 47 PM 2.Screen Shot 2021-01-03 at 8 02 35 PM 3. 4.

Additional information

heckseven commented 3 years ago

I also ran into this. When starting OBS, the Display Capture fails and shows a black screen. If I add a new Display Capture, it works as expected until I close and reopen OBS. It seems others are https://obsproject.com/forum/threads/macos-bigsur-beta-20b5022a-display-capture-always-stops-working-after-restarting-obs-and-must-be-readded.133391/.

Platform

Operating system and version: macOS Big Sur 11.1 OBS Studio version: 26.1.2

Expected Behavior

When I open OBS, the Display Capture should capture the display.

Current Behavior

When I open OBS, the Display Capture is black and reports the device is not connected.

image

When I remove and re-add the Display Capture, it works as expected. Until I close and reopen OBS.

Current log:

21:20:17.261: CPU Name: Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
21:20:17.261: CPU Speed: 2400MHz
21:20:17.261: Physical Cores: 8, Logical Cores: 16
21:20:17.261: Physical Memory: 32768MB Total
21:20:17.261: OS Name: Mac OS X (NSMACHOperatingSystem)
21:20:17.261: OS Version: Version 11.1 (Build 20C69)
21:20:17.261: Kernel Version: 20.2.0
21:20:17.271: hotkeys-cocoa: Using layout 'com.apple.keylayout.US'
21:20:17.272: Current Date/Time: 2021-01-11, 21:20:17
21:20:17.272: Browser Hardware Acceleration: true
21:20:17.272: Portable mode: false
21:20:17.358: OBS 26.1.2 (mac)
21:20:17.358: ---------------------------------
21:20:17.359: ---------------------------------
21:20:17.359: audio settings reset:
21:20:17.359:   samples per sec: 44100
21:20:17.359:   speakers:        2
21:20:17.360: ---------------------------------
21:20:17.360: Initializing OpenGL...
21:20:18.873: Loading up OpenGL on adapter ATI Technologies Inc. AMD Radeon Pro 5500M OpenGL Engine
21:20:18.873: OpenGL loaded successfully, version 4.1 ATI-4.2.13, shading language 4.10
21:20:18.944: ---------------------------------
21:20:18.944: video settings reset:
21:20:18.944:   base resolution:   1920x1080
21:20:18.944:   output resolution: 1920x1080
21:20:18.944:   downscale filter:  Bicubic
21:20:18.944:   fps:               30/1
21:20:18.944:   format:            NV12
21:20:18.944:   YUV mode:          709/Partial
21:20:18.945: NV12 texture support not available
21:20:18.945: Audio monitoring device:
21:20:18.945:   name: Default
21:20:18.945:   id: default
21:20:18.945: ---------------------------------
21:20:18.947: Failed to load 'en-US' text for module: 'decklink-captions.so'
21:20:18.948: Failed to load 'en-US' text for module: 'decklink-ouput-ui.so'
21:20:19.028: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
21:20:19.028: No blackmagic support
21:20:19.031: [mac-virtualcam] version=1.3.0
21:20:19.100: [VideoToolbox encoder]: Adding VideoToolbox H264 encoders
21:20:19.103: [obs-browser]: Version 2.10.0
21:20:19.103: [obs-browser]: CEF Version 85.0.0-HEAD.2273+g93b66a0+chromium-85.0.4183.121
21:20:19.132: VLC found, VLC video source enabled
21:20:19.133: Failed to load 'en-US' text for module: 'obs-mac-virtualcam.so'
21:20:19.133: [obs-mac-virtualcam] version=1.2.1
21:20:19.134: obs_register_output: Output id 'virtualcam_output' already exists!  Duplicate library?
21:20:19.135: [obs-ndi] hello ! (version 4.9.0)
21:20:19.135: [obs-ndi] Trying ''
21:20:19.135: [obs-ndi] Trying '/usr/lib'
21:20:19.135: [obs-ndi] Trying '/usr/local/lib'
21:20:19.135: [obs-ndi] Found NDI library at '/usr/local/lib/libndi.4.dylib'
21:20:19.136: [obs-ndi] NDI runtime loaded successfully
21:20:19.137: [obs-ndi] NDI library initialized successfully (NDI SDK APPLE 11:50:41 Apr  1 2020 4.5.1)
21:20:19.138: ---------------------------------
21:20:19.138:   Loaded Modules:
21:20:19.138:     obs-ndi.so
21:20:19.138:     obs-mac-virtualcam.so
21:20:19.138:     vlc-video.so
21:20:19.138:     text-freetype2.so
21:20:19.139:     rtmp-services.so
21:20:19.139:     obs-x264.so
21:20:19.139:     obs-vst.so
21:20:19.139:     obs-transitions.so
21:20:19.139:     obs-outputs.so
21:20:19.139:     obs-filters.so
21:20:19.139:     obs-ffmpeg.so
21:20:19.139:     obs-browser.so
21:20:19.139:     mac-vth264.so
21:20:19.139:     mac-virtualcam.so
21:20:19.139:     mac-syphon.so
21:20:19.139:     mac-decklink.so
21:20:19.139:     mac-capture.so
21:20:19.139:     mac-avcapture.so
21:20:19.139:     image-source.so
21:20:19.139:     frontend-tools.so
21:20:19.139:     decklink-ouput-ui.so
21:20:19.139:     decklink-captions.so
21:20:19.139:     coreaudio-encoder.so
21:20:19.139: ---------------------------------
21:20:19.139: os_dlopen(../obs-plugins/obs-browser->../obs-plugins/obs-browser.so): dlopen(../obs-plugins/obs-browser.so, 257): image not found
21:20:19.139: 
21:20:19.139: ==== Startup complete ===============================================
21:20:19.156: All scene data cleared
21:20:19.156: ------------------------------------------------
21:20:19.290: coreaudio: device 'MacBook Pro Microphone' initialized
21:20:19.290: [Loaded global audio device]: 'Mic/Aux'
21:20:19.301: coreaudio: device 'Loopback' initialized
21:20:19.330: adding 23 milliseconds of audio buffering, total audio buffering is now 23 milliseconds (source: Loopback)
21:20:19.330: 
21:20:19.347: MBP camera: Selected device 'FaceTime HD Camera (Built-in)'
21:20:19.350: MBP camera: Using preset 1280x720
21:20:19.419: coreaudio: failed to find device uid: AppleUSBAudioEngine:Blackmagic Design:Blackmagic Design:d9b85d1350bf49e798af0e44908eace8:7, waiting for connection
21:20:19.420: ATEM video: Could not initialize device with unique ID '0x144000001edbbe49'
21:20:19.420: C920 video: Could not initialize device with unique ID '0x14344000046d0892'
21:20:19.423: coreaudio: failed to find device uid: AppleUSBAudioEngine:Unknown Manufacturer:HD Pro Webcam C920:371593EF:3, waiting for connection
21:20:19.427: coreaudio: device 'MacBook Pro Microphone' initialized
21:20:19.448: Failed to create source 'Display Capture'!
21:20:19.448: Switched to scene 'desktop'
21:20:19.449: ------------------------------------------------
21:20:19.449: Loaded scenes:
21:20:19.449: - scene 'ATEM':
21:20:19.449:     - source: 'ATEM video' (av_capture_input)
21:20:19.449:     - source: 'ATEM audio' (coreaudio_input_capture)
21:20:19.449: - scene 'ATEM && heckseven':
21:20:19.449:     - source: 'ATEM video' (av_capture_input)
21:20:19.449:     - source: 'ATEM audio' (coreaudio_input_capture)
21:20:19.449:     - source: 'HECKSPLASH' (image_source)
21:20:19.449: - scene 'PERFORMANCE':
21:20:19.449:     - source: 'ATEM video' (av_capture_input)
21:20:19.449:     - source: 'C920 video' (av_capture_input)
21:20:19.449:         - filter: 'Color Correction' (color_filter)
21:20:19.449:     - source: 'MBP camera' (av_capture_input)
21:20:19.449:     - source: 'ATEM audio' (coreaudio_input_capture)
21:20:19.449:     - source: 'HECKSPLASH' (image_source)
21:20:19.449:     - source: 'ems-logo' (image_source)
21:20:19.449:     - source: 'ems-logo-dark' (image_source)
21:20:19.449:     - source: 'hecktube' (image_source)
21:20:19.449: - scene '---------------':
21:20:19.449: - scene 'webcam_mic':
21:20:19.449:     - source: 'MBP camera' (av_capture_input)
21:20:19.449:     - source: 'MBP mic' (coreaudio_input_capture)
21:20:19.449: - scene 'ATEM && webcam':
21:20:19.449:     - source: 'ATEM video' (av_capture_input)
21:20:19.449:     - source: 'ATEM audio' (coreaudio_input_capture)
21:20:19.449:     - source: 'MBP camera' (av_capture_input)
21:20:19.449: - scene 'C920_mic':
21:20:19.449:     - source: 'C920 video' (av_capture_input)
21:20:19.449:         - filter: 'Color Correction' (color_filter)
21:20:19.449:     - source: 'C920 audio' (coreaudio_input_capture)
21:20:19.449:     - source: 'ems-logo-dark 2' (image_source)
21:20:19.449:     - source: 'hecktube 2' (image_source)
21:20:19.449: - scene 'C920_mic  && webcam':
21:20:19.449:     - source: 'C920 video' (av_capture_input)
21:20:19.449:         - filter: 'Color Correction' (color_filter)
21:20:19.449:     - source: 'MBP camera' (av_capture_input)
21:20:19.449:     - source: 'C920 audio' (coreaudio_input_capture)
21:20:19.449:     - source: 'ems-logo-dark 2' (image_source)
21:20:19.449:     - source: 'hecktube' (image_source)
21:20:19.449: - scene '----------------':
21:20:19.449: - scene 'desktop':
21:20:19.449:     - source: 'C920 video' (av_capture_input)
21:20:19.449:         - filter: 'Color Correction' (color_filter)
21:20:19.449:     - source: 'Display Capture' (display_capture)
21:20:19.449:     - source: 'Loopback' (coreaudio_input_capture)
21:20:19.449:     - source: 'C920 audio' (coreaudio_input_capture)
21:20:19.449: ------------------------------------------------

Steps to Reproduce

I'm not confident in the steps to reproduce, but I will elaborate on my setup. I have installed:

Gol-D-Ace commented 3 years ago

Have seen 2 other people on Discord with the same issue as well. So this isn't an isolated case

WizardCM commented 3 years ago

This particular issue is likely tied to the permission verification code, originally introduced for macOS 10.15 where OBS has to ask the user to be able to capture the display.

kalmufti commented 3 years ago

I have the same issue. I'm on macOS Big Sur Version 11.2.

sepsol commented 3 years ago

Same issue here on MacOS BigSur 11.2.1

image

asher-the-thrasher commented 3 years ago

I just had this happen as well, after adding the mac permissions, a restart fixed the issue.

ECOMMREV commented 3 years ago

OBS-permissions

System Preferences-> Security & Privacy -> OBS If OBS is not showing in the list, click the PLUS icon and add it from your applications folder. Make sure it is checked and then close. Reopen OBS. Permissions fixed.

kalmufti commented 3 years ago

@ECOMMREV, already done that, pretty sure other people did that too, still no luck. Now on the other hand Streamlabs OBS works just fine so I've since switched to it.

penlix commented 3 years ago

Same issue with me. Privacy and Settings is set correctly.

PEZ commented 3 years ago

Same here. It worked yesterday then all of a sudden this with device not connected....

PEZ commented 3 years ago

I recorded a log with Console.app when starting OBS. No idea if you can see anything there that gives any clues: https://gist.github.com/PEZ/3f5d3ebf7212598b292b1a1e2ecfc75b

PEZ commented 3 years ago

Streamlabs OBS works just fine

Indeed. Thanks for sharing that!

fxck commented 3 years ago

Is streamlabs something build on top of OBS? Or how is it going to help?

fxck commented 3 years ago

Anyway I started having this problem after the big sur update, it was working fine previously. Screen recording permissions set, working fine after adding the display capture, doesn't work after restart.

technodrome commented 3 years ago

+1 here, same problem as others. After restart, configured display shows black, no properties available. OBS has all permissions it needs.

raarts commented 3 years ago

Yes, having the same problem. Today I tried to use OBS for the first time since some months, and the problem suddenly showed up. Reinstalled OBS, no difference. Re-applied security settings, no dice.

Relevant Log output:

22:26:08.817: ==== Startup complete ===============================================
22:26:08.839: All scene data cleared
22:26:08.839: ------------------------------------------------
22:26:08.871: Failed to create source 'LapTop LCD'!
22:26:09.554: coreaudio: device 'Built-in Microphone' initialized
22:26:09.568: WebCam: Selected device 'FaceTime HD Camera (Built-in)'
22:26:09.575: WebCam: Using preset 1280x720
sabinbajracharya commented 3 years ago

Had this problem since the first update to Mac Big Sur. Below is the log.

One thing I noticed is the problem is only for Display capture but not for window capture.

08:12:32.209: CPU Name: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
08:12:32.209: CPU Speed: 2800MHz
08:12:32.209: Physical Cores: 4, Logical Cores: 8
08:12:32.209: Physical Memory: 16384MB Total
08:12:32.209: OS Name: Mac OS X
08:12:32.209: OS Version: Version 11.4 (Build 20F71)
08:12:32.209: Kernel Version: 20.5.0
08:12:32.215: hotkeys-cocoa: Getting keyboard keys failed
08:12:32.215: hotkeys-cocoa: Getting keyboard keys failed
08:12:32.215: hotkeys-cocoa: Using layout 'com.apple.keylayout.ABC'
08:12:32.215: Current Date/Time: 2021-06-02, 08:12:32
08:12:32.216: Browser Hardware Acceleration: true
08:12:32.216: Portable mode: false
08:12:32.338: OBS 27.0.0 (mac)
08:12:32.339: ---------------------------------
08:12:32.340: ---------------------------------
08:12:32.340: audio settings reset:
08:12:32.340:   samples per sec: 48000
08:12:32.340:   speakers:        2
08:12:32.341: ---------------------------------
08:12:32.341: Initializing OpenGL...
08:12:33.274: Loading up OpenGL on adapter ATI Technologies Inc. AMD Radeon Pro 555 OpenGL Engine
08:12:33.274: OpenGL loaded successfully, version 4.1 ATI-4.5.14, shading language 4.10
08:12:33.403: ---------------------------------
08:12:33.403: video settings reset:
08:12:33.403:   base resolution:   1920x1080
08:12:33.403:   output resolution: 1920x1080
08:12:33.403:   downscale filter:  Bilinear
08:12:33.403:   fps:               30/1
08:12:33.403:   format:            NV12
08:12:33.403:   YUV mode:          709/Partial
08:12:33.403: NV12 texture support not available
08:12:33.403: Audio monitoring device:
08:12:33.403:   name: Default
08:12:33.403:   id: default
08:12:33.403: ---------------------------------
08:12:33.406: Failed to load 'en-US' text for module: 'decklink-captions.so'
08:12:33.407: Failed to load 'en-US' text for module: 'decklink-ouput-ui.so'
08:12:33.415: os_dlopen(libpython3.9.dylib->libpython3.9.dylib): dlopen(libpython3.9.dylib, 257): image not found
08:12:33.415: 
08:12:33.415: [Python] Could not load library: libpython3.9.dylib
08:12:33.554: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
08:12:33.555: No blackmagic support
08:12:33.557: [mac-virtualcam] version=1.3.0
08:12:33.640: [VideoToolbox encoder]: Adding VideoToolbox H264 encoders
08:12:33.645: [obs-browser]: Version 2.14.3
08:12:33.645: [obs-browser]: CEF Version 85.0.0-HEAD.2273+g93b66a0+chromium-85.0.4183.121
08:12:33.699: VLC found, VLC video source enabled
08:12:33.700: Ignoring old obs-browser.so version
08:12:33.700: ---------------------------------
08:12:33.700:   Loaded Modules:
08:12:33.700:     vlc-video.so
08:12:33.700:     text-freetype2.so
08:12:33.700:     rtmp-services.so
08:12:33.700:     obs-x264.so
08:12:33.700:     obs-vst.so
08:12:33.700:     obs-transitions.so
08:12:33.700:     obs-outputs.so
08:12:33.700:     obs-filters.so
08:12:33.700:     obs-ffmpeg.so
08:12:33.700:     obs-browser.so
08:12:33.700:     mac-vth264.so
08:12:33.700:     mac-virtualcam.so
08:12:33.700:     mac-syphon.so
08:12:33.700:     mac-decklink.so
08:12:33.700:     mac-capture.so
08:12:33.700:     mac-avcapture.so
08:12:33.700:     image-source.so
08:12:33.700:     frontend-tools.so
08:12:33.700:     decklink-ouput-ui.so
08:12:33.700:     decklink-captions.so
08:12:33.700:     coreaudio-encoder.so
08:12:33.700: ---------------------------------
08:12:33.700: ==== Startup complete ===============================================
08:12:33.720: All scene data cleared
08:12:33.720: ------------------------------------------------
08:12:34.171: coreaudio: device 'Soundflower (2ch)' initialized
08:12:34.172: [Loaded global audio device]: 'Mic/Aux'
08:12:34.172:     - filter: 'Gain' (gain_filter)
08:12:34.178: Failed to create source 'Display Capture'!
08:12:34.179: Switched to scene 'Scene 1'
08:12:34.179: ------------------------------------------------
08:12:34.179: Loaded scenes:
08:12:34.179: - scene 'Scene 1':
08:12:34.179:     - source: 'Display Capture' (display_capture)
08:12:34.179: ------------------------------------------------
08:12:34.211: adding 42 milliseconds of audio buffering, total audio buffering is now 42 milliseconds (source: Mic/Aux)
08:12:34.211: 

08:12:34.178: Failed to create source 'Display Capture'!

AlbertVeli commented 3 years ago

I got the same issue in Big Sur and fixed it by removing and re-adding OBS in System Preferences.

System Preferences -> Security & Privacy, Privacy tab. Then I selected Screen Recording in the left menu. To make changes I clicked on the lock and entered my password. Then I selected OBS and clicked on the - button to remove it. Then I clicked the + button and selected Applications -> OBS to re-add it. Then restarted OBS. Now the Display Capture works.

technodrome commented 3 years ago

I got the same issue in Big Sur and fixed it by removing and re-adding OBS in System Preferences.

System Preferences -> Security & Privacy, Privacy tab. Then I selected Screen Recording in the left menu. To make changes I clicked on the lock and entered my password. Then I selected OBS and clicked on the - button to remove it. Then I clicked the + button and selected Applications -> OBS to re-add it. Then restarted OBS. Now the Display Capture works.

Doesn't work on OBS 27.0.1, Big Sur 11.2.3. Even after removing/re-adding it several times, the problem still persists.

RytoEX commented 3 years ago

I'm unable to reproduce this with OBS 27.0.1 on macOS 11.4. I thought perhaps an OBS update or OS update could break the granted permission and permission would need to be granted again, but I wasn't able to reproduce this with OBS updates (e.g., going from OBS 26.1.2 to OBS 27.0.1).

Are any of these external monitors that are going to sleep or going into some power-saving state?

For those who might look into this further, the logged message, "Failed to create source" comes from here: https://github.com/obsproject/obs-studio/blob/27.0.1/libobs/obs-source.c#L393-L394

asher-the-thrasher commented 3 years ago

If anyone is still having this issue, could they try unchecking, then rechecking the box for obs to screen record in system preferences and see if that fixes anything.

technodrome commented 3 years ago

If anyone is still having this issue, could they try unchecking, then rechecking the box for obs to screen record in system preferences and see if that fixes anything.

That's literally what I tried two comments above. Doesn't work.

AlbertVeli commented 3 years ago

I can add that I had an older version of OBS installed, which I granted permissions to record screen for. The problem started when I upgraded to 27.0.1. Somehow the permission was only valid for the old version. But removing and re-adding the permission worked for me. I guess other people might have another problem, but the same symptom.

RytoEX commented 3 years ago

If anyone is still having this issue, could they try unchecking, then rechecking the box for obs to screen record in system preferences and see if that fixes anything.

That's literally what I tried two comments above. Doesn't work.

@technodrome To clarify, the full suggestion from @dossy that @asher-the-thrasher tried to relay is actually:

So, here's the interesting thing - it will list "OBS.app" in the list, but if you have multiple copies of OBS.app, it will show "OBS.app" as checked, but that only applies to the specific OBS.app that you ran when you granted it permission. It's confusing, yes Apple needs to improve the UX here, but it creates some confusion. If you have an instance of OBS.app running that doesn't have permission, then uncheck and recheck the permission in the System Preferences "Privacy" tab, it WILL then grant permission to the instance that's running.

According to this, the exact application executable you want to grant permissions to must be actively running when you try the uncheck-and-recheck-in-one-shot approach.

Alternatively, if that doesn't work, you could try a long approach: make sure you're not running any version of OBS, uninstall all versions except the one you want to run, purge them from trash, open the security settings, uncheck all OBS permissions, maybe restart for good measure, then open OBS and let macOS prompt you to grant permissions.

As a last ditch effort, another piece of advice from @dossy, you could try executing this command in Terminal to reset all permissions related to OBS:

tccutil reset All com.obsproject.obs-studio

sabinbajracharya commented 3 years ago

Ok I found something interesting regarding the issue. So it still doesn't work after doing everything mentioned above.

But what is interesting is that if I open Android emulator and then I open the OBS studio, the display works no matter how many times I close and reopen OBS! But once I close the Android emulator and I reopen the OBS studio I start getting the "Failed to create source 'Display Capture'!" message in the log.

So, Android emulator does something (in my case) that indirectly helps OBS studio to capture the Display device.

sabinbajracharya commented 3 years ago

YES! The above behavior helped me pinned down the problem! Go to System Preferences -> Battery -> Uncheck "Automatic graphics switching".

This is working for me!

So I believe the solution is for OBS studio to force graphic mode (GPU) during startup instead of getting the current graphics provided by OS.

sebtal commented 3 years ago

YES! The above behavior helped me pinned down the problem! Go to System Preferences -> Battery -> Uncheck "Automatic graphics switching".

This is working for me!

So I believe the solution is for OBS studio to force graphic mode (GPU) during startup instead of getting the current graphics provided by OS.

THIS worked for me as well. Many Thanks!

israteneda commented 3 years ago

YES! The above behavior helped me pinned down the problem! Go to System Preferences -> Battery -> Uncheck "Automatic graphics switching".

This is working for me!

So I believe the solution is for OBS studio to force graphic mode (GPU) during startup instead of getting the current graphics provided by OS.

Worked for me too, thanks 🙌

KRS4u commented 3 years ago

YES! The above behavior helped me pinned down the problem! Go to System Preferences -> Battery -> Uncheck "Automatic graphics switching".

This is working for me!

So I believe the solution is for OBS studio to force graphic mode (GPU) during startup instead of getting the current graphics provided by OS.

Thank you so much. It really helped.

yongrenjie commented 2 years ago

An alternative (but ultimately equivalent) solution is to use gfxCardStatus to toggle this. 'Dynamic switching' is on by default. Changing this to 'discrete only' before launching OBS solves the issue. After closing OBS, you can switch it back to 'dynamic switching'.

mpivet-p commented 2 years ago

YES! The above behavior helped me pinned down the problem! Go to System Preferences -> Battery -> Uncheck "Automatic graphics switching".

This is working for me!

So I believe the solution is for OBS studio to force graphic mode (GPU) during startup instead of getting the current graphics provided by OS.

It worked for me too. Thank you so much !

kvzonbr commented 2 years ago

YES! The above behavior helped me pinned down the problem! Go to System Preferences -> Battery -> Uncheck "Automatic graphics switching".

This is working for me!

So I believe the solution is for OBS studio to force graphic mode (GPU) during startup instead of getting the current graphics provided by OS.

Yesterday I installed OBS on my wife's MBP I9 after a year using it on an M1, and got this problem with it, and after a lot ot trouble shooting came along with this solution and worked like a charm.

Thanks a lot for your help.

fujohnwang commented 2 years ago

For me, I found the problem or the scenario is I have two display at work, when I work on laptop only, the problem pops up. When I plug the external display, it works again.

May that will help. I think Go to System Preferences -> Battery -> Uncheck "Automatic graphics switching" solves the same problem.

naingaungphyo commented 2 years ago

YES! The above behavior helped me pinned down the problem! Go to System Preferences -> Battery -> Uncheck "Automatic graphics switching".

This is working for me!

So I believe the solution is for OBS studio to force graphic mode (GPU) during startup instead of getting the current graphics provided by OS.

100%

Abdurahman-hassan commented 2 years ago

the Automatic graphics switching is so important choice unfortunately the suggestion solution is fix the issue temporarily, the tech team should fix the issue from the root

naingaungphyo commented 2 years ago

another temporary solution is to add new capture everytime. annoying tho!

sabinbajracharya commented 2 years ago

AS @fujohnwang said the problem also does not occur when you have external monitor connected to your macbook.

But yes I admit that this is a temporary solution and should be fixed in obs itself.

PatTheMav commented 2 years ago

AS @fujohnwang said the problem also does not occur when you have external monitor connected to your macbook.

But yes I admit that this is a temporary solution and should be fixed in obs itself.

Connecting an external monitor to a Macbook implicitly turns on the discrete graphics mode (hence why the fans come on more frequently when you have external screens connected).

The correct fix would be to handle NSApplicationDidChangeScreenParametersNotification events (per https://developer.apple.com/documentation/metal/metal_sample_code_library/selecting_device_objects_for_graphics_rendering) and update the display capture accordingly - I don't have access to any Mac with dual GPUs (I'm on Apple Silicon with all my machines), so someone with such a setup would need to implement and test this - PRs welcome!

Dutch-TS-Dev commented 1 year ago

YES! The above behavior helped me pinned down the problem! Go to System Preferences -> Battery -> Uncheck "Automatic graphics switching".

This is working for me!

So I believe the solution is for OBS studio to force graphic mode (GPU) during startup instead of getting the current graphics provided by OS.

YOU ARE THE MAN!!!

Abdurahman-hassan commented 1 year ago

This issue has been resolved in the latest version

gxalpha commented 1 year ago

Since the last report of this problem, we released OBS 28 with a new type of capture source, macOS Screen Capture. As Pat has stated above, the OBS team is fully on Apple Silicon now and as such can't reproduce the original issue, so for those who ran into this issue with the (now deprecated) traditional Display Capture source: Could you test how things behave in OBS 29.0.2 with a macOS Screen Capture source in Display Capture mode (without any tweaks to Automatic Graphics Switching)?

tgienger commented 1 year ago

I'm having a similar issue on the M1 mac mini. I'm not sure if it's the same issue, but it is similar. OBS asks for permission every time I start it up but it's already active and no matter how many times I uncheck/check it still does the same thing. When I try to use the now depricated Display Capture source it tells me there is nothing connected.

image image

PatTheMav commented 1 year ago

I'm having a similar issue on the M1 mac mini. I'm not sure if it's the same issue, but it is similar. OBS asks for permission every time I start it up but it's already active and no matter how many times I uncheck/check it still does the same thing. When I try to use the now depricated Display Capture source it tells me there is nothing connected.

image image

Please try selecting the "OBS" entry in the permission setting and click the - (minus) button in the lower left to remove it. Then open OBS again and grant it the permission.

Depending on the build of OBS that you granted that permission to in the first place it might not match the signature or our official builds (this can happen if you gave this permission to a nightly build downloaded from one of our CI runs).

tgienger commented 1 year ago

hallelujah!

Thank you.

NameWjp commented 1 year ago

@gxalpha OBS 29.1.2 Didn't work as expected in Automatic Graphics Switching,The problem still exists。

GS-Shahid commented 5 months ago

I tested OBS 30.2.1 on MacBook pro Intel. Its working fine with "macOS Screen Capture" but if we use Deprecated "Display capture" it gives "device not connected or not available" when we restart OBS.

GS-Shahid commented 5 months ago

Is there any way to explicitly switch graphic card while using OBS on Mac. I have dynamic switching enabled. My mac switches to discrete graphic when I open OBS studio; causing my mac to overheat. Would be great if we can provide an option to change. I guess we have this option for Windows but not for mac.

image
Fenrirthviti commented 1 month ago

Closing as stale. If this is still an issue please open a new issue with updated reproduction steps on the latest version of OBS.