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

glfw.create_window throws uncaught exception under Wayland #173

Open
troethe opened this issue Nov 23, 2021 · 6 comments
Open

glfw.create_window throws uncaught exception under Wayland #173

troethe opened this issue Nov 23, 2021 · 6 comments

Comments

@troethe
Copy link

troethe commented Nov 23, 2021

See line glfw.GLFWError: (65544) b'Wayland: Focusing a window requires user interaction' in the attached log.
This prevents the add-on from working at all.

Also see this issue and this one.

malt 2021-11-23(07-18)-censored.log

@troethe
Copy link
Author

troethe commented Nov 23, 2021

I think the solution here would be to change glfw.ERROR_REPORTING = True to "warn" or "log" instead.

@pragma37
Copy link
Member

Does Malt work for you if you set glfw.ERROR_REPORTING to log?

The last time I tested Wayland there were a lot of weird errors.

@troethe
Copy link
Author

troethe commented Nov 23, 2021

Not quite. I have managed to get rid of all the remaining errors in the logs by setting the environment variable PYOPENGL_PLATFORM to "egl" and I think I managed to get it to render something at some point, but I sadly can't reproduce this right now. I'll maybe do a couple of more tests tomorrow.
I can understand though, if you want to wait with this until you've got confirmation that this is actually feasible on Wayland.

@pragma37
Copy link
Member

Please keep me updated if you manage to get it working,
I'd like to improve Linux support but sometimes can get tricky.

@troethe
Copy link
Author

troethe commented Nov 25, 2021

Ok, I managed to get the rendering working when pressing F12 I think:
render
On a normal gnome installation you have to set PYOPENGL_PLATFORM="egl" and it works.
However viewport rendering seems broken:
viewport-doesnt-work

Also, when using sway, which is a tiling window manager, I have to click into the transparent Malt window every time, before it actually starts rendering. Maybe this has something to do with iconification of windows not being a feature in this window manager.

@troethe
Copy link
Author

troethe commented Nov 25, 2021

Nevermind, it seems like you have to PYOPENGL_PLATFORM=osmesa blender instead. I think this has to do with the fact, that blender still uses xwayland by default.

Anyways: On a usual Debian installation with glfw.ERROR_REPORT="log" and the environment variable PYOPENGL_PLATFORM="osmesa" I now also got the viewport rendering to work:
viewport-works

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