Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera not detected on Mac #9542

Closed
Timmmm opened this issue Aug 1, 2021 · 12 comments
Closed

Camera not detected on Mac #9542

Timmmm opened this issue Aug 1, 2021 · 12 comments

Comments

@Timmmm
Copy link

Timmmm commented Aug 1, 2021


Required Info
Camera Model D435
Firmware Version Don't have access currently but I updated it to the latest a couple of weeks ago.
Operating System & Version MacOS
Platform Macbook Pro

Issue Description

Hi, I have a D435 and I plugged it into my Macbook Pro via a Thunderbolt 3 dock (I don't have the right cable to go directly unfortunately). It is detected as a USB device in System Info, but no camera-using apps detect it (Zoom, Photo Booth, etc.). I'm trying to use it as a standard webcam.

I was under the impression that it presented itself as a standard UVC camera, and it definitely seems to behave like that on Windows - I was able to use it for Zoom on Windows without installing any drivers.

Would you expect it to work on Mac too?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 1, 2021

Hi @Timmmm RealSense 400 Series cameras are UVC 1.5 compliant, as described in the link below.

#3416 (comment)

Whilst I do not have access to a Mac to test this on, there are some video applications where the RGB feed of a RealSense camera is not visible unless a camera-change or view-change option is toggled. An example of this is the built-in non-RealSense Camera app in Windows, as described in the link below.

#8711 (comment)

Zoom's Mac troubleshooting information states "If you are on on Mac OS 10.14 Mojave and are still having difficulty accessing the camera, check your operating system permissions to confirm that Zoom has access to the camera" (see the link below).

https://support.zoom.us/hc/en-us/articles/360016688031

This permissions advice applies to MacOS Catalina too, according to the guidance in the link.

@Timmmm
Copy link
Author

Timmmm commented Aug 2, 2021

Hi, thanks for the reply!

a camera-change or view-change option is toggled

Yeah I think that's just the normal camera selection UI right?

check your operating system permissions

Unfortunately Mac's camera permissions are for all camera access (i.e. you grant access to all cameras, not just specific cameras) and I had already done that so that wasn't the issue.

I did some more testing - I found a USB-C to USB-C USB 3.1 cable so I could connect the camera directly to my Mac, but got the same result. I also tested on another Macbook which behaved exactly the same. It is detected, it just doesn't show up as a camera:

$ system_profiler SPUSBDataType
2021-08-02 09:46:53.285 system_profiler[63577:22599056] SPUSBDevice: IOCreatePlugInInterfaceForService failed 0xe00002be
2021-08-02 09:46:53.286 system_profiler[63577:22599056] SPUSBDevice: IOCreatePlugInInterfaceForService failed 0xe00002be
2021-08-02 09:46:53.286 system_profiler[63577:22599056] SPUSBDevice: IOCreatePlugInInterfaceForService failed 0xe00002be
2021-08-02 09:46:53.287 system_profiler[63577:22599056] SPUSBDevice: IOCreatePlugInInterfaceForService failed 0xe00002be
2021-08-02 09:46:53.287 system_profiler[63577:22599056] SPUSBDevice: IOCreatePlugInInterfaceForService failed 0xe00002be
2021-08-02 09:46:53.288 system_profiler[63577:22599056] SPUSBDevice: IOCreatePlugInInterfaceForService failed 0xe00002be
2021-08-02 09:46:53.288 system_profiler[63577:22599056] SPUSBDevice: IOCreatePlugInInterfaceForService failed 0xe00002be
USB:

    USB 3.1 Bus:

      Host Controller Driver: AppleUSBXHCITR
      PCI Device ID: 0x15ec
      PCI Revision ID: 0x0006
      PCI Vendor ID: 0x8086
      Bus Number: 0x00

    USB 3.1 Bus:

      Host Controller Driver: AppleUSBXHCITR
      PCI Device ID: 0x15ec
      PCI Revision ID: 0x0006
      PCI Vendor ID: 0x8086
      Bus Number: 0x01

        Intel(R) RealSense(TM) Depth Camera 435 :

          Product ID: 0x0b07
          Vendor ID: 0x8086  (Intel Corporation)
          Version: 50.ce
          Serial Number: 933623023949
          Speed: Up to 5 Gb/s
          Manufacturer: Intel(R) RealSense(TM) Depth Camera 435
          Location ID: 0x01100000 / 1
          Current Available (mA): 900
          Current Required (mA): 720
          Extra Operating Current (mA): 0

(Those errors at the top happen without it plugged in at all so I assume it is unrelated.)

Unfortunately there seems to be almost no information available about debugging USB on Mac - nothing shows up in syslog. But I did eventually figure out that you can open the Console app (not the terminal), and click Start, and then I found these logs when I plug in the camera:

default	09:59:26.437452+0100	kernel	596693.199243 SSP1@01100000: AppleUSBHostPort::enumerateDeviceComplete_block_invoke: enumerated 0x8086/0b07/50ce (Intel(R) RealSense(TM) Depth Camera 435 )
default	09:59:26.509640+0100	VDCAssistant	[guid:0x110000080860b07] DeviceArrived service:0x6127 (id: 0x1000c6827)
error	09:59:26.511667+0100	VDCAssistant	CMIO_DPA_VDC_Server_Assistant.cpp:1453:GetDeviceByGUID No match for specified GUID 0x110000080860b07
error	09:59:26.511729+0100	VDCAssistant	DeviceArrived  caught an exception from determining the deviceType (0x2) or removing the device
default	09:59:26.511785+0100	VDCAssistant	[guid:0x110000080860b07] DeviceArrived  creating device (type: 2)
default	09:59:26.516032+0100	icdd	           Device DB | Creating local devices
default	09:59:26.517189+0100	VDCAssistant	[guid:0x110000080860b07] Found Camera with VID: 32902 (0x8086), PID: 2823 (0x0b07), release: 0x50ce
default	09:59:26.522507+0100	VDCAssistant	[guid:0x110000080860b07] Camera with bInterval 0 mConcurrentTransfers : 3
error	09:59:26.524117+0100	VDCAssistant	CMIO_DPA_VDC_Server_Device.cpp:556 cmio assert: "device != ((io_object_t) 0)" at exit - (err=0)
error	09:59:26.524281+0100	VDCAssistant	CMIO_DPA_VDC_Server_Device.cpp:2183:DiscoverCapabilities [guid:0x110000080860b07] DiscoverCapabilities: couldn't find any for format descriptors
default	09:59:26.518716+0100	kernel	Sandbox: icdd(623) allow file-read-data /Library/Image Capture/Devices
default	09:59:26.519176+0100	kernel	Sandbox: icdd(623) allow file-read-data /Library/Image Capture/Devices/EPSON Scanner.app/Contents/Resources/DeviceMatchingInfo.plist
error	09:59:26.524400+0100	VDCAssistant	CMIO_DPA_VDC_Server_Device.cpp:2224:DiscoverCapabilities IO return no device
error	09:59:26.524431+0100	VDCAssistant	DeviceArrived  Found a camera (0x110000080860b07) , but was not able to start it up (0xe00002c0 -- (iokit/common) no such device)
default	09:59:26.524533+0100	VDCAssistant	[guid:0x110000080860b07] DisposeFrames outstanding completions 0
default	09:59:26.524703+0100	VDCAssistant	[guid:0x110000080860b07] DisposeFrames outstanding completions 0
default	09:59:26.524913+0100	VDCAssistant	[guid:0x110000080860b07] DisposeFrames outstanding completions 0
default	09:59:26.524940+0100	VDCAssistant	[guid:0x110000080860b07] SuspendDeviceOnQuit false

Note the assertion. Could this be a bug in Mac's UVC driver, or the Realsense firmware? Can you guys confirm if this works for you or if it has ever been tested on Mac?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 2, 2021

The camera selector in video tools is designed for normal webcams but can work with RealSense cameras too.

A RealSense team member stated in the link below that the librealsense SDK software would have to be installed on Mac in order for a RealSense camera to be accessed as a general webcam.

#2893 (comment)

@Timmmm
Copy link
Author

Timmmm commented Aug 2, 2021

The camera selector in video tools is designed for normal webcams but can work with RealSense cameras too.

Yes I am aware how camera selection UIs work 😃

A RealSense team member stated in the link below that the librealsense SDK software would have to be installed on Mac in order for a RealSense camera to be accessed as a general webcam.

No they're saying they were not able to access the camera via UVC at all, and the only way they could access it is via librealsense, which obviously doesn't work in Zoom, etc. because they don't use librealsense.

Installing librealsense can't make UVC work because it doesn't include any drivers. You can't "install" it at all in fact.

Thanks for linking to that thread though. It sounds like this is just broken and has probably never worked. It must be either a bug in Mac's UVC driver or a bug in the Realsense camera firmware.

It would be nice if you could fix it but I understand why it might be low priority!

@MartyG-RealSense
Copy link
Collaborator

I researched the subject further but #2893 seems to be the best reference available. As I do not have a Mac to test with and do not have solid enough references to form confident advice on this particular situation, it will be better to see what advice Mac owners can provide in response to your comment on #2893

In regard to librealsense not being able to make UVC work: the SDK can make use of the RSUSB backend on Mac, and RSUSB is compliant with UVC 1.5. This is described in the SDK's Build Configuration documentation.

https://dev.intelrealsense.com/docs/build-configuration

@MartyG-RealSense
Copy link
Collaborator

Hi @Timmmm Do you require further assistance with this case, please? Thanks!

@Timmmm
Copy link
Author

Timmmm commented Aug 8, 2021

Well, I think it's probably unfixable by anyone except your firmware developers or Apple's UVC driver developers so I probably wouldn't spend any more time on it if I were you.

I did some more research though.

  1. The libuvc/RSUSB situation in librealsense is pretty confusing! The build-configuration page you linked still says

FORCE_LIBUVC - Setting this flag to true will configure the underlying backend to use libuvc. This backend is default for Mac OS, but can be configured on other OS-s as well. libuvc can serve as a more robust alternative to the native backend, however, it has well known limitations and is not recommended to be used in end-products (please use FORCE_RSUSB_BACKEND cmake flag instead)

But also

FORCE_RSUSB_BACKEND - Equivalent to FORCE_LIBUVC ...

However looking at the code it seems like a couple of years ago libuvc was removed entirely in favour of RSUSB (which I guess is your own version?

  1. I actually tried using upstream libuvc to open the camera but it fails due to some UVC 1.5 issues, so I'm not sure how librealsense ever used libuvc to do it, unless you patched it? I opened a bug in libuvc about that here.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 8, 2021

As far as I am aware, the FORCE_LIBUVC instructions are deprecated rather than removed completely, meaning that they are usable but it is recommended to use the RSUSB instruction instead. An example of installing via libuvc-backend (which dates back to before the introduction of RSUSB in librealsense SDK version 2.30.0) can be found in the link below.

https://github.com/IntelRealSense/librealsense/blob/master/doc/libuvc_installation.md

In Linux, a non-RSUSB build (-DFORCE_LIBUVC=OFF) uses V4L2 backend.

#6841 (comment)
#7904

@Timmmm
Copy link
Author

Timmmm commented Aug 8, 2021

Those instructions and script are out of date and should have been removed when the libuvc backend was removed. If you check the code there is no way to use libuvc now and FORCE_LIBUVC is just an alias to enable RSUSB.

I guess it's possible that some old firmware used to work with libuvc, but new firmware doesn't and nobody noticed because librealsense can't use libuvc anymore.

Anyway kind of getting off topic!

@MartyG-RealSense
Copy link
Collaborator

Hi @Timmmm Do you require further assistance with this case, please? Thanks!

@Timmmm
Copy link
Author

Timmmm commented Aug 14, 2021

Nope. I mean it's still broken but I don't need it fixed.

@MartyG-RealSense
Copy link
Collaborator

Okay, thanks very much @Timmmm for the update. I will close the case, but please feel free to return to it at a future date if you wish to do so. Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants