Repository navigation
Linux desktop app just stops updating its window after a while #173447
Copy link
Copy link
Closed
Labels
P0Critical issues such as a build break or regressionCritical issues such as a build break or regressionc: regressionIt was better in the past than it is nowIt was better in the past than it is nowplatform-linuxBuilding on or for Linux specificallyBuilding on or for Linux specificallyteam-linuxOwned by the Linux platform teamOwned by the Linux platform teamtriaged-linuxTriaged by the Linux platform teamTriaged by the Linux platform team
Description
Steps to reproduce
Run the code below using flutter run -d linux and wait up to 15 minutes (usually a lot less, sometimes less than 10 seconds). All the code does is show a timer on the screen.
Expected results
There should be a counter that increases forever.
Actual results
The timer eventually just appears to hang.
In practice (as tested via debugger), the Dart part of the application is continuing to work fine. It's just the window that isn't updating.
Code sample
import 'dart:async';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
final DateTime _start = DateTime.now();
@override
Widget build(BuildContext context) {
scheduleMicrotask(() { setState(() { /* rebuild */ }); });
return Center(
child: Text(
'${DateTime.now().millisecondsSinceEpoch - _start.millisecondsSinceEpoch}ms',
textDirection: TextDirection.ltr,
),
);
}
}Screenshots or Video
No response
Logs
No response
Flutter Doctor output
Doctor output
[!] Flutter (Channel [user-branch], 3.33.0-1.0.pre-1324, on Ubuntu 24.04.1 LTS 6.8.0-58-generic, locale C.UTF-8) [61ms]
! Flutter version 3.33.0-1.0.pre-1324 on channel [user-branch] at /home/ianh/dev/flutter
Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/setup.
! Upstream repository unknown source is not a standard remote.
Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
• Framework revision 796c62bd76 (2 hours ago), 2025-08-07 15:42:16 -0700
• Engine revision 9264b70f24
• Dart version 3.10.0 (build 3.10.0-75.1.beta)
• DevTools version 2.49.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [1,762ms]
• Android SDK at /home/ianh/Android/Sdk
• Emulator version 31.3.13.0 (build_id 9189900) (CL:N/A)
✗ Flutter requires Android SDK 36 and the Android BuildTools 28.0.3
To update the Android SDK visit https://flutter.dev/to/linux-android-setup for detailed instructions.
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Chrome - develop for the web [16ms]
• Chrome at google-chrome
[✓] Linux toolchain - develop for Linux desktop [529ms]
• Ubuntu clang version 18.1.3 (1ubuntu1)
• cmake version 3.28.3
• ninja version 1.11.1
• pkg-config version 1.8.1
• OpenGL core renderer: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2 (X11)
• OpenGL core version: 4.6.0 NVIDIA 550.120 (X11)
• OpenGL core shading language version: 4.60 NVIDIA (X11)
• OpenGL ES renderer: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2 (X11)
• OpenGL ES version: OpenGL ES 3.2 NVIDIA 550.120 (X11)
• OpenGL ES shading language version: OpenGL ES GLSL ES 3.20 (X11)
• GL_EXT_framebuffer_blit: yes (X11)
• GL_EXT_texture_format_BGRA8888: yes (X11)
[✓] Connected device (2 available) [151ms]
• Linux (desktop) • linux • linux-x64 • Ubuntu 24.04.1 LTS 6.8.0-58-generic
• Chrome (web) • chrome • web-javascript • Google Chrome 136.0.7103.59
[✓] Network resources [196ms]
• All expected network resources are available.
! Doctor found issues in 2 categories.While I'm at it:
ianh@burmese:~$ sudo X -version
X.Org X Server 1.21.1.11
X Protocol Version 11, Revision 0
Current Operating System: Linux burmese 6.8.0-58-generic #60-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 14 18:29:48 UTC 2025 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.8.0-58-generic root=UUID=dc31e344-a73b-4584-9bbb-d412fe845c85 ro
xorg-server 2:21.1.12-1ubuntu1.4 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.42.2
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P0Critical issues such as a build break or regressionCritical issues such as a build break or regressionc: regressionIt was better in the past than it is nowIt was better in the past than it is nowplatform-linuxBuilding on or for Linux specificallyBuilding on or for Linux specificallyteam-linuxOwned by the Linux platform teamOwned by the Linux platform teamtriaged-linuxTriaged by the Linux platform teamTriaged by the Linux platform team
Activity
Hixie commentedon Aug 8, 2025
I git bisected this to #171414.
robert-ancell commentedon Aug 8, 2025
Confirmed here. It seems to be locking in one of the mutexes.
robert-ancell commentedon Aug 8, 2025
Adding logging I can see
fl_compositor_opengl_present_layersis being called butfl_compositor_opengl_renderstops being called. Not able to pinpoint it more than that as not reproducing when adding the additional logging. Will look more into this next week.flutter-triage-bot commentedon Aug 8, 2025
The
triaged-linuxlabel is irrelevant if there is noteam-linuxlabel orfyi-linuxlabel.loic-sharma commentedon Aug 8, 2025
FYI the commit that introduced this regression, 78e111f, is included in the next stable release. We'll want to cherrypick the fix.
robert-ancell commentedon Aug 11, 2025
Spent some more time investigating this today, notes:
FLUTTER_LINUX_RENDERER=software)Will continue to look into it more tomorrow.
Fix GTK redraw call being called from non-GTK thread.
Fix GTK redraw call being called from non-GTK thread. (#173602)
Fix GTK redraw call being called from non-GTK thread. (flutter#173602)
Fix GTK redraw call being called from non-GTK thread. (flutter#173602)
[beta] Cherry pick fix GTK redraw call being called from non-GTK thre…
[beta] Cherry pick fix GTK redraw call being called from non-GTK thre…
Fix GTK redraw call being called from non-GTK thread. (flutter#173602)
Fix GTK redraw call being called from non-GTK thread. (flutter#173602)
github-actions commentedon Aug 27, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.Fix GTK redraw call being called from non-GTK thread. (flutter#173602)
Fix GTK redraw call being called from non-GTK thread. (flutter#173602)
Fix GTK redraw call being called from non-GTK thread. (flutter#173602)
Fix GTK redraw call being called from non-GTK thread. (#173602)