Skip to content

[Linux][Regression][3.32.0] Rendering glitches when using backdrop filter and forcing Mesa software rendering (LIBGL_ALWAYS_SOFTWARE=1) #169508

Open

Description

@TomKrauss

Steps to reproduce

  1. run a Flutter Application showing a dialog (containing e.g. some buttons) above a Scaffold
  2. Move the mouse over the dialog over the buttons
  3. The screen starts to flicker (see attached video) showing the Scaffold widget and the Dialog widget in alternating way

Expected results

The screen should not flicker

Actual results

Screen is displaying dialog and scaffold behind in an alternating way rather than only the dialog with the Blur background.

The video was recorded on WSL Ubuntu, but the behavior can easily reproduced also on a native Ubuntu system.

Screenshots or Video

Screenshots / Video demonstration
Video_250528090618.mp4

Code Example

Here is an example App, which can be run on Linux demonstrating the problem. Simply open the 'Example Dialog' and then move the mouse over the screen - will show the broken behavior.

import 'package:flutter/material.dart';
import 'dart:ui';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: const MyHomePage(title: 'Flutter Linux Rendering Bug'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  void _showExampleDialog() {
	showDialog(context: context, barrierDismissible: false, builder: (BuildContext context) {
		return AlertDialog(
			title: Text("Title"), content: Stack(children: [
				BackdropFilter(
            filter: ImageFilter.blur(sigmaX: 20.0, sigmaY: 20.0),
            child: Container(decoration:
            BoxDecoration(
                borderRadius: BorderRadius.circular(16),
                color: Colors.grey.shade300.withAlpha(128)
            ))),
               Column(children: [
					Text("Example Example Example Example Example Example"),
					Text("Example Example Example Example Example Example"),
			])]), actions: [ElevatedButton(onPressed: () {
   Navigator.of(context).pop();
}, child: Text("OK"))]);
	});
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text('Open the example dialog'),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _showExampleDialog,
        tooltip: 'Show Example Dialog',
        child: const Icon(Icons.add),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.32.0, on Ubuntu 22.04.4 LTS 5.15.167.4-microsoft-standard-WSL2, locale C.UTF-8)
[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/to/linux-android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop
[!] Android Studio (not installed)
[✓] Connected device (1 available)
[✓] Network resources

! Doctor found issues in 3 categories.

Activity

  1. danagbemava-nc commented on May 28, 2025

    @danagbemava-nc
    Member

    Hi @TomKrauss, I just tested your code sample on a ubuntu 24.10 system with stable 3.32 and I can't seem to reproduce the issue. See the recording below. Is there any more information you can provide about your environment? Like the graphics card of your system and any other information you think may be relevant?

    Screencast.From.2025-05-28.07-39-31.webm
  2. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on May 28, 2025
  3. TomKrauss commented on May 28, 2025

    @TomKrauss
    Author

    We can reproduce the behavior on two machines at least:

    1. WSL2+Ubuntu 22.0.4
    2. System:
      Host: nb-***-2017 Kernel: 6.8.0-58-generic arch: x86_64 bits: 64
      Desktop: Cinnamon v: 6.2.9 Distro: Linux Mint 22 Wilma
      Machine:
      Type: Laptop System: LENOVO product: 20HH0014GE v: ThinkPad P51
      serial:
      CPU:
      Info: quad core Intel Core i7-7700HQ [MT MCP] speed (MHz): avg: 3099
      min/max: 800/3800
      Graphics:
      Device-1: Intel HD Graphics 630 driver: i915 v: kernel
      Device-2: NVIDIA GM107GLM [Quadro M1200 Mobile] driver: nvidia v: 550.120
  4. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on May 28, 2025
  5. TomKrauss commented on May 28, 2025

    @TomKrauss
    Author

    Hi Daniel,

    In the meanwhile I tested on Ubuntu 24.04.2 - same problem.

  6. TomKrauss commented on May 28, 2025

    @TomKrauss
    Author

    Found out, that the problem can only be reproduced, when I use Software rendering: LIBGL_ALWAYS_SOFTWARE=1

  7. changed the title [-]Flutter Rendering broken on Desktop Linux Platforms since Flutter Version 3.32.0[/-] [+][Linux][Regression][3.32.0] Rendering glitches when using backdrop filters and forcing software rendering[/+] on May 29, 2025
  8. changed the title [-][Linux][Regression][3.32.0] Rendering glitches when using backdrop filters and forcing software rendering[/-] [+][Linux][Regression][3.32.0] Rendering glitches when using backdrop filter and forcing software rendering[/+] on May 29, 2025
  9. danagbemava-nc commented on May 29, 2025

    @danagbemava-nc
    Member

    Reproducible using the code sample provided above when LIBGL_ALWAYS_SOFTWARE=1. This works as expected on stable 3.29.3 but not 3.32 onwards. It also doesn't seem to reproduce when the backdrop filter is removed from the dialog in the sample shared above.

    Labeling for further investigation

    flutter doctor -v
    [!] Flutter (Channel master, 3.33.0-1.0.pre.256, on Ubuntu 24.10 6.11.0-21-generic, locale en_US.UTF-8) [6.5s]
        • Flutter version 3.33.0-1.0.pre.256 on channel master at /home/daniel/fvm/versions/master
        ! Warning: `flutter` on your path resolves to /home/daniel/fvm/versions/stable/bin/flutter, which is not inside your current Flutter SDK checkout at /home/daniel/fvm/versions/master. Consider adding /home/daniel/fvm/versions/master/bin to the front of your path.
        ! Warning: `dart` on your path resolves to /home/linuxbrew/.linuxbrew/Cellar/dart/3.2.2/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /home/daniel/fvm/versions/master. Consider adding /home/daniel/fvm/versions/master/bin to the front of your path.
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision f2625754b3 (8 hours ago), 2025-05-28 18:52:39 -0500
        • Engine revision f2625754b3
        • Dart version 3.9.0 (build 3.9.0-172.0.dev)
        • DevTools version 2.46.0
        • 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 34.0.0) [5.8s]
        • Android SDK at /home/daniel/Android/Sdk
        • Emulator version 33.1.23.0 (build_id 11150993) (CL:N/A)
        • Platform android-34, build-tools 34.0.0
        • ANDROID_HOME = /home/daniel/Android/Sdk
        • Java binary at: /home/daniel/.local/share/JetBrains/Toolbox/apps/android-studio/jbr/bin/java
          This is the JDK bundled with the latest Android Studio installation on this machine.
          To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
        • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
        • All Android licenses accepted.
    
    [✓] Chrome - develop for the web [83ms]
        • Chrome at google-chrome
    
    [✓] Linux toolchain - develop for Linux desktop [1,092ms]
        • Ubuntu clang version 19.1.1 (1ubuntu1)
        • cmake version 3.30.3
        • ninja version 1.12.1
        • pkg-config version 1.8.1
        ! Unable to access driver information using 'eglinfo'.
          It is likely available from your distribution (e.g.: apt install mesa-utils)
    
    [✓] Android Studio (version 2023.1) [72ms]
        • Android Studio at /home/daniel/.local/share/JetBrains/Toolbox/apps/android-studio
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    
    [✓] VS Code (version unknown) [65ms]
        • VS Code at /usr/share/code
        • Flutter extension version 3.110.0
        ✗ Unable to determine VS Code version.
    
    [✓] Connected device (2 available) [843ms]
        • Linux (desktop) • linux  • linux-x64      • Ubuntu 24.10 6.11.0-21-generic
        • Chrome (web)    • chrome • web-javascript • Google Chrome 126.0.6478.182
    
    [✓] Network resources [2.0s]
        • All expected network resources are available.
    
    ! Doctor found issues in 1 category.
    
    [!] Flutter (Channel stable, 3.32.0, on Ubuntu 24.10 6.11.0-21-generic, locale en_US.UTF-8) [382ms]
        • Flutter version 3.32.0 on channel stable at /home/daniel/fvm/versions/stable
        ! Warning: `dart` on your path resolves to /home/linuxbrew/.linuxbrew/Cellar/dart/3.2.2/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /home/daniel/fvm/versions/stable. Consider adding /home/daniel/fvm/versions/stable/bin to the front of your path.
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision be698c48a6 (9 days ago), 2025-05-19 12:59:14 -0700
        • Engine revision 1881800949
        • Dart version 3.8.0
        • DevTools version 2.45.1
        • 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 34.0.0) [5.7s]
        • Android SDK at /home/daniel/Android/Sdk
        • Platform android-34, build-tools 34.0.0
        • ANDROID_HOME = /home/daniel/Android/Sdk
        • Java binary at: /home/daniel/.local/share/JetBrains/Toolbox/apps/android-studio/jbr/bin/java
          This is the JDK bundled with the latest Android Studio installation on this machine.
          To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
        • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
        • All Android licenses accepted.
    
    [✓] Chrome - develop for the web [64ms]
        • Chrome at google-chrome
    
    [✓] Linux toolchain - develop for Linux desktop [685ms]
        • Ubuntu clang version 19.1.1 (1ubuntu1)
        • cmake version 3.30.3
        • ninja version 1.12.1
        • pkg-config version 1.8.1
        ! Unable to access driver information using 'eglinfo'.
          It is likely available from your distribution (e.g.: apt install mesa-utils)
    
    [✓] Android Studio (version 2023.1) [55ms]
        • Android Studio at /home/daniel/.local/share/JetBrains/Toolbox/apps/android-studio
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    
    [✓] VS Code (version unknown) [49ms]
        • VS Code at /usr/share/code
        • Flutter extension version 3.110.0
        ✗ Unable to determine VS Code version.
    
    [✓] Connected device (2 available) [593ms]
        • Linux (desktop) • linux  • linux-x64      • Ubuntu 24.10 6.11.0-21-generic
        • Chrome (web)    • chrome • web-javascript • Google Chrome 126.0.6478.182
    
    [✓] Network resources [937ms]
        • All expected network resources are available.
    
    ! Doctor found issues in 1 category
    
  10. added
    c: regressionIt was better in the past than it is now
    engineflutter/engine related. See also e: labels.
    platform-linuxBuilding on or for Linux specifically
    c: renderingUI glitches reported at the engine/skia or impeller rendering level
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    team-linuxOwned by the Linux platform team
    and removed
    in triagePresently being triaged by the triage team
    on May 29, 2025
  11. robert-ancell commented on Jun 15, 2025

    @robert-ancell
    Contributor

    If anyone who can reproduce this and is able to build a custom engine please test with #170045 as I think this change might have fixed the issue.

  12. changed the title [-][Linux][Regression][3.32.0] Rendering glitches when using backdrop filter and forcing software rendering[/-] [+][Linux][Regression][3.32.0] Rendering glitches when using backdrop filter and forcing Mesa software rendering (LIBGL_ALWAYS_SOFTWARE=1)[/+] on Jul 18, 2025
  13. added
    P3Issues that are less important to the Flutter project
    triaged-linuxTriaged by the Linux platform team
    on Jul 18, 2025
  14. robert-ancell commented on Jul 18, 2025

    @robert-ancell
    Contributor

    Ah, this is using Mesa software rendering, not the Flutter software renderer. If you need software rendering it is likely to better perform using Flutter (FLUTTER_LINUX_RENDERER=software) rather than Mesa. Using the Mesa software renderer means that Flutter might be using expensive GPU operations that a CPU struggles to perform.

  15. d-loose commented on Sep 12, 2025

    @d-loose

    I can reproduce the bug with LIBGL_ALWAYS_SOFTWARE=1 FLUTTER_LINUX_RENDERER=software for Flutter versions < 3.35. It seems fixed in 3.35.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: regressionIt was better in the past than it is nowc: renderingUI glitches reported at the engine/skia or impeller rendering levelengineflutter/engine related. See also e: labels.found in release: 3.32Found to occur in 3.32found in release: 3.33Found to occur in 3.33has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-linuxBuilding on or for Linux specificallyteam-linuxOwned by the Linux platform teamtriaged-linuxTriaged by the Linux platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions