Skip to content

Linux: Gdk-CRITICAL: gdk_device_get_source: assertion 'GDK_IS_DEVICE (device)' failed #183869

@finnvyrn

Description

@finnvyrn

Steps to reproduce

  1. Use Hyprland (Linux), or any other Linux environment (I'm not sure whether this will appear on them)
  2. Launch the Flutter default project

Expected results

There should be no such error, both in release or debug mode.

Actual results

This error appears in release and debug mode, whenever the focus moves into or out of the app.

Logs

Logs
(com.example.app:138275): Gdk-CRITICAL **: 08:06:38.229: gdk_device_get_source: assertion 'GDK_IS_DEVICE (device)' failed

(com.example.app:138275): Gdk-CRITICAL **: 08:06:42.325: gdk_device_get_source: assertion 'GDK_IS_DEVICE (device)' failed

(com.example.app:138275): Gdk-CRITICAL **: 08:08:04.045: gdk_device_get_source: assertion 'GDK_IS_DEVICE (device)' failed

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.41.4, on Arch Linux 6.19.8-1-cachyos, locale en_US.UTF-8) [24ms]
    • Flutter version 3.41.4 on channel stable at /opt/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ff37bef603 (2 weeks ago), 2026-03-03 16:03:22 -0800
    • Engine revision e4b8dca3f1
    • Dart version 3.11.1
    • DevTools version 2.54.1
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn
    • Feature flags: no-enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration

[✓] Linux toolchain - develop for Linux desktop [231ms]
    • clang version 22.1.1
    • cmake version 4.3.0
    • ninja version 1.13.2
    • pkg-config version 2.5.1
    • OpenGL core renderer: AMD Radeon RX 7600 (radeonsi, navi33, ACO, DRM 3.64, 6.19.8-1-cachyos)
    • OpenGL core version: 4.6 (Core Profile) Mesa 26.0.3-arch2.2
    • OpenGL core shading language version: 4.60
    • OpenGL ES renderer: AMD Radeon RX 7600 (radeonsi, navi33, ACO, DRM 3.64, 6.19.8-1-cachyos)
    • OpenGL ES version: OpenGL ES 3.2 Mesa 26.0.3-arch2.2
    • OpenGL ES shading language version: OpenGL ES GLSL ES 3.20
    • GL_EXT_framebuffer_blit: yes
    • GL_EXT_texture_format_BGRA8888: yes

[✓] Connected device (1 available) [97ms]
    • Linux (desktop)   • linux       • linux-x64     • Arch Linux 6.19.8-1-cachyos

[✓] Network resources [6.2s]
    • All expected network resources are available.

• No issues found!

Env

OS: Arch Linux x86_64
Host: MS-7D76 (2.0)
Kernel: Linux 6.19.8-1-cachyos
Display (27M2N5810): 3840x2160 @ 1.67x in 27", 160 Hz [External]
WM: Hyprland 0.54.2 (Wayland)
GPU: AMD Radeon RX 7600 [Discrete]
~/projects> printenv | rgf WAYLAND
WAYLAND_DISPLAY=wayland-1
~/projects> printenv | rgf wayland
SDL_VIDEODRIVEVER=wayland
WAYLAND_DISPLAY=wayland-1
XDG_BACKEND=wayland
XDG_SESSION_TYPE=wayland

Related

Workaround

  • VS Code: Use !gdk_device_get_source in the debug console filter

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listengineflutter/engine related. See also e: labels.platform-linuxBuilding on or for Linux specificallyteam-linuxOwned by the Linux platform teamtriaged-linuxTriaged by the Linux platform team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions