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

Process Killed RealSense SDK Mac M2 #12890

Open
MhmRhm opened this issue May 1, 2024 · 10 comments
Open

Process Killed RealSense SDK Mac M2 #12890

MhmRhm opened this issue May 1, 2024 · 10 comments

Comments

@MhmRhm
Copy link

MhmRhm commented May 1, 2024


Required Info
Camera Model D457
Firmware Version 5.16.0.1
Platform M2 Mac
Operating System & Version MacOS 14.4.1
SDK Version 2.55.1
Language C

Issue Description

I have followed this instructions to build RealSense SDK for Mac.
I also copied the libusb-1.0.0.dylib next to rs-enumerate-devices in /librealsense/build/RELEASE/Release.

The rs-enumerate-devices exits without any error output while run from terminal with sudo.
When running from Xcode it crashes at PTHREAD_CHECK (pthread_mutex_lock(mutex) );

The following image shows the situation.

Screenshot 2024-05-01 at 11 56 42 AM
@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented May 1, 2024

Hi @MhmRhm May I first confirm that you have set the position of a mode switch in the casing of your D457 to work with a USB cable, please? By default the camera is set to work with a non-USB connection type called GMSL/FAKRA. If you have not set the mode switch to the USB position yet then instructions are provided at the link below.

https://support.intelrealsense.com/hc/en-us/community/posts/14840675121043/comments/14843232242835

It looks as though you have likely set the switch to the USB position though.

In regard to MacOS 14.4.1 (Sonoma), the Lightbuzz guide was designed for use with MacOS Monterey. There have been reported issues with getting RealSense cameras to work with Sonoma that are unresolved at the time of writing this as far as I am aware - please see #12727

The brew install librealsense method of installing the SDK on MacOS claims to be compatible with Apple Silicon and Sonoma.

https://formulae.brew.sh/formula/librealsense

@MhmRhm
Copy link
Author

MhmRhm commented May 1, 2024

Dear @MartyG-RealSense thanks for your fast response.

The switch is on USB.
On a freshly reset Mac, after doing brew install librealsense I get the same Killed message.
In an Ubuntu 22.04 image on UTM everything works and I get the expected result:
(I must mention that in the tutorial for Linux manual installation guide I did not Build and apply patched kernel modules (Step 3 under Install librealsense2)

Screenshot 2024-05-01 at 9 39 38 PM

@MartyG-RealSense
Copy link
Collaborator

I note that in the log at the bottom of your Mac screen you have Failed to set power state and No device detected - is it plugged in? errors, which can occur if the camera cannot be detected or cannot be accessed.

On your Mac are you using the official USB A to C cable supplied with the camera or a USB C to C cable of your own choice, please? If it is a C to C cable then problems are more likely to occur with RealSense cameras, especially on Mac.

@MhmRhm
Copy link
Author

MhmRhm commented May 1, 2024

Dear @MartyG-RealSense there are no USB A to C cables supplied with the camera. Only one GMSL/FAKRA cable. I am using an official USB Type C to C cable supplied with my iPad mini. The same cable that I used in the UTM image and it is working there.
I also rotated the Type C cable at the device end. Apparently for the D457 USB port, only one set of RX/TX pins is implemented in Type C.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented May 2, 2024

Thanks very much @MhmRhm for the reminder that D457 does not come with a USB-C cable. I use a cable from another RealSense camera with mine.

Yes, with the D457 model the micro-sized end of the USB cable has to be inserted into the camera base in one particular direction of the two insertion directions available in order for the camera to operate at USB 3.2 speed, otherwise it is detected as USB 2.1 when inserted in the other direction.

Aside from the known reliability issues when using a C to C cable with RealSense cameras, the cable that is chosen to use with RealSense cameras if not using the official one should also be designed for data transfer and not just be a charging / tablet to computer device sync cable.

@MhmRhm
Copy link
Author

MhmRhm commented May 3, 2024

Dear @MartyG-RealSense thanks for your patience. I managed to test with a USB4 Gen3 40Gbps cable. Same outcome. In the attache image you can see that my virtual machine is recognizing the USB 3.2 but Mac failed to run the enumeration application.

Screenshot 2024-05-03 at 5 53 33 PM

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented May 3, 2024

You could next check Sonoma's privacy and security settings to see whether there is a setting that might be blocking access to the camera in MacOS.

https://support.apple.com/en-gb/guide/mac-help/mchlf6d108da/mac

@MhmRhm
Copy link
Author

MhmRhm commented May 7, 2024

In FaceTime app, I can select the RealSense camera and it is functional.
When I run realsense-viewer I get the following segmentation fault:

Screenshot 2024-05-08 at 7 02 23 AM Screenshot 2024-05-08 at 7 03 06 AM

@MartyG-RealSense
Copy link
Collaborator

This error has been previously reported with a RealSense camera on an Apple Silicon Mac at the link below.

https://support.intelrealsense.com/hc/en-us/community/posts/4548413451539/comments/27039742754195

My research indicates that it is not a RealSense-only issue but also occurs on MacOS in non-RealSense software that uses GLFW graphics such as the game Minecraft. In the small number of cases where a workaround was developed, it involved creating a custom 'forked' version of GLFW with the problematic code edited out, like the case at LWJGL/lwjgl3#695

I appreciate that this is something that the majority of RealSense MacOS users may not want to do or be able to do.

@MhmRhm
Copy link
Author

MhmRhm commented May 8, 2024

Dear @MartyG-RealSense thank you so much for that. Hopefully, soon I will try the solution.

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