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

SwayFX Fails to Run on Ubuntu 24.04 #380

Open
FelixSchladt opened this issue Feb 16, 2025 · 10 comments
Open

SwayFX Fails to Run on Ubuntu 24.04 #380

FelixSchladt opened this issue Feb 16, 2025 · 10 comments
Labels
bug Something isn't working

Comments

@FelixSchladt
Copy link

FelixSchladt commented Feb 16, 2025

  • Swayfx Version:
    • 0.4

Hi All,

first, thanks for maintaining and providing SwayFx, I really would love to be able to run.
I am running Ubuntu 24.04 and compiled swayfx using nix, which worked fine.
Unfortunately I am unable to run it and get the following errors:

❯ nix develop .
felsch01@fw-felsch01:~/git/swayfx$ nix run .
00:00:00.003 [wlr] [render/egl.c:209] EGL_EXT_platform_base not supported
00:00:00.003 [wlr] [render/egl.c:524] Failed to create EGL context
00:00:00.003 [wlr] [render/fx_renderer/fx_renderer.c:607] Could not initialize EGL
00:00:00.003 [sway/server.c:150] Failed to create fx_renderer

This seems to be related to mesa/opengl

glxinfo -B

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: AMD (0x1002)
    Device: AMD Radeon 780M (radeonsi, gfx1103_r1, LLVM 19.1.1, DRM 3.57, 6.8.0-53-generic) (0x15bf)
    Version: 24.2.8
    Accelerated: yes
    Video memory: 2048MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
    VBO free memory - total: 1386 MB, largest block: 1386 MB
    VBO free aux. memory - total: 30975 MB, largest block: 30975 MB
    Texture free memory - total: 1386 MB, largest block: 1386 MB
    Texture free aux. memory - total: 30975 MB, largest block: 30975 MB
    Renderbuffer free memory - total: 1386 MB, largest block: 1386 MB
    Renderbuffer free aux. memory - total: 30975 MB, largest block: 30975 MB
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 2048 MB
    Total available memory: 33093 MB
    Currently available dedicated video memory: 1386 MB
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon 780M (radeonsi, gfx1103_r1, LLVM 19.1.1, DRM 3.57, 6.8.0-53-generic)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.2.8-1ubuntu1~24.04.1
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 24.2.8-1ubuntu1~24.04.1
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 24.2.8-1ubuntu1~24.04.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Did anyone manage to get it running on ubuntu? Is this a bug or a bad setup?
SwayWm from the ubuntu repositories runs just fine on my system.

I would really appreciate any help, greetings Felix :)

@FelixSchladt FelixSchladt added the bug Something isn't working label Feb 16, 2025
@ErikReider
Copy link
Collaborator

You're using nix to run it, right? Does it run without nix?

@FelixSchladt
Copy link
Author

Same issue, it does not make a difference wether I run it from inside the nix devshell or in the system env:

❯ swayfx
00:00:00.003 [wlr] [render/egl.c:209] EGL_EXT_platform_base not supported
00:00:00.003 [wlr] [render/egl.c:524] Failed to create EGL context
00:00:00.003 [wlr] [render/fx_renderer/fx_renderer.c:607] Could not initialize EGL
00:00:00.003 [sway/server.c:145] Failed to create fx_renderer

@ErikReider
Copy link
Collaborator

Seems like you're missing a driver? You're rocking an AMD IGPU, so Mesa is fine. I'm guessing that trying to run regular Sway is also a problem? What Mesa drivers do you have installed?

@FelixSchladt
Copy link
Author

FelixSchladt commented Feb 16, 2025

I am currently using sway from the Ubuntu repositories and it works just fine.

My installed mesa driver is Mesa 24.2.8-1ubuntu1~24.04.1

glxinfo -B
[...]
OpenGL version string: 4.6 (Compatibility Profile) Mesa 24.2.8-1ubuntu1~24.04.1
[...]
``

@WillPower3309
Copy link
Owner

WillPower3309 commented Feb 16, 2025

Unfortunately a known nix issue, I should add a bit to the README about it. This happens when the nix version of egl is out of sync with your system's version. NixGL is the solution: https://github.com/nix-community/nixGL

@WillPower3309
Copy link
Owner

Feel free to reopen or add more info if nixGL doesn't work!

@ErikReider
Copy link
Collaborator

@FelixSchladt
Copy link
Author

Thanks for the tip with NixGL, unfortunately this still does not fix the issue for me

> nix profile install github:guibou/nixGL --impure
> nixGL -- swayfx
amdgpu: unknown (family_id, chip_external_rev): (148, 10)
libEGL warning: egl: failed to create dri2 screen
00:00:00.023 [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to create screen"
amdgpu: unknown (family_id, chip_external_rev): (148, 10)
libEGL warning: egl: failed to create dri2 screen
00:00:00.028 [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to create screen"
00:00:00.028 [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "eglInitialize"
00:00:00.028 [wlr] [render/egl.c:269] Failed to initialize EGL
00:00:00.028 [wlr] [render/egl.c:572] Failed to initialize EGL context
00:00:00.028 [wlr] [render/fx_renderer/fx_renderer.c:607] Could not initialize EGL
00:00:00.028 [sway/server.c:145] Failed to create fx_renderer

@WillPower3309 WillPower3309 reopened this Feb 17, 2025
@ErikReider
Copy link
Collaborator

Thanks for the tip with NixGL, unfortunately this still does not fix the issue for me

nix profile install github:guibou/nixGL --impure
nixGL -- swayfx
amdgpu: unknown (family_id, chip_external_rev): (148, 10)
libEGL warning: egl: failed to create dri2 screen
00:00:00.023 [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to create screen"
amdgpu: unknown (family_id, chip_external_rev): (148, 10)
libEGL warning: egl: failed to create dri2 screen
00:00:00.028 [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to create screen"
00:00:00.028 [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "eglInitialize"
00:00:00.028 [wlr] [render/egl.c:269] Failed to initialize EGL
00:00:00.028 [wlr] [render/egl.c:572] Failed to initialize EGL context
00:00:00.028 [wlr] [render/fx_renderer/fx_renderer.c:607] Could not initialize EGL
00:00:00.028 [sway/server.c:145] Failed to create fx_renderer

At least a new error 🤷

@markstos
Copy link
Contributor

@ErikReider You could try the version from Git--- SwayFX has been rebased off a newer Sway version, 1.10.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants