Malt icon indicating copy to clipboard operation
Malt copied to clipboard

glfw.create_window throws uncaught exception under Wayland

Open troethe opened this issue 4 years ago • 6 comments

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 avatar Nov 23 '21 06:11 troethe

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

troethe avatar Nov 23 '21 06:11 troethe

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.

pragma37 avatar Nov 23 '21 14:11 pragma37

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.

troethe avatar Nov 23 '21 14:11 troethe

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

pragma37 avatar Nov 23 '21 22:11 pragma37

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 avatar Nov 25 '21 06:11 troethe

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

troethe avatar Nov 25 '21 07:11 troethe