Skip to content

'cosmic-panel: EGL render failures (eglExportDMABUFImageMESA BAD_MATCH) + cosmic-comp texture-import failures on NVIDIA; session can freeze when panel fails to respawn' #3815

Description

@jackmullen

name: Bug report

about: COSMIC panel/dock stops rendering with EGL errors on NVIDIA (Pascal TITAN X); compositor texture-import failures break remote capture (Sunshine) and can freeze the session

title: 'cosmic-panel: EGL render failures (eglExportDMABUFImageMESA BAD_MATCH) + cosmic-comp texture-import failures on NVIDIA; session can freeze when panel fails to respawn'

labels: bug
assignees: ''


Describe the bug
On an NVIDIA Pascal GPU (TITAN X, 12GB, driver 580.173.02, nvidia-drm modeset enabled, Wayland), the panel/dock intermittently stops rendering or dies outright. pkill cosmic-panel usually restores it in ~1s, but sometimes the panel does NOT respawn and the desktop is frozen until the session is terminated or the machine rebooted. The failures also break remote display capture: Sunshine serves a stale frozen frame to Moonlight clients during episodes even when the machine is otherwise healthy.

To Reproduce
Intermittent; difficult to trigger on demand, but strongly correlated with:

  1. GPU memory pressure: TTS/AI workloads raise baseline VRAM to 5.5-6GB with spikes to 10-12GB of the 12GB card; "Failed to render" events cluster on high-VRAM days (53, 135, 22 per day) vs. near-zero on low-VRAM days.
  2. It also occurs at low VRAM (observed at 1.7GB used), so VRAM pressure aggravates but is not required.
  3. Remote capture in use (Sunshine host, Moonlight client) reproduces the frozen-stream symptom reliably when render failures fire.

Expected behavior

  • The panel should either render correctly or be restarted reliably by cosmic-session supervision.
  • A failed texture import in cosmic-comp should not leave the session frozen when the panel can't respawn.
  • Capture clients (Sunshine) should recover when the output surface changes instead of serving a stale frame.

Log excerpts (user journal, journalctl --user)

cosmic-panel: [EGL] 0x3009 (BAD_MATCH) eglExportDMABUFImageMESA: EGL_BAD_MATCH error:
  In eglExportDMABUFImageMESA: EGLImage can't be exported to dma-buf
cosmic-panel: Erroneous EGL call didn't set EGLError
cosmic-panel: Failed to render, error: An unknown error (0)
cosmic-panel: [EGL] 0x300c (BAD_PARAMETER) eglDupNativeFenceFDANDROID: EGL_BAD_PARAMETER error:
  In eglDupNativeFenceFDANDROID: EGLSync has no current file descriptor
cosmic-panel: Failed to render, error: An unknown error (0)
cosmic-comp: Failed to render texture 0x..., import for wrong devices
  DrmNode { dev: 57984, ty: Render }? MultiTextureInternal { ... }
cosmic-comp: Failed to destroy old mode property blob: No such file or directory (os error 2)
cosmic-comp: Failed to set xwayland primary output: The provided output wasn't known to Xwayland

Also seen when idle:

cosmic-panel: [EGL] 0x3004 (BAD_ATTRIBUTE) eglCreateSyncKHR: EGL_BAD_ATTRIBUTE error:
  In eglCreateSyncKHR: EGL_SYNC_NATIVE_FENCE_FD_ANDROID specified valid fd
  but EGL_SYNC_STATUS is also being set

Under heavy GPU pressure, kernel driver faults precede episodes:

kernel: NVRM: Xid (PCI:0000:9e:00): 56, CMDre ... (repeated)

Desktop (please complete the following information):

  • OS: Pop!_OS 24.04 (noble), kernel 7.0.11-76070011-generic
  • COSMIC: cosmic-session 1.0.01783021552, cosmic-comp 0.11785355703, cosmic-panel 0.1.0~1785272608
  • GPU: NVIDIA TITAN X (Pascal, 12GB, PCI 9e:00), driver 580.173.02, CUDA 13.0
  • Stack: nvidia-drm + nvidia modeset enabled for Wayland; Sunshine capturing COSMIC output

Additional context

  • Minute-level monitoring (GPU mem, load, kernel events) over several weeks shows the render-failure count tracks VRAM pressure, but low-VRAM occurrences prove it is not purely an OOM-style problem.
  • cosmic-comp keeps running during episodes; only the panel's (or a texture's) rendering fails. When the panel fails to respawn after several attempts, terminating the session is the only way out.
  • Workaround in use: a watchdog that pkill -x cosmic-panel after N render failures restores the dock in ~1s; when "did NOT respawn" is observed, session restart is required.
  • Question: when a texture import fails in cosmic-comp, can the affected surface be invalidated so output (and capture clients like Sunshine) recover automatically?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions