Pangolin icon indicating copy to clipboard operation
Pangolin copied to clipboard

Pangolin X11: Unable to retrieve framebuffer options

Open RuihongQiu opened this issue 7 years ago • 11 comments

I use WSL and when using Pangolin, it came out like this

terminate called after throwing an instance of 'std::runtime_error' what(): Pangolin X11: Unable to retrieve framebuffer options Aborted (core dumped)

I have tried to comment 2 lines in a cpp file like https://github.com/stevenlovegrove/Pangolin/issues/74#issuecomment-178248684

But it doesn't work. I think that it maybe work for a ssh to a linux machine but not a WSL.

RuihongQiu avatar Jul 07 '17 04:07 RuihongQiu

What is WSL? I guess Windows Subsystem for Linux? I am not familiar with the peculiarities of that, but you would need to make sure you install an X-Server (with OpenGL acceleration) to use the X11 display system in Pangolin. Alternatively, you can build Pangolin natively for Windows which will use Window's standard API.

stevenlovegrove avatar Jul 08 '17 02:07 stevenlovegrove

So... I'm having this same issue, I'm trying to execute ORB_SLAM2, but i get the same output as RuihongQui, I'm running Ubuntu 16.04 on the Windows Subsystem for Linux, using Xming Server, I commented .

I modified Pangolin/src/display/device/display_x11.cpp

GLX_DOUBLEBUFFER , glx_doublebuffer ? True : False,”

into this:

GLX_DOUBLEBUFFER , False, //glx_doublebuffer ? True : False,

But still i'm getting the same message after compiling and trying to execute HelloPangolin or any other example

terminate called after throwing an instance of 'std::runtime_error' what(): Pangolin X11: Unable to retrieve framebuffer options Aborted (core dumped)

Macranius avatar Mar 20 '18 00:03 Macranius

I met the same problem with you @Macranius ,and did you solved it now?

zssjh avatar Apr 04 '18 06:04 zssjh

Even I'm stuck on this exact same place :(

ironhide23586 avatar May 01 '18 11:05 ironhide23586

just open Pangolin/src/display/device/display_x11.cpp and change GLX_DOUBLEBUFFER , glx_doublebuffer ? True : False, to GLX_DOUBLEBUFFER , glx_doublebuffer ? False : False, then make and install Pangolin

jaysite001 avatar May 07 '18 06:05 jaysite001

Same Problem in WSL with Xming Server, run glxgears is OK. Solution of changing GLX_DOUBLEBUFFER to False doesn't work.

CoolyXIE avatar Jun 12 '18 10:06 CoolyXIE

@Macranius Is there any luck with this problem?I am having the same on virtual machine.

xuwh15 avatar Jul 19 '18 14:07 xuwh15

@zssjh @xuwh15 There was no luck and changing double buffer to false didn't work at all, this problem remained.

Macranius avatar Jul 23 '18 03:07 Macranius

@zssjh @xuwh15 There was no luck and changing double buffer to false didn't work at all, this problem remained.

@zssjh @xuwh15 @Macranius @ironhide23586 @CoolyXIE @RuihongQiu I encountered the same problems as you guys did. Finally I manage to solve this problem after some search and I would like to share my solution with you. First of all, the cause of my problem is actually the GLX version of Xming server and after I use VcXsrv instead, pangolin works just fine. FYI, I am also using pangolin on WSL as some of you guys did. So if any of you guys encountered the problem when using Xming on WSL, my solution is very likely to help.

Following is the explanation.
As the comment in this link (https://github.com/stevenlovegrove/Pangolin/issues/74#issuecomment-271779060) mentioned, the Pangolin needs GLX version >= 1.3. So I run "glxinfo" in the client to check the version and notice some info like the following: server glx version string: 1.2 client glx version string: 1.4

The glx version does not match and the server version is only 1.2. So I believe it is caused by Xming server. I use another Xserver: VcXsrv instead of Xming. And I checked the glxinfo again. The server and client versions are now both 1.4. Run HelloPangolin, Everything is fine now. And NO NEED To change "Pangolin/src/display/device/display_x11.cpp"

So if any you are using Xming like I do, probably you could switch to VcXsrv.

genghe1991 avatar Jan 18 '19 08:01 genghe1991

I got lucky with the solutions posted here: https://woojjang.tistory.com/52 Running on Ubuntu 20.04. It's a bit of a hack (the last suggestion there just uncomments the throw in case the glx versions don't match), but worked for me with glx versions 1.2 (server) and 1.4 (client).

Germanunkol avatar Feb 10 '21 07:02 Germanunkol

I solve the problem by reinstalling the nvidia driver and cuda . The issue encounter when our computer installs the version of nvidia driver and cuda that is not available with our device. Please the available version for your computer.

guchangjun avatar Apr 28 '21 06:04 guchangjun

nano ~/Pangolin/components/pango_windowing/src/display_x11.cpp correct as in https://woojjang.tistory.com/52 pointed out (right spelling below): GLXFBConfig* fbc = glXGetFBConfigs(display, DefaultScreen(display), &fbcount); and //throw std::runtime_error("Pangolin X11: Invalid GLX version. Require GLX >= 1.3");

no need GLX_SAMPLE_BUFFERS change. rebuild ONLY Pangolin not ORB_SLAM:

cmake -B build -GNinja
cmake --build build

zoldaten avatar Nov 15 '22 15:11 zoldaten

nano ~/Pangolin/components/pango_windowing/src/display_x11.cpp correct as in https://woojjang.tistory.com/52 pointed out (right spelling below): GLXFBConfig* fbc = glXGetFBConfigs(display, DefaultScreen(display), &fbcount); and //throw std::runtime_error("Pangolin X11: Invalid GLX version. Require GLX >= 1.3");

no need GLX_SAMPLE_BUFFERS change. rebuild ONLY Pangolin not ORB_SLAM:

cmake -B build -GNinja
cmake --build build

This way work!

lezee avatar Jan 17 '23 00:01 lezee