schrodinger / pymol-open-source

Open-source foundation of the user-sponsored PyMOL molecular visualization system.
https://pymol.org/
Other
1.15k stars 275 forks source link

linux pymol vs egl support #201

Open jwhowarth opened 2 years ago

jwhowarth commented 2 years ago

What is the outlook for getting pymol to work with egl rather than glx on linux? On Ubuntu Impish 21.10 with the new nvidia 495.44 drivers installed and using wayland, I find that pymol built against libglew 2.1.0-4 or the Ubuntu Jammy 22.04 proposed pymol build against libglew 2.2.0-4 both fail to initialize glew when pymol is started after setting...

$ export QT_XCB_GL_INTEGRATION=xcb_egl
$ pymol
<string>:1: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
 PyMOL(TM) Molecular Graphics System, Version 2.4.0.
 Copyright (c) Schrodinger, LLC.
 All Rights Reserved.

    Created by Warren L. DeLano, Ph.D. 

    PyMOL is user-supported open-source software.  Although some versions
    are freely available, PyMOL is not in the public domain.

    If PyMOL is helpful in your work or study, then please volunteer 
    support for our ongoing efforts to create open and affordable scientific
    software by purchasing a PyMOL Maintenance and/or Support subscription.

    More information can be found at "http://www.pymol.org".

    Enter "help" for a list of commands.
    Enter "help <command-name>" for information on a specific command.

 Hit ESC anytime to toggle between text and graphics.

No module named 'Pmw'
Unable to initialize plugin 'apbs_tools' (pmg_tk.startup.apbs_tools).
 There was an error intializing GLEW.  Basic graphics, including
 shaders and volumes may be unavailable.
 GLEW-Error: Unknown error
 OpenGL graphics engine:
  GL_VENDOR:   Mesa/X.org
  GL_RENDERER: llvmpipe (LLVM 12.0.1, 256 bits)
  GL_VERSION:  3.1 Mesa 21.2.2
 Detected 12 CPU cores.  Enabled multithreaded rendering.

I assume that we still need additional glew fixes out of glew git such as...

https://github.com/nigels-com/glew/commit/715afa0ff56c0eb12c23938b80aa2813daa10d81 https://github.com/nigels-com/glew/commit/8e2e31e69bb655717bea6c81a2d36b3228acdae5 https://github.com/nigels-com/glew/commit/062067f2bad84610622f25d03265d22e4872d55c

Will the changes required to support QT_XCB_GL_INTEGRATION=xcb_egl be limited to glew or will the build and linkage of pymol also have to change?

JarrettSJohnson commented 2 years ago

By chance do any other apps using egl work with that setup?

jwhowarth commented 2 years ago

Firefox 94.0 would be one although it is unclear if you still have to set gfx.x11-egl.force-enabled to true for nvidia.