Closed ShilangChen1011 closed 6 months ago
I've run into a similar issue on WSL2 Ubuntu 22, with GLSL support up to 4.20. I'm in the process of trying to downgrade the shader but if an earlier solution is available I'm all ears!
Thanks for your work.
Hi @earc-chen, it looks like your opengl version is too low. You'll need at least GLSL 4.3 to run the ellipsoid shader. We've not encountered this issue but these seem to be related: https://github.com/mp3guy/ElasticFusion/issues/188 https://github.com/mp3guy/ElasticFusion/issues/96 It looks like that if you have Nvidia GPU and intel GPU, you need to make sure that Nvidia GPU is selected
Hi @koktavy for WSL2, we don't have the setup to replicate, but this might be useful: https://github.com/microsoft/WSL/issues/9753#issuecomment-1459626307 Hope this helps!
I hadn't seen that solution. It doesn't seem to have an effect in this case.
I've built a custom kernel to enable camera support, so that may have broken the connection to the GPU (NVIDIA 3090).
$LIBGL_ALWAYS_SOFTWARE=true glxinfo -B
name of display: :0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Mesa (0xffffffff)
Device: llvmpipe (LLVM 15.0.7, 256 bits) (0xffffffff)
Version: 23.2.1
Accelerated: no
Video memory: 32056MB
Unified memory: yes
Preferred profile: core (0x1)
Max core profile version: 4.5
Max compat profile version: 4.5
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
VBO free memory - total: 31 MB, largest block: 31 MB
VBO free aux. memory - total: 24582 MB, largest block: 24582 MB
Texture free memory - total: 31 MB, largest block: 31 MB
Texture free aux. memory - total: 24582 MB, largest block: 24582 MB
Renderbuffer free memory - total: 31 MB, largest block: 31 MB
Renderbuffer free aux. memory - total: 24582 MB, largest block: 24582 MB
Memory info (GL_NVX_gpu_memory_info):
Dedicated video memory: 1194463 MB
Total available memory: 1226520 MB
Currently available dedicated video memory: 31 MB
OpenGL vendor string: Mesa
OpenGL renderer string: llvmpipe (LLVM 15.0.7, 256 bits)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.5 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2
OpenGL shading language version string: 4.50
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.2.1-1ubuntu3.1~22.04.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
$ python slam.py --config configs/mono/tum/fr3_office.yaml
WARNING: CPU random generator seem to be failing, disabling hardware random number generation
WARNING: RDRND generated: 0xffffffff 0xffffffff 0xffffffff 0xffffffff
MonoGS: saving results in results/datasets_tum/2024-03-06-15-31-26
WARNING: CPU random generator seem to be failing, disabling hardware random number generation
WARNING: RDRND generated: 0xffffffff 0xffffffff 0xffffffff 0xffffffff
WARNING: CPU random generator seem to be failing, disabling hardware random number generation
WARNING: RDRND generated: 0xffffffff 0xffffffff 0xffffffff 0xffffffff
FEngine (64 bits) created at 0x545dfd00 (threading is enabled)
FEngine resolved backend: OpenGL
Process Process-4:
Traceback (most recent call last):
File "/home/tavius/miniconda3/envs/MonoGS/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
self.run()
File "/home/tavius/miniconda3/envs/MonoGS/lib/python3.7/multiprocessing/process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File "/home/tavius/MonoGS/gui/slam_gui.py", line 687, in run
win = SLAM_GUI(params_gui)
File "/home/tavius/MonoGS/gui/slam_gui.py", line 66, in __init__
self.g_renderer = OpenGLRenderer(self.g_camera.w, self.g_camera.h)
File "/home/tavius/MonoGS/gui/gl_render/render_ogl.py", line 71, in __init__
os.path.join(cur_path, "shaders/gau_frag.glsl"),
File "/home/tavius/MonoGS/gui/gl_render/util.py", line 90, in load_shaders
shaders.compileShader(vertex_shader, GL_VERTEX_SHADER),
File "/home/tavius/miniconda3/envs/MonoGS/lib/python3.7/site-packages/OpenGL/GL/shaders.py", line 241, in compileShader
shaderType,
OpenGL.GL.shaders.ShaderCompilationError: ("Shader compile failure (0): b'0:1(10): error: GLSL 4.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 4.00, 4.10, 4.20, 1.00 ES, 3.00 ES, and 3.10 ES\\n'", [b'#version 430 core\n\n#define SH_C0 0.28209479177387814f\n#define SH_C1 0.4886025119029199f\n\n#define SH_C2_0 1.0925484305920792f\n#define SH_C2_1 -1.0925484305920792f\n#define
...
Though I can run nvidia-smi
with a detected GPU
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.60.01 Driver Version: 551.76 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 3090 On | 00000000:09:00.0 On | N/A |
| 0% 43C P8 47W / 390W | 1971MiB / 24576MiB | 8% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 22 G /Xwayland N/A |
+-----------------------------------------------------------------------------------------+
I see, I'm not too familiar with WSL so I'm not sure if I can help much here. Have you tried running with --eval so it runs without GUI? (just to confirm that it's only the glsl versions problem, not Cuda etc)
Seems there's more going wrong than just GLSL for me. It's ok if there's not an easy solve here, I understand that I'm working outside of the expected configuration for this project.
$ python slam.py --config configs/mono/tum/fr3_office.yaml --eval
WARNING: CPU random generator seem to be failing, disabling hardware random number generation
WARNING: RDRND generated: 0xffffffff 0xffffffff 0xffffffff 0xffffffff
MonoGS: Running MonoGS in Evaluation Mode
MonoGS: Following config will be overriden
MonoGS: save_results=True
MonoGS: use_gui=False
MonoGS: eval_rendering=True
MonoGS: use_wandb=True
MonoGS: saving results in results/datasets_tum/2024-03-06-17-37-58
wandb: (1) Create a W&B account
wandb: (2) Use an existing W&B account
wandb: (3) Don't visualize my results
wandb: Enter your choice: 3
wandb: You chose "Don't visualize my results"
wandb: Tracking run with wandb version 0.16.3
wandb: W&B syncing is set to `offline` in this directory.
wandb: Run `wandb online` or set WANDB_MODE=online to enable cloud syncing.
Traceback (most recent call last):
File "slam.py", line 252, in <module>
slam = SLAM(config, save_dir=save_dir)
File "slam.py", line 110, in __init__
self.frontend.run()
File "/home/tavius/MonoGS/utils/slam_frontend.py", line 361, in run
monocular=self.monocular,
File "/home/tavius/MonoGS/utils/eval_utils.py", line 70, in eval_ate
latest_frame_idx = kf_ids[-1] + 2 if final else kf_ids[-1] + 1
IndexError: list index out of range
wandb: You can sync this run to the cloud by running:
wandb: wandb sync /home/tavius/MonoGS/wandb/offline-run-20240306_173801-zuq7iwap
wandb: Find logs at: ./wandb/offline-run-20240306_173801-zuq7iwap/logs
WARNING: CPU random generator seem to be failing, disabling hardware random number generation
WARNING: RDRND generated: 0xffffffff 0xffffffff 0xffffffff 0xffffffff
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/tavius/miniconda3/envs/MonoGS/lib/python3.7/multiprocessing/spawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "/home/tavius/miniconda3/envs/MonoGS/lib/python3.7/multiprocessing/spawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
File "/home/tavius/miniconda3/envs/MonoGS/lib/python3.7/multiprocessing/synchronize.py", line 110, in __setstate__
self._semlock = _multiprocessing.SemLock._rebuild(*state)
FileNotFoundError: [Errno 2] No such file or directory
[W CudaIPCTypes.cpp:15] Producer process has been terminated before all shared CUDA tensors released. See Note [Sharing CUDA tensors]
The successful operation can be achieved by adding the following environment variable settings in the console.
export MESA_GL_VERSION_OVERRIDE=4.3
@koktavy Sorry, I'm not familiar with wsl so I don't think we can help here.
WARNING: CPU random generator seems to be failing, disabling hardware random number generation
WARNING: RDRND generated: 0xffffffff 0xffffffff 0xffffffff 0xffffffff
is not from MonoGS but from your machine and with a quick search, it seems to be something to do with your BIOS? https://stackoverflow.com/questions/66290789/how-to-solve-cpu-random-generator-seem-to-be-failing-disabling-hardware-random
Great job! My system is Ubuntu 20.04, and all the necessary Python packages are installed without any other issues. However, the visualization interface is not showing up. How can I solve this problem?