r/flutterhelp • • 7h ago

OPEN Flutter 3.50 Linux app shows black screen on Sway/Wayland, but works on Ubuntu desktop

7 Upvotes

Hi everyone,

I'm experiencing a rendering issue after upgrading my Flutter Linux application to Flutter 3.50.

The application works perfectly on my Ubuntu development laptop, but on our production device (CoreBox), which runs Sway with native Wayland, the application starts successfully but displays a black/blue screen.

The interesting part is that the application itself seems to be running normally. All services initialize, gRPC connections work, assets are loaded, and the application processes data without any obvious errors.

Environment:

  • OS: Ubuntu 26.04.1 LTS
  • Kernel: 7.0.0-42-generic
  • Flutter: 3.50
  • GPU: Intel Tiger Lake (PCI ID 8086:9a78)
  • GPU driver: i915
  • Compositor: Sway
  • Sway renderer: WLR_RENDERER=gles2
  • Wayland socket: wayland-1
  • GTK-based Flutter Linux application

What I've confirmed:

  1. The application process runs normally.
  2. Sway recognizes the window as a native Wayland xdg_shell surface.
  3. The application is not running through XWayland.
  4. The Intel GPU driver initializes successfully.
  5. The application loads its assets and initializes its services.
  6. There are no obvious fatal GPU errors in dmesg.
  7. WLR_SCENE_DISABLE_DIRECT_SCANOUT=1 is already enabled.

Sway reports:

floating_con "gameselector_main"
(xdg_shell, app_id: "gameselector_main")

Environment variables:

WAYLAND_DISPLAY=wayland-1
DISPLAY=:0
XDG_RUNTIME_DIR=/run/user/1000
WLR_RENDERER=gles2

What I'm investigating:

I suspect this might be related to the Linux rendering changes introduced in Flutter 3.50, possibly involving FlViewRendererSubsurface, EGL/OpenGL, or Wayland buffer presentation.

I'm currently adding additional native GTK and Flutter frame diagnostics, along with a minimal rendering test to isolate the issue.

I'm also considering testing Flutter 3.51.0-0.1.pre (beta) to see whether the issue has been fixed.

My questions:

  • Has anyone experienced black screens with Flutter 3.50 on Sway or other wlroots-based Wayland compositors?
  • Are there known regressions involving FlViewRendererSubsurface or EGL rendering?
  • Is there a supported way to switch between the old and new Flutter Linux rendering paths for debugging?
  • Has anyone tested Flutter 3.51 beta with similar issues?

I'd prefer to keep native Wayland support rather than switching to XWayland.

Any suggestions for debugging this would be greatly appreciated. Thanks!