I am trying to run the cuda samples over X. I am sshing from a mac and the mac has XQuartz in it. I get the following error:
nvidia@tegra-ubuntu:~/NVIDIA_CUDA-8.0_Samples/2_Graphics/Mandelbrot$ ./Mandelbrot
[CUDA Mandelbrot/Julia Set] - Starting...
Device 0: < GP10B >, Compute SM 6.2 detected
GPU Device 0: "GP10B" with compute capability 6.2
Data initialization done.
Initializing GLUT...
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 149 (GLX)
Minor opcode of failed request: 24 (X_GLXCreateNewContext)
Value in failed request: 0x0
Serial number of failed request: 29
Current serial number in output stream: 30
If you ssh from a remote host to a Linux box (in this case a Jetson) running X, then either the DISPLAY environment variable must point at the host (remote from the Linux box…in this case a Mac), or it must point at an existing logged in session on the Linux box. Should DISPLAY not be set, this is an error; should DISPLAY point at the Linux box, then all software required and hardware required must be on the Linux box. Should DISPLAY point at the Mac, then parts of the software and the GPU hardware must be on the Mac instead.
What is the output of this from where you execute the command:
echo $DISPLAY
In the special case of trying to display to the Mac your XQuartz is an X server and that running an app on the Jetson but displaying on XQuartz implies your XQuartz will need the GPU hardware and rendering software (your Mac will require an NVIDIA video card and CUDA or other software of the exact version required by the base program running on the Jetson…it won’t be the Jetson’s GPU doing the work, you’ve offloaded this to the Mac).
Try running the command locally on the Jetson. Should this succeed, consider adding remote desktop viewing software. The difference is that remote desktop software monitors the desktop on the Jetson without offloading to the Mac, and that the hardware/GPU software remains on the Jetson. The Mac would then monitor a copy of the render results (the Mac copies the framebuffer) rather than having GPU and other work transferred to the Mac.
Another way to say it is that XQuartz 2.7.11 (i have the same issue) does not support the GLX extension GLXCreateNewContext
Should a future version of XQuartz support it, we would be in business (CUDA/NVIDIA hardware being there or not on the machine hooked up the the display)