-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
librealsense fails to claim USB interface on MacOS Monterey #9916
Comments
Hi @dominiccarrano May I first confirm please whether you are using an Intel-based Mac computer or a newer Apple Silicon M1 model. If you do have an Intel based Mac, have you attempted to build librealsense from a binary with brew using brew install librealsense If you have chosen not to install librealsense with a brew binary because you require pyrealsense2 to be installed too, a RealSense Mac user recently shared a method in #9687 that they developed to install a pre-built pyrealsense2 on Mac using pip install. |
Hi @MartyG-RealSense, thanks for the quick response! I'm on an Intel-based Mac. I've separately tried:
and all produce this same RS2_USB_STATUS_ACCESS error. |
As you were earlier able to successfully use the camera on the same Mac with Catalina, that would make it unlikely that hardware problems with the camera or with the Mac computer are the cause of this problem. It could be an OS software issue with Monterey. Is your camera plugged into a hub? There have been reports of USB detection issues recently from Mac users who have upgraded to Monterey, particularly with hubs. An example discussion from the past week is in the link below. https://www.macrumors.com/2021/10/29/monterey-usb-hub-issues-reported/ |
Thank you for the link, I wasn't aware of this. The camera was plugged into a hub, which had no issues on Catalina. But even after plugging it into the machine with a direct USB3 connection, I get the same error. My understanding from perusing previous issues on this GitHub is that RS2_USB_STATUS_ACCESS typically means that libusb had trouble reading from a USB due to something permissions related. Is there any guidance from Intel on troubleshooting this for Mac (Monterey in particular)? I haven't been able to find anything online about how to debug this that wasn't specific to Linux. |
I researched the Monterey USB problem further. In the majority of cases, waiting for Apple to release a fix in a patch seemed to be the most common advice. There was one case where a Mac user restored access to their webcam in Monterey by resetting the Mac permissions with the command tccutil reset All in the terminal. |
I have the same error as @dominiccarrano and have walked through the same troubleshooting with the exact same results. Also an Intel Mac with Monterey that used to be a happy RealSense user with Big Sur. First tried: tccutil reset Camera Still getting the RS2_USB_STATUS_ACCESS errors. If anyone finds a fix I'd love to know about it. |
@jeredhdean Thanks very much for your report! @dominiccarrano Have you found any solutions since your last report, please? |
I got the same result as @jeredhdean: still have RS2_USB_STATUS_ACCESS after each of those tccutil reset commands. |
Reports about the Monterey USB issues strongly indicate that Thunderbolt ports are not affected. Thunderbolt ports accept USB-C connections. So conceivably, a camera might work if attached to a Thunderbolt port via a USB-A to USB-C adapter or a USB cable with USB-C micro sized connectors on both ends of the cable. Point number 3 of a guide to the Monterey USB issue in the link below suggests trying resetting the System Management Controller (SMC). https://cleanmymac.com/blog/usb-devices-disconnecting-monterey |
Thanks for the additional info on this, @MartyG-RealSense. Unfortunately, using a Thunderbolt connection instead didn't fix the issue, nor did an SMC reset. I should mention that this is on a late 2014 Mac mini with no Thunderbolt 3 (i.e., USB-C) ports, so I was using Thunderbolt 2 during that attempt. However, when I booted up the Mac in Safe Mode the camera did work. In Safe Mode, |
Thanks very much @dominiccarrano for the information about being able to access the camera in Safe Mode! It seems likely though that a resolution for this issue will have to come from Apple's side via an update for Monterey. |
I am getting the same error in MacOS Monterey, but I don't think it is the same as the Monterey USB hub issue. This code:
Will print "1" when a RealSense camera is connected, so the python wrapper can tell that a device is connected. But if I try to read and print the camera's serial number:
it will fail with None of the built example or realsense-viewer will be able to access the device properly. Under system report MacOS can clearly see that a realsense device is connected under Hardware > USB
The device is also visible under Hardware > Camera
Interestingly if I open Apple's Photobooth App To me it seems that MacOS is able to power and access the RealSense camera without issue. There is something that Apple has changed that is causing the RealSense SDK to not work properly. This will likely require a change to the SDK that someone from Intel will need to investigate. |
Thanks very much everyone for your reports. I will highlight the issue to Intel. |
I'm facing the same issue as well, with L515. |
I also have the same issue with D415 and D435 |
Confirmed the same behavior on both a late 2019 Intel MacBook Pro as well as a late 2021 M1 Pro MacBook Pro. MacOS Monterey Version 12.0.1 |
I discussed this case with my Intel RealSense colleagues. We will wait for Apple to release a fix for Monterey first. Then we can see if RealSense related problems are still present after that. |
How does that make sense? If the issue was USB then you would not be able to access the camera at all. It appears the issue is with the SDK. |
Ran a few more experiments (all with the system booted up normally, i.e. not in Safe Mode):
|
@dominiccarrano if it were a camera permissions issue Full Disk Access would not make a difference, it would need to be Camera. Unfortunately you cannot pre enable an application for camera access, the application has to request it. Interestingly opencv-python is also able to access and display an infrared feed from an attached RealSense camera similar to how photobooth is (once terminal or whatever application is running python is given camera permission). @MartyG-RealSense it really seems like the onus is on Intel to investigate and fix this. |
I have been facing the same issue since I updated to macOS Monterey. The camera appears in the USB list and I can properly use it as a webcam.
To avoid spending time on testing different architectures, the chipset is irrelevant to this issue. I have compiled RealSense for Intel (x86_64), Apple Silicon (arm64), and Universal (x86_64 + arm64) and I've used it without any problems in Big Sur. Here's the test: I created a universal RealSense build on my M1 machine (Monterey). Obviously, it did not work on Monterey. However, when I used that exact same build on an Intel machine (Big Sur), it worked fine. Same for x86 and ARM builds: they work on Big Sur, but not on Monterey. Also, I recompiled libusb (latest version) and linked that to RealSense. No luck. It seems this issue is related to Monterey and power delivery over USB.
The RealSense SDK uses the sensor in full power. I guess that's why it requires a dedicated USB-3/C. All other apps (like FaceTime or Photobooth) use RealSense as a webcam, limiting it to 30 FPS. There are numerous user reports here. So, for now, I tend to agree with @MartyG-RealSense that it's something Apple should work on. However, I'm keeping the thread alive to ensure Intel engineers will take care of that for version 2.50. |
As a side-note on the subject of Monterey, it is worth highlighting that the simple installation procedure brew install librealsense now supports Monterey. |
On macOS Big Sur 11.6.1, I am also seeing this issue using an M1 Mac mini. This install of Big Sur is absolutely fresh (a downgrade from macOS 12.0), I have only installed Xcode and the brew installs outlined on the Intel Dev site. The install was a downgrade from Monterrey specifically to get librealsense working. I have the following output from
I built the latest using master which I downloaded as a zip today. I followed the build instructions from the Intel Dev site. Except for using the cmake command from #9999 Code is sitting in and running from my |
Note: Supports Monterey on Intel Macs only. M1 is still not supported by the standard installation procedure. |
We've just tried the SDK on an Intel mac with Monterrey and can confirm |
I have just tried installing with
@Vangos how did you get it to work on an Intel Mac? |
Hi @cansik and @animaonline There is the option of continuing to use SDK version 2.50.0 for those who are concerned about the removal of official support for MacOS from 2.51.1 onwards. Official MacOS updates for the RealSense SDK ceased after MacOS High Sierra (10.13) and the SDK continued to work with newer MacOS versions such as Catalina and Big Sur. Whilst there were issues with Apple Silicon M1 and with MacOS Monterey, Mac users in the RealSense community developed solutions for these. As the SDK is open source, there is the possibility for RealSense Mac community members to create a custom GitHub 'fork' version of the SDK and add user-created updates if future MacOS versions cannot work with the SDK. |
Is the code for the firmware now opensource? It wasn't before.
If it is opensource, this is super awesome, and it true, we don't need
to you support OSX.
If it is closed source, this is a problem. Realsense has previously
removed some firmware bins (or at least I could not access them) and
created a situation where I was forced to update.
…-tim
On 8/24/22, MartyG-RealSense ***@***.***> wrote:
Hi @cansik and @animaonline There is the option of continuing to use SDK
version **2.50.0** for those who are concerned about the removal of official
support for MacOS from 2.51.1 onwards.
Official MacOS updates for the RealSense SDK ceased after MacOS High Sierra
(10.13) and the SDK continued to work with newer MacOS versions such as
Catalina and Big Sur. Whilst there were issues with Apple Silicon M1 and
with MacOS Monterey, Mac users in the RealSense community developed
solutions for these.
As the SDK is open source, there is the possibility for RealSense Mac
community members to create a custom GitHub 'fork' version of the SDK and
add user-created updates for future MacOS versions cannot work with the
SDK.
--
Reply to this email directly or view it on GitHub:
#9916 (comment)
You are receiving this because you commented.
Message ID: ***@***.***>
|
Hi @timprepscius The RealSense SDK is open source but firmware drivers are not. Since SDK 2.34.0 it has been possible though to override the firmware URL to allow on-site mirroring. You can also write your own firmware checking and updating script. #7093 and #6098 have details about this. |
Here's a question..
Now that the Realsense is dead. And all of this code is going to
decay in the nether reaches of the void- pretty soon a fond memory,
like the Vic20. Why not release the code for the firmware?
Why not let us use the camera in the way that we actually want to?
For instance, I want to get the highest bit quality pixels at 90fps.
Your firmware right now restricts this. I don't care about anything
else, except for luminosity at 90fps. I want more than 8 bit.
I'm sure other people have other specific needs which the firmware restricts.
Who will it hurt to release the firmware?
…On 8/24/22, MartyG-RealSense ***@***.***> wrote:
Hi @timprepscius The RealSense SDK is open source but firmware drivers are
not.
Since SDK 2.34.0 it has been possible to override the firmware URL to allow
on-site mirroring. You can also write your own firmware checking and
updating script. #7093
and #6098 have details
about this.
--
Reply to this email directly or view it on GitHub:
#9916 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
@timprepscius RealSense 400 Series cameras and the RealSense SDK are continuing. The support change relates to Android and MacOS specifically. Support for PC and Arm computing devices is unaffected. I do genuinely understand and appreciate your concern. RealSense firmware drivers remain closed-source unfortunately. The SDK does offer a Low Level Device API for communicating directly with the sensor hardware. https://dev.intelrealsense.com/docs/api-architecture#low-level-device-api A C++ example program that uses the low level API is rs-data-collect https://github.com/IntelRealSense/librealsense/tree/master/tools/data-collect |
I had an issue running the Intel realSense D435i camera when I updated my MacBook Pro Intel chip based with BigSur OS version to Monterrey version. Running python script or any command related to camera functions with |
After HOURS of digging I found this rather useful thread, and thanks for the info @Vangos, however now while following your personal tutorial on an M1 MacBook Pro running Ventura 13.0.1 I have an issue... I receive the following error trying to run the 'Git Checkout' command after cloning the repo: Any advice would be greatly appreciated, thanks! |
Hi! Seems like it's a Git issue. I would try |
Any update on this ? Still only working with When running
Env specs
|
Because this issue has become large and unwieldy (with various unrelated issues thrown in) I have created #11815 in the hope of starting a fresh discussion on what the root cause is that librealsense needs root privileges on macOS Monterey and later. If you have any insights on the specific issue of requiring root privilege please share them in #11815. |
I am getting a |
Hi @AkshajGupta There have been reports of problems such as a non-detected camera with Ventura. An example of this is at #9687 (comment) #11815 is the central place on this support forum where I am directing Ventura users who are having problems so that they can discuss it amongst themselves, and you will therefore be notified automatically of any solutions that the RealSense Mac community comes up with for getting librealsense working on Ventura if you have left a comment there. |
@rowungiles did you have any luck with this? I have this usb problem on Ventura and I was considering downgrading to Big Sur to solve it until I saw your case
|
in MacBook Pro, 16-inch, 2019, 2.6 GHz 六核Intel Core i7, Ventura 13.4 (22F66):
who can help me? |
|
Hi @huyyxy I have just responded to a case of the MacOS icon problem at #12890 (comment) |
Hi everyone, The current latest 2.56.1 version of the librealsense SDK contains a fix for SDK compilation on MacOS Apple Silicon 'M' processors and also an update for MacOS 14 (Sonoma). These changes are confirmed in 2.56.1's release notes. 2.56.1 is currently an 'interim beta' release of the SDK which can only be installed by source code compilation. https://github.com/IntelRealSense/librealsense/releases/tag/v2.56.1 |
@MartyG-RealSense Thanks for this update. If you are interested to try it out in python, I have already prebuilt the wheels of the beta: https://github.com/cansik/pyrealsense2-macosx/releases/tag/macosx-v2.56.1-beta However, the PR does not fix all the issue we are having with MacOS. It seems that the issue regarding power-settings is gone (at least here in my machine / camera) 🎉. But we still need |
Thanks so much @cansik - I have passed on your feedback to my Intel RealSense developer colleague who worked on PR #12972. They welcome Mac customers developing solutions for issues and sharing them. It helps Intel and the customers to work together on Mac support. My colleague added that a segfault is still thrown when querying devices and that according to users, Apple changed the USB policy and LibUSB is no longer working on Mac. |
@cansik @MartyG-RealSense It's already solved a big problem!!Thanks!! |
This is very good news! @MartyG-RealSense as to helping out: I would really really love to, but I simply don't have the time at the moment:-( But: if you could pass on my comment in the other bug, #11815 (comment), I still have the feeling that Intel (the company), as the owner of the USB VID of the Realsense cameras, should be able to tell Apple (the company) not to use the standard CoreMedia driver for this specific VID/PID combination, and then the Realsense camera will just be sitting there driverless and libusb can open it without I vaguely remember that at some point in the past I have read that this is possible, there is a way that companies (or actually official owners of the VID as per the USB consortium or whatever) can communicate that to Apple, but I am not able to find a reference at the moment, sorry. |
@jackjansen I will certainly pass on your feedback. Thanks very much! |
Issue Description
After upgrading my machine from macOS Catalina (10.15.6) to Monterey (12.0.1), all RealSense applications I have and pyrealsense2 code I’ve written -- which all previously ran without issue -- are broken. They all give me the same error message: failed to claim usb interface: 0, error: RS2_USB_STATUS_ACCESS. I’ve verified both physically and via System Preferences that the D415 is connected to the machine with a USB 3 connection using the same cable that the D415 was shipped with.
When I run rs-enumerate-devices, I get:
When I run realsense-viewer, I get:
I wondered if something was wrong with the device firmware and tried updating it, which gives me:
I uninstalled and then rebuilt librealsense from scratch for Monterey using the newest version of Xcode that’s Monterey compatible, but these issues still persist even after that. The librealsense homebrew page indicates that Monterey is supported. I’d greatly appreciate any guidance on fixing the failed to claim usb interface: 0, error: RS2_USB_STATUS_ACCESS problem for Monterey, thank you!
The text was updated successfully, but these errors were encountered: