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

Ubuntu 18.04 with SR300, turning camera off then back on causes "Frames didn't arrived within 5 seconds" #7328

Closed
Belval opened this issue Sep 13, 2020 · 6 comments

Comments

@Belval
Copy link

Belval commented Sep 13, 2020

Required Info
Camera Model SR300
Firmware Version 3.21.0.0
Operating System & Version Ubuntu 18.04
Kernel Version (Linux Only) 5.4.0-47-generic
Platform PC
SDK Version 2.38.1
Language N/A and Python
Segment N/A

Issue Description

When using the SR300 I cannot activate/deactivate it without having it enter an error state which requires me to powercycle (i.e. unplug/replug) the device.

Screenshot from 2020-09-13 18-00-55

How to reproduce

  1. On a clean install of Ubuntu 18.04, follow the installation instructions here.
  2. Open Intel RealSense Viewer
  3. Turn on the camera/coded-light depth sensor
  4. The image is visible and the output is good
  5. Turn off the camera/coded-light depth sensor
  6. Turn on the camera/coded-light depth sensor
  7. No image, with error (backend-v4l2.cpp:1034) Frames didn't arrived within 5 seconds

What I have tried to fix the issue

  1. Initially I was on Ubuntu 20.04. I downgraded to Ubuntu 18.04 to be "officially supported". Both platform had the same issue.
  2. Tried to use the SR300 with the pyrealsense2 Python module, same error happens, whether I pipeline.stop() or not.

Temporary fix

If I unplug and replug the USB cable the camera can be reactivated and will work as expected without rebooting. However this is very painful when debugging.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Sep 14, 2020

Hi @Belval I carefully considered your case. It does not seem like a problem that is likely to be related to erratic power, as it sounds as though your camera is stable other than when this problem occurs specifically when toggling the depth sensor on-off-on.

On point 1 of your kindly provided 'How to reproduce' guide, the link to the installation method that you used goes to this page here instead. Could you confirm which method you used to install librealsense, please?

Because your log was checking the status every 5 seconds it made me wonder if it was the RSUSB method, as it checks device changes every 5 seconds.

#6921 (comment)

If you are writing your own application in Python, would it be possible to add a hardware_reset() instruction near the start of your Python script please to see if that improves your situation?

#1086 (comment)

#3329 (comment)

@Belval
Copy link
Author

Belval commented Sep 14, 2020

Sorry about the wrong link, here is the right one (I also updated it): https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md#installing-the-packages

I will try the possible solutions that you mentioned.

@Belval
Copy link
Author

Belval commented Sep 14, 2020

I can confirm that adding:

    # Reset all devices
    ctx = rs.context()
    devices = ctx.query_devices()
    for dev in devices:
        dev.hardware_reset()

Fixes the issue for my python script, thank you for your help.

Feel free to close the issue, but it does persist in RealSense viewer.

@MartyG-RealSense
Copy link
Collaborator

Thanks for the update - I'm very pleased that you made progress!

To avoid unplug-replug in the remaining issue with the Viewer, you could see if you can do a hardware reset in the Viewer at the start of each session of using it. This is peformed by going to the More option at the top of the options side-panel and selecting the hardware reset option from its menu.

@Belval
Copy link
Author

Belval commented Sep 15, 2020

That works, thank you for your awesome support!

@Belval Belval closed this as completed Sep 15, 2020
@MartyG-RealSense
Copy link
Collaborator

You are very welcome - I'm glad I could help. :) Thanks for the update!

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