[How to Run Offline Perception Visualizer]libGL error: failed to load driver: swrast
I try to run offline perception visualizer according to the document how_to_run_offline_perception_visualizer.md.
When it came to the last step, run the visualizer with command:
/apollo/bazel-bin/modules/perception/tool/offline_visualizer_tool/offline_lidar_visualizer_tool
There is no window jumping out, error messages:
The visualization window did not come out because the libGL error: failed to load driver:swrast
By checking the glfw_viewer.cc code,
`bool GLFWViewer::WindowInit() {
if (!glfwInit()) {
AERROR << "Failed to initialize glfw !\n";
return false;
}
window_ = glfwCreateWindow(win_width_, win_height_, "opengl_visualizer",
nullptr, nullptr);
if (window_ == nullptr) {
AERROR << "Failed to create glfw window!\n";
glfwTerminate();
return false;
}`
It seems that the function glfwCreateWindow gives the libGL error message, it can't create a window.
I think it may be related to the GPU driver. But I have installed the GPU driver in docker according to
how_to_run_perception_module_on_your_local_computer.md. I've used the deviceQuery to test it, the result is:
So what's the problem?
Do you use command "./NVIDIA-Linux-x86_64-375.39.run --no-opengl-files -a -s" on your host ubuntu 14.04?
@chucklqsun My host ubuntu is 16.04, and the NVIDIA driver is 384.90, I installed the driver using .run file without any parameter, and the driver in docker is 384.90, I install it with parameter "--no-opengl-files -a -s" Do you mean that I need to install the driver again on my host pc with parameter "--no-opengl-files -a -s"?
Yes, use version 375.39 and with parameters. And if it still does not work, you may use ubuntu 14.04, which is recommended by Apollo Team.
@chucklqsun So you think that maybe the GPU driver version problem? I remember that the doc says that it's not essential to use the 375.39, you just need to keep the GPU driver version in docker is the same to the one in host.
@hzdsdhr Maybe you can refer here: https://github.com/ApolloAuto/apollo/issues/1687
- My host machine is also Ubuntu16.04
$ uname -a
Linux xxxxxx 4.4.0-104-generic #127-Ubuntu SMP Mon Dec 11 12:16:42 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
- My host and docker Nvidia driver version are both
384.98, not recommend375.39
xxx@in_dev_docker:/apollo$ nvidia-smi
Mon Dec 18 11:52:48 2017
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.98 Driver Version: 384.98 |
|-------------------------------+----------------------+----------------------+
@hzdsdhr did you solve your issue? if so, could you share your solution?
@hzdsdhr @hadiTab
Any updates? did anyone solve this problem?
reinstalling drivers with --no-opengl-files fixed the problem for me