Description
Steps to reproduce
- Use the latest stable release of Flutter
3.22.2
- Start the Andoird Emulator in GPU host mode like this
~/Android/Sdk/emulator/emulator -avd <emulator-name> -gpu host
this will start the Emulator in GPU host mode in my case it will use the Integrated GPU - Run the app in profile mode in Andoird Emulator with impeller enabled
flutter run --enable-impeller
Note: Sometimes, when I move the app to the background and then reopen it, everything works fine. But other times, if I repeat this process—moving the app to the background and then bringing it to the foreground—junk appears. It alternates inconsistently between showing junk and not showing junk each time I switch between background and foreground. However, one thing I'm certain of is that on the initial run, junk will always appear.
My OS and hardware
Host: Inspiron 5567
Display: 1920x1080 @ 60HzOS: Ubuntu noble 24.04 x86_64
Kernel: Linux 6.8.0-35-genericDE: GNOME 46.0
WM: Mutter (X11)Memory: 7.62 GiB / 15.43 GiB (49%)
CPU: Intel(R) Core(TM) i7-7500U (4) @ 3.50 GHz
GPU: Intel HD Graphics 620 @ 1.05 GHz [Integrated]
GPU: AMD Radeon R5 M445 Series @ 0.66 GHz [Discrete]OpenGL: 4.6 (Compatibility Profile) Mesa 24.0.5-1ubuntu1
Vulkan: 1.3.274 - Intel open-source Mesa driver [Mesa 24.0.5-1ubuntu1]╰─ lspci -k | grep -EA3 'VGA|3D|Display' 00:02.0 VGA compatible controller: Intel Corporation HD Graphics 620 (rev 02) DeviceName: Onboard IGD Subsystem: Dell HD Graphics 620 Kernel driver in use: i915 -- 01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445 / 530/535 / 620/625 Mobile] (rev c3) Subsystem: Dell Radeon R7 M445 Kernel driver in use: amdgpu Kernel modules: amdgpu
Code sample
Code sample
void main() {
runApp(
MaterialApp(
home: Scaffold(
body: ListView.builder(
itemBuilder: (context, index) {
return Container(
color: Colors.primaries[index % Colors.primaries.length],
height: 150,
width: double.infinity,
child: Center(child: Text(index.toString())),
);
},
),
),
),
);
}
Performance profiling on master channel
- The issue still persists on the master channel
Timeline Traces
Timeline Traces JSON
Video demonstration
On Impeller notice that sometimes it's really laggy and other times it works just fine. It seems to alternate between these two modes
[Impeller] Video demonstration
2024-06-27_01-22-46.mp4
[Skia] Video demonstration
skia.mp4
What target platforms are you seeing this bug on?
Android
OS/Browser name and version | Device information
I can not test this on a physical device because my device does not support Vulkan so the flutter engine fallback to Skia
I'm testing on Android Emulator
Android 14
The normal emulator device with Google Play support and the recommended images tab in android studio
Does the problem occur on emulator/simulator as well as on physical devices?
Unknown
Is the problem only reproducible with Impeller?
Yes
Logs
Logs
[Paste your logs here]
Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.22.2, on Ubuntu 24.04 LTS 6.8.0-35-generic, locale en_US.UTF-8)
• Flutter version 3.22.2 on channel stable at /home/nidal/fvm/versions/3.22.2
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 761747bfc5 (3 weeks ago), 2024-06-05 22:15:13 +0200
• Engine revision edd8546116
• Dart version 3.4.3
• DevTools version 2.34.3
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /home/nidal/Android/Sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /home/nidal/program_files/android-studio/jbr/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)
• All Android licenses accepted.
[✗] 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
✗ clang++ is required for Linux development.
It is likely available from your distribution (e.g.: apt install clang), or can be downloaded
from https://releases.llvm.org/
✗ CMake is required for Linux development.
It is likely available from your distribution (e.g.: apt install cmake), or can be downloaded
from https://cmake.org/download/
✗ ninja is required for Linux development.
It is likely available from your distribution (e.g.: apt install ninja-build), or can be
downloaded from https://github.com/ninja-build/ninja/releases
✗ pkg-config is required for Linux development.
It is likely available from your distribution (e.g.: apt install pkg-config), or can be
downloaded from https://www.freedesktop.org/wiki/Software/pkg-config/
[✓] Android Studio (version 2024.1)
• Android Studio at /home/nidal/program_files/android-studio
• Flutter plugin version 80.0.2
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)
[✓] VS Code (version 1.90.2)
• VS Code at /usr/share/code
• Flutter extension version 3.90.0
[✓] Connected device (1 available)
• Linux (desktop) • linux • linux-x64 • Ubuntu 24.04 LTS 6.8.0-35-generic
[✓] Network resources
• All expected network resources are available.
! Doctor found issues in 2 categories.