-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[impeller]: extreme jank on the first start but becomes normal when moving the app to the background and opening it back again #150880
Comments
Just to set expectations here: our primary goal for Impeller is on device performance. Performance on the emulator in a passthrough configuration is going to have a lot of variables that are not really under our control, specifically things like how well the emulator emulates Vulkan. |
@Nidal-Bakir I checked this on my physical device Pixel 7, Android 14, and I don't see janks there even on initial run or switching between foreground and background. Screen.Recording.2024-06-27.at.14.46.37.movAlso, I see janks also appear on your demo with Skia above. Since Profile mode is disabled on the emulator and simulator, you should re-check this on a physical device if any. |
Thanks for your feedback. I understand your point, and it's not a big deal. I can simply move the app to the background and then bring it back to the foreground to fix this issue. As jonahwilliams mentioned, there are a lot of variables to consider. It might be a driver issue on my end or possibly a hardware issue due to my older device. I will keep using Skia for the time being Thanks again for your help! |
[FIXED] For future reference and for anyone else having this issue on Linux (Wayland)If you have a discrete GPU try running the emulator using the discrete GPU with:
It seems the emulator will default and run on the Integrated GPU ( Intel HD Graphics or something like that) And if keep seeing "Emulator/unknown is not responding (Force Quit / Wait)" also on Linux (Wayland) I already filed a bug report on the Gnome mutter project for this: |
You can close this if you want. I have nothing to add |
If moving to the background closes the app, then its possible that switches it back to Skia. I doubt its a driver a hardware issue, its almost certainly a problem with the Android emulator. |
This looks like an emulator issue so I will close it from here. Thanks! |
Steps to reproduce
3.22.2
~/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 GPUflutter 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
Code sample
Code sample
Performance profiling on master channel
Timeline Traces
Timeline Traces JSON
dart_devtools_2024-06-26_23_52_47.732.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
The text was updated successfully, but these errors were encountered: