Comfy-Org / Comfy-Org/comfy-angle
Both ANGLE backends fail on Linux + NVIDIA (610.43.3.0, RTX 4090): `EGL_BAD_ATTRIBUTE` on default backend, `VK_ERROR_INITIALIZATION_FAILED` on Vulkan backend
- Dominant language
- Python
- Stars
- 0
- Forks
- 1
- Avg merge
- 9m
- Merged PRs (30d)
- 3
Description
**Environment**
- Arch Linux, KDE Plasma 6.7, Wayland
- GPU: NVIDIA GeForce RTX 4090, driver 610.43.3.0
- Vulkan works fine standalone (`vulkaninfo --summary`: instance 1.4.350, device fully conformant)
- Trigger: ComfyUI's GLSL shader nodes (`comfy_extras/nodes_glsl.py`)
**Summary**
Both ANGLE backends fail on this system, in different ways, while native NVIDIA EGL/GLES works fine for the identical call sequence.
- **Default backend** (`eglGetDisplay(EGL_DEFAULT_DISPLAY)`, reports as `Google Inc. (NVIDIA Corporation)`): initializes fine, and `eglChooseConfig` returns a fully valid config (`EGL_SURFACE_TYPE` includes `PBUFFER_BIT`, `EGL_RENDERABLE_TYPE` includes `ES3_BIT`). But `eglCreatePbufferSurface` with only `EGL_WIDTH`/`EGL_HEIGHT` fails with `EGL_BAD_ATTRIBUTE` — even with explicit `EGL_TEXTURE_FORMAT`/`EGL_TEXTURE_TARGET = EGL_NO_TEXTURE` added.
- **Explicit Vulkan backend** (`EGL_PLATFORM_ANGLE_TYPE_VULKAN_ANGLE`, same platform ComfyUI's own headless fallback requests): fails at `eglInitialize` itself with `VK_ERROR_INITIALIZATION_FAILED` (`-3`). Not a layer conflict (same failure with `VK_LOADER_LAYERS_DISABLE=~all~`), and Vulkan is otherwise healthy on this system.
**Workaround**
Replacing the bundled ANGLE binaries in the installed `comfy_angle` package with the system's native `libglvnd` dispatch libraries resolves it completely:
```bash
pacman -Qo /usr/lib/libEGL.so /usr/lib/libGLESv2.so
# both owned by libglvnd 1.7.0-3
cp /usr/lib/libEGL.so /site-packages/comfy_angle/libs/
cp /usr/lib/libGLESv2.so /site-packages/comfy_angle/libs/
```
This bypasses ANGLE's translation layer and routes straight to the native NVIDIA driver, which handles the same calls without error.
Flagging in case it's a known limitation worth documenting, or fixable via a different Linux ANGLE build in this package.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the reported GLSL trigger in `comfy_extras/nodes_glsl.py` and inspect how it uses the bundled libraries under `comfy_angle/libs/`. Reproduce the default and Vulkan backend failures on the described Linux/NVIDIA setup, comparing them with the reported native-library workaround. Done means establishing whether this is a fixable packaging/backend issue or a limitation that should be documented; the issue does not specify which outcome is wanted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, python
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 43/100