Skip to content

Fyne x11 apps crash on display idle->wake change #5899

@qbit

Description

@qbit

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

At least on KDE's X wayland stuff, I have noticed that apps which have a visible window and a system tray icon when a display goes to an idle state will crash with something similar to below:

X Error of failed request:  BadRRCrtc (invalid Crtc parameter)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  20 (RRGetCrtcInfo)
  Crtc id in failed request: 0x53e
  Serial number of failed request:  684
  Current serial number in output stream:  684

I have noticed this in my own apps and it has also been reported supersonic: dweymouth/supersonic#412

As reported in the supersonic issue, it seems to be caused by glfw. I have a manually patched ./vendor/github.com/go-gl/glfw/v3.3/glfw/glfw/src/x11_monitor.c which seems to help the situation, but doesn't fully resolve it (likely my patch isn't fully covering all the possible branches).

How to reproduce

  • Run the fyne demo
  • After it starts select the progress bar demo
  • Lock screen / wait for idle to happen
  • Wake screen to find crash
go run fyne.io/demo@latest
go: downloading fyne.io/demo v1.6.0
go: downloading fyne.io/fyne/v2 v2.6.0
go: downloading github.com/alecthomas/chroma/v2 v2.15.0
go: downloading github.com/dlclark/regexp2 v1.11.4
2025/08/14 09:45:33 Lifecycle: Started
2025/08/14 09:45:33 Lifecycle: Entered Foreground
2025/08/14 09:45:49 Lifecycle: Exited Foreground
X Error of failed request:  BadRRCrtc (invalid Crtc parameter)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  20 (RRGetCrtcInfo)
  Crtc id in failed request: 0x55b
  Serial number of failed request:  1299
  Current serial number in output stream:  1299
exit status 1

Screenshots

No response

Example code

See demo

Fyne version

2.6.0

Go compiler version

1.24.5

Operating system and version

NixOS unstable

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS:LinuxTickets affecting only LinuxbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions