ahrm / sioyek

Sioyek is a PDF viewer with a focus on textbooks and research papers
https://sioyek.info/
GNU General Public License v3.0
6.99k stars 230 forks source link

Fails to create EGL Context on Asahi with GPU Driver #585

Open god-shatter opened 1 year ago

god-shatter commented 1 year ago

Hey, thanks for the awesome software. I realize this is pretty cutting edge and maybe not worth your time but I can't get sioyek to start on asahi's new edge kernel with GPU support on my M1 Pro. It fails like this after building fine.

~/tools/sioyek (main) » ./build/sioyek                                        
QWaylandGLContext: failed to create EGLContext, error=3009
default_config_path: /home/alex/tools/sioyek/build/prefs.config
default_keys_path: /home/alex/tools/sioyek/build/keys.config
user_config_path: [ 0 ] /etc/xdg/sioyek/prefs_user.config
user_config_path: [ 1 ] /home/alex/.config/sioyek/prefs_user.config
user_config_path: [ 2 ] /home/alex/.local/share/Sioyek/prefs_user.config
user_config_path: [ 3 ] /home/alex/.config/sioyek/prefs_user.config
user_keys_path: [ 0 ] /etc/xdg/sioyek/keys_user.config
user_keys_path: [ 1 ] /home/alex/.config/sioyek/keys_user.config
user_keys_path: [ 2 ] /home/alex/.local/share/Sioyek/keys_user.config
user_keys_path: [ 3 ] /home/alex/.config/sioyek/keys_user.config
database_file_path: /home/alex/.local/share/Sioyek/test.db
local_database_file_path: /home/alex/.local/share/Sioyek/local.db
global_database_file_path: /home/alex/.local/share/Sioyek/shared.db
tutorial_path: /home/alex/.local/share/Sioyek/tutorial.pdf
last_opened_file_address_path: /home/alex/.local/share/Sioyek/last_document_path.txt
shader_path: /home/alex/tools/sioyek/build/shaders
Creating shared memory block...
Shared memory created: this is the primary application.
Starting IPC server...
IPC server started.
QWaylandGLContext: failed to create EGLContext, error=3009
QOpenGLWidget: Failed to create context
QWaylandGLContext: failed to create EGLContext, error=3009
QOpenGLWidget: Failed to create context
QWaylandGLContext: failed to create EGLContext, error=3009
QOpenGLWidget: Failed to create context
QWaylandGLContext: failed to create EGLContext, error=3009
QOpenGLWidget: Failed to create context
QWaylandGLContext: failed to create EGLContext, error=3009
QOpenGLWidget: Failed to create context
QWaylandGLContext: failed to create EGLContext, error=3009
qt.qpa.backingstore: composeAndFlush: QOpenGLContext creation failed
QWaylandGLContext: failed to create EGLContext, error=3009
qt.qpa.backingstore: composeAndFlush: makeCurrent() failed
god-shatter commented 1 year ago

Messed around with it more, I can get it not to error by just naively changing the opengl versions to 2.1 (in main.cpp and pdf_viewer/pdf_view_opengl_widget.cpp) then it all loads without errors and seems to be able to open the open file dialog, but it doesn't actually display pdfs. BTW this is on wayland, so guessing it just doesn't work :(