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
OpenGL failed to open X11 server connection #890
Comments
Hi @hackenjoe , OpenGL failing to open the window is expected if you don't have a display attached, and will not end the program. Can you try RTP with $ video-viewer /dev/video0 rtp://<remote-ip>:1234
$ detectnet /dev/video0 csi://0 rtp://<remote-ip>:1234 https://github.com/dusty-nv/jetson-inference/blob/master/docs/aux-streaming.md#transmitting-rtp To add this to display = jetson.utils.videoOutput("rtp://192.168.1.100:1234") # set your PC's IP here |
It works with the normal video-viewer with: However, when I am executing Current code with your change:
And executing with Is there a workaround or trick so that it works also in headless mode? |
I would just try it with detectnet.py /dev/video0 rtp://<remote-ip>:1234 I'm not sure why it would have taken effect in your edited |
It's working with |
Hmm - are you sure the my-detection.py you are running is the copy that you updated with the rtp string? Regarding the output, I meant the console output when you run it. You can capture it by running |
Sry for late answer but here we go:
` |
+1 bump |
You ever work this one out? Thanks |
Try creating the videoOutput interface before the videoSource interface. |
same error, just happens earlier. [OpenGL] failed to open X11 server connection. and then [video] created gstCamera from v4l2:///dev/video0 |
Do you have a display attached to your Jetson? Are you able to run glxgears? |
No, I have a TV I could plug in, if I have to, but would prefer to run headless via SSH, with something like gstreamer, if possible. $ glxgears I tried ssh -X tunnelling first, using the $DISPLAY param, but ran into driver issues because my local machine would apparently need the same nvidia drivers as the jetson. It seems like it's relying on X being there. |
OpenGL won't work over SSH, needs display attached. Instead you can stream RTP output to your PC
…________________________________
From: Daniel ***@***.***>
Sent: Friday, July 2, 2021 5:52:42 PM
To: dusty-nv/jetson-inference ***@***.***>
Cc: Dustin Franklin ***@***.***>; Comment ***@***.***>
Subject: Re: [dusty-nv/jetson-inference] OpenGL failed to open X11 server connection (#890)
No, I have a TV I could plug in, if I have to, but would prefer to run headless via SSH, with something like gstreamer, if possible.
$ glxgears
Error: couldn't open display (null)
I tried ssh -X tunnelling first, using the $DISPLAY param, but ran into driver issues because my local machine would apparently need the same nvidia drivers as the jetson. It seems like it's relying on X being there.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#890 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADVEGK2MYN3GJIYFXC5AT3LTVYYKVANCNFSM4WCUIZAQ>.
|
I understand that. The problem is that we're using an RTP syntax, expecting it to stream over a gstreamer pipeline, but instead it's trying to display to X11.
|
+1 for this issue.. I even tried the --headless as shown in netdetect.py So what are we missing on this... if it works on netdetect.py, it should work on my-detection.py |
Fixed... the issue on the original code is that the while is checking for the display.isStreaming... and fails... so let it go into the while loop first then check after with the if not camera.IsStreaming() and no display.IsStreaming(). import jetson.inference
import jetson.utils
net = jetson.inference.detectNet("ssd-mobilenet-v2", threshold=0.5)
camera = jetson.utils.videoSource("/dev/video0") # '/dev/video0' for V4L2
display = jetson.utils.videoOutput("rtp://10.10.0.186:1234","--headless") # 'my_video.mp4' for file
while True:
img = camera.Capture()
detections = net.Detect(img)
display.Render(img)
display.SetStatus("Object Detection | Network {:.0f} FPS".format(net.GetNetworkFPS()))
if not camera.IsStreaming() or not display.IsStreaming():
break |
I believe this is still broken for Fails:
Works:
|
@lilhoser try running detectnet.py without |
Unfortunately I dont get any video input from my usb camera since OpenGL fails:
I have tested the
my-detection.py
script and wanted to forward the camera stream to another computer via RTP. What did I miss?The text was updated successfully, but these errors were encountered: