Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blender flatpak don't use available 3D acceleration in VirtualGL accelerated VNC session #101

Open
zkeng opened this issue Mar 21, 2022 · 2 comments

Comments

@zkeng
Copy link

zkeng commented Mar 21, 2022

System Information
Operating system: Debian Buster
Graphics card: AMD RX 550

Blender Version
Broken: 3.1.0 installed as Flatpak from Flathub.
Worked: Don't know, but I think v2.9 worked.

Short description of error

Blender runs fine when started on the physical screen, but latest version(s) of Blender will not start when launched in a (TigerVNC) VNC session accelerated with VirtualGL.
VirtualGL is working as expected and the Blender flatpak seems to be the only app not working. Other OpenGL apps such as BricsCAD (BricsCAD RedSDK library will not run without working OpenGL) runs just fine.

This seems to be an issue related to Flatpak isolation: If I download the Blender binaries directly form blender.org and run the Blender executable; then Blender works as expected even when OpenGL acceleration is provided by VirtualGL.

Just by looking at the terminal output when trying to start Blender, it looks like the issue is related to "Using VirtualGL with setuid/setgid Executables" as described here in the VirtualGL documentation:
https://www.virtualgl.org/vgldoc/2_2_1/#hd0012
I am not a very good coder and my understanding of Flatpak is not good enough to allow me to understand where to put the LD_PRELOAD code in order to test if this is the issue.

Blender runs in 'softwaregl' mode if I change 'exec ./blender "$@"' to 'exec ./blender-softwaregl "$@"' in:
/var/lib/flatpak/app/org.blender.Blender/x86_64/stable/f3a7e6c0ed8105f3940b60c601171f1a656a82073dde1f48da1928911f9b2e3c/files/bin/blender
This indicates that the issue is really with 3D-acceleration (and it runs quite decent in software mode thanks to Ryzen 9 3950X ;)

Terminal output listed below...

Trying to start Blender:

user@host:~$ vglrun flatpak run org.blender.Blender
ERROR: ld.so: object 'libdlfaker.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libvglfaker.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libdlfaker.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libvglfaker.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libdlfaker.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libvglfaker.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libdlfaker.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libvglfaker.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
intern/ghost/intern/GHOST_WindowX11.cpp:136: X11 glXQueryVersion() failed, verify working openGL system!
initial window could not find the GLX extension
Writing: /tmp/blender.crash.txt

Direct rendering info:

user@host:~$ vglrun glxinfo | grep direct
direct rendering: Yes

GL_AMD_gpu_shader_int64, GL_AMD_multi_draw_indirect,
GL_ARB_derivative_control, GL_ARB_direct_state_access,
GL_ARB_draw_elements_base_vertex, GL_ARB_draw_indirect,
GL_ARB_indirect_parameters, GL_ARB_instanced_arrays,
GL_ARB_map_buffer_range, GL_ARB_multi_bind, GL_ARB_multi_draw_indirect,
GL_AMD_multi_draw_indirect, GL_AMD_performance_monitor,
GL_ARB_direct_state_access, GL_ARB_draw_buffers,
GL_ARB_draw_indirect, GL_ARB_draw_instanced, GL_ARB_enhanced_layouts,
GL_ARB_half_float_vertex, GL_ARB_indirect_parameters,
GL_ARB_multi_draw_indirect, GL_ARB_multisample, GL_ARB_multitexture,

OpenGL info:

user@host:~$ vglrun glxinfo | grep OpenGL
OpenGL vendor string: X.Org
OpenGL renderer string: Radeon RX 550 Series (POLARIS11, DRM 3.27.0, 4.19.0-17-amd64, LLVM 7.0.1)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.3.6
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.5 (Compatibility Profile) Mesa 18.3.6
OpenGL shading language version string: 4.50
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 18.3.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

Exact steps for others to reproduce the error

Install Blender (as a Flatpak from Flathub) on a Linux system with VirtualGL and try to start it in a 3D accelerated remote session:
$ vglrun flatpak run org.blender.Blender

@kevinsmia1939
Copy link
Collaborator

Could you try,

vglrun flatpak run --filesystem=host org.blender.Blender

@zkeng
Copy link
Author

zkeng commented Mar 22, 2022

Thank you for taking the time to respond!
I tried 'vglrun flatpak run --filesystem=host org.blender.Blender' and it fails with identical terminal output as if I try to start Blender without '--filesystem=host'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants