stevenlovegrove / Pangolin

Pangolin is a lightweight portable rapid development library for managing OpenGL display / interaction and abstracting video input.
MIT License
2.38k stars 853 forks source link

Pangolin X11: Unable to retrieve framebuffer options on Xming Server #242

Closed SkyRiderMike closed 4 years ago

SkyRiderMike commented 7 years ago

I found this issue on https://github.com/stevenlovegrove/Pangolin/issues/74#issuecomment-178248684, but i try the solution which is not useful on my computer.

I still meet this problem at latest stable build. My environment is running on Bash Ubuntu on Windows 10 and Xming Server. The glxgears application runs well on my computer. I can even show an opencv window in my program. But pangolin fails..

The code compiled successfully, but still have problem with "Pangolin X11: Unable to retrieve framebuffer options ". What should I do ?

stevenlovegrove commented 7 years ago

Pangolin can actually build natively on Windows if you prefer (rather than using an X server). I'm afraid I don't have any experience with your configuration. I think you will have to debug that bit of code yourself (display_x11.cpp, line 116)

jasminezz commented 7 years ago

@SkyRiderMike I have the same error at the latest stable build. My environment is running on Bash Ubuntu 16.04 on Windows 7 and Xming Server. Have u solved the problem?

Pratapabhay commented 7 years ago

@jasminezz I have similar problem at the latest build. Were you able to rectify the problem?

a5192179 commented 7 years ago

I change Pangolin\src\display\device\display_x11.cpp and solve this problem.You can try: change “GLX_DOUBLEBUFFER , glx_doublebuffer ? True : False,” to “GLX_DOUBLEBUFFER , False, //glx_doublebuffer ? True : False,” then, cmake,make,sudo make install that's all.

Andreachen0707 commented 6 years ago

@a5192179 Hi could you explain your solution in detail? I'm working on subsystem on Windows 10 and I encounter the exact same error. I tried your solution but it still cannot work.

Thanks in advance!

siddhya commented 6 years ago

Same here. Working on Ubuntu (18.04) for Windows with Xming server. I tried the above solution but it does not work.

g-prabakaran commented 6 years ago

I found a quick solution for this issue. Replace the line below in display_x11.cpp as follows. //GLXFBConfig fbc = glXChooseFBConfig(display, DefaultScreen(display), visual_attribs, &fbcount); GLXFBConfig fbc = glXGetFBConfigs(display, DefaultScreen(display), &fbcount);

This will still give a warning "Framebuffer with requested attributes not available. Using available framebuffer. You may see visual artifacts.". But it will be able to make the code running.

xuwh15 commented 6 years ago

I am also facing the same problem with an ubuntu 16.04 virtual machine on google cloud. Any solutions?

xuwh15 commented 6 years ago

@a5192179 Tried your solution, still not working...

xuwh15 commented 6 years ago

@GaneshPrabakaran Are you using NVIDIA driver for fbconfig? How can I check my FBConfigs on linux system?

siddhya commented 6 years ago

I think it is an XServer version issue. It was not working for XLaunch on Windows but worked for MobaXterm which uses the latest version.

g-prabakaran commented 6 years ago

@xuwh15 I am running in CPU and do not have NVIDIA driver. Xming for windows automatically resize the frame buffer.

The method (glXChooseFBConfig) to retrieve fbconfigs with specific visual attributes returns null. Similarly, glXGetFBConfigs also do not provide any values for the attributes samples and sample buffer. Hence the warning message "Framebuffer with requested attributes not available. Using available framebuffer. You may see visual artifacts". glXGetFBConfigs returns some list of GLXFBConfig which helps resolve the error compared to glXChooseFBConfig which returns null.

xuwh15 commented 6 years ago

@GaneshPrabakaran I have tried using glXGetFBConfigs and the same error still does not disappear. I tried to check my framebuffer settings but I do not have a /dev/fb0 on my ubuntu 16.04 virtual machine, I have googled it and most of the solutions worked for 12.04 and previous versions, I am not sure whether they worked for 16.04.

xuwh15 commented 6 years ago

@GaneshPrabakaran Also, my glXGetFBConfigs still return the same error Pangolin X11: Unable to retrieve framebuffer options

g-prabakaran commented 6 years ago

@xuwh15 I am using ubuntu 16.04 in windows 10 bash along with xming.

siddhya commented 6 years ago

@GaneshPrabakaran Use MobaXterm instead of Xming. That fixed the issue for me.

xuwh15 commented 6 years ago

@GaneshPrabakaran I have checked the glxgetfbconfigs, and apparently there is no available fbconfigs to display, also the hellopangolin project does not work well on my virtual machine as well, is there anyway to install or set a frame buffer on ubuntu 16.04 system?

sumanthumesh commented 5 years ago

For those who are using SSH to run the code, I recommend simply using mobaXterm instead of Xming

HaoMyWorld commented 5 years ago

You can try: change Pangolin\src\display\device\display_x11.cpp L123-L124 //GLX_SAMPLE_BUFFERS , glx_sample_buffers, //GLX_SAMPLES , glx_sample_buffers > 0 ? glx_samples : 0,

yiakwy commented 4 years ago

Please close this isssue. Most likely you are using NV driver and not doing good. Reinstalling NV driver should resolve the display problems.

liubamboo commented 3 years ago

when I run orbslam2 on ubuntu server connected by ssh and xmanager. I have the same bug and I try the solution above all, but the bug still exist.

my bug info is terminate called after throwing an instance of 'std::runtime_error' what(): Pangolin X11: Unable to retrieve framebuffer options

anybody can help?

maryraymond commented 9 months ago

I think it is an XServer version issue. It was not working for XLaunch on Windows but worked for MobaXterm which uses the latest version.

Thnx siddhya this solved my problem