Hi all,
after updating my nixos and home-manager from 23.05 to 23.11 sway fails to start.
I’ve tried anything I found here and on GitHub, but it seems I’ve missed something…
Therefore any help is greatly appreciated!
The sway error is:
00:00:00.016 [ERROR] [wlr] [render/egl.c:204] EGL_EXT_platform_base not supported
00:00:00.016 [ERROR] [wlr] [render/egl.c:506] Failed to create EGL context
00:00:00.016 [ERROR] [wlr] [render/gles2/renderer.c:679] Could not initialize EGL
00:00:00.016 [ERROR] [wlr] [render/wlr_renderer.c:333] Could not initialize renderer
00:00:00.016 [ERROR] [wlr] [backend/drm/renderer.c:27] Failed to create renderer
00:00:00.016 [ERROR] [wlr] [backend/drm/backend.c:256] Failed to initialize renderer
00:00:00.016 [ERROR] [wlr] [backend/backend.c:228] Failed to create DRM backend
00:00:00.016 [ERROR] [wlr] [render/egl.c:204] EGL_EXT_platform_base not supported
00:00:00.017 [ERROR] [wlr] [render/egl.c:506] Failed to create EGL context
00:00:00.017 [ERROR] [wlr] [render/gles2/renderer.c:679] Could not initialize EGL
00:00:00.017 [ERROR] [wlr] [render/wlr_renderer.c:333] Could not initialize renderer
00:00:00.017 [ERROR] [sway/server.c:79] Failed to create renderer
I’m currently aiming to only use the intel GPU of my Dell XPS:
The duplicated sway is most likely an artifact of my many tries to fix the problem. Thanks for the catch! I removed it and it still shows the same behavior… Works on 23.05… doesnt on 23.11…
Ive just tried to run a plain weston on 23.11 and it did work. Thanks for that pointer. Do you have any idea what the exact problem could be that breaks sway but doesnt affect weston?
Share your channels and stuff with nix-shell -p nix-info --run "nix-info -m" while you’re at it, I had this same issue when I was messing with mixing unstable/23.11, though I think I resolved it by switching to the production driver.
Weston is not a wlroots compositor, and this ultimately boils down to wlroots calling an API that the nvidia driver doesn’t support (anymore? nvidia driver seems to have made this disappear, misbehave or otherwise change, but it’s not FOSS so it’s hard to know why or what changed). Iirc when I dug into this it looks like the next wlroots release will handle this issue more gracefully, not specifically for nvidia, but I couldn’t get sway to compile against a newer wlroots to confirm (it’s pinned to 0.16 for the moment, dunno why).
Thanks for your detailed response. I will try to test the nvidia production driver in the next days.
Nonetheless I was currently aiming for using the intel gpu as mentioned above. And according to my knowledge I have enabled the intel gpu only with the provided nix config. Do you have any ideas on why the intel gpu is not working?
Oh, sorry, I completely skimmed past that once I saw an nvidia gpu and assumed you were doing the usual prime offload thing!
At a glance, your config looks correct. I know others have run into this trying to use home-manager+sway in the past since they did not then enable hardware.opengl, which would have similar symptoms. Are you sure your system has hardware.opengl enabled properly? Have you rebooted since?
Any chance you could use the NixOS module to enable sway just for the sake of argument? You can still configure sway with home-manager if you use the NixOS module to install sway.
I finally took another try on this problem and tried to install sway via the NixOS module. But unfortunately this results in the same error for 23.11. (Testing it on 23.05 worked).
Yes I just double checked my hardware.opengl config: