-
Notifications
You must be signed in to change notification settings - Fork 21
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
Flutter app can't create a GL context on RPi 4/Ubuntu Core 20 #49
Comments
@KirioXX, I'm not sure why your app isn't starting but the logs show that Wayland is connected. You can confirm this with There is a unrelated warning:
This is because you list The following guide doesn't yet cover Flutter (you followed the right tutorial), but the process shown may help track down your issue: https://github.com/MirServer/iot-example-graphical-snap/wiki |
@AlanGriffiths thank you for the quick response. $ snap connections trunk-pilot-dashboard
Interface Plug Slot Notes
content[gnome-3-28-1804] trunk-pilot-dashboard:gnome-3-28-1804 gnome-3-28-1804:gnome-3-28-1804 -
content[gtk-3-themes] trunk-pilot-dashboard:gtk-3-themes gtk-common-themes:gtk-3-themes -
content[icon-themes] trunk-pilot-dashboard:icon-themes gtk-common-themes:icon-themes -
content[sound-themes] trunk-pilot-dashboard:sound-themes gtk-common-themes:sound-themes -
desktop trunk-pilot-dashboard:desktop - -
desktop-legacy trunk-pilot-dashboard:desktop-legacy - -
gsettings trunk-pilot-dashboard:gsettings - -
opengl trunk-pilot-dashboard:opengl :opengl -
wayland trunk-pilot-dashboard:wayland ubuntu-frame:wayland -
x11 trunk-pilot-dashboard:x11 - I'm not sure if it could be related but I follow this issue for a while now flutter/flutter#76178 because I had a similar issue on ubuntu desktop a while back. The pulsaudio is not an issue we just need a picture and network for now, but I left it in to look into it in case we decide we need audio in the future. |
Hi @KirioXX, Did you also run into the similar issue within qemu or x86 based system? I'm afraid it could be either platform specific or the application specific problem? Are you able to run basic hello-world application without any issue? |
That looks unrelated, the Mesa drivers (including swrast) will be in |
Hi @bugraaydogar, I have tried it on qemu with a Ubuntu Core arm64 VM sadly with the same result, I couldn't test it on x86 because I was running in this #31 issue. I also just tried the example app in the "Run Flutter Applications on Ubuntu Core" with the same result: 2022-01-04T10:36:02Z systemd[1]: Started Service for snap application super-cool-app.daemon.
2022-01-04T10:36:02Z super-cool-app.daemon[2199]: + snapctl get daemon
2022-01-04T10:36:02Z super-cool-app.daemon[2082]: + [ true = true ]
2022-01-04T10:36:02Z super-cool-app.daemon[2082]: + exec /snap/super-cool-app/x1/bin/wayland-launch /snap/super-cool-app/x1/bin/flutterdemo
2022-01-04T10:36:03Z -[2082]: g_dbus_proxy_new_sync: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
2022-01-04T10:36:20Z -[2082]: Failed to start Flutter renderer: Unable to create a GL context |
@KirioXX what about running on qemu with amd64 rather than arm64 ? I'm personally able to run the example application without any issue. My setup is;
I still believe that there is an issue with ARM based platforms. |
Thanks for reminding me about that issue, there's a workaround (which I've added).
That suggests there may be a problem with Flutter apps on RPi4. I know they are based on core18 - maybe that lacks suitable drivers. I don't have a RPi4 to test, will see if I can find someone that can. Note: I'm going to close this issue as it clearly isn't a problem with ubuntu-frame itself. (You can still post updates here and we'll see them.) |
@RAOF I believe you've got a RPi4: could you check the "Run Flutter Applications on Ubuntu Core" works with that kit? |
@KirioXX I've got hold of an RPi400 and can reproduce the problem you see. I also have a workaround. The Flutter demo starts, but reports (as you see)
But it does display a white screen. (So it obviously managed to render that much before hitting problems.) My workaround is to force Mesa to do software rendering by adding This suggests that there's a problem with the |
[Update on investigation] I've not yet proved it, but it looks like the problem originates with the
Both versions have the
As there's a significant size difference, there must have been some changes, and these may well explain the difference in behaviour. |
@AlanGriffiths that's amazing, just tried it on my test pi. Thank you very much 🙌 I'm not sure how far the core 20 support for flutter is. |
[Update 2 on investigation] I've built a core20 based Flutter demo snap that uses Mesa 21. But this doesn't fix the problem. Conclusion: it isn't the Mesa version from 18.04 that's the problem. That theory was wrong. |
[Update 3 on investigation] Running on amd64/intel:
Running on arm64/ARM Cortex-A72:
So, we're encountering an earlier EGL API, with fewer extension. (Specifically missing EGL_ANDROID_native_fence_sync, EGL_EXT_create_context_robustness, EGL_IMG_context_priority - none of which are obviously an issue) |
@KirioXX the best answer seems to be to add |
@AlanGriffiths Perfect I tried it over the weekend and it works like a charm. |
Hi,
we are in the process to port our flutter app to Ubuntu Core with Ubuntu Frame.
But we sadly see an error when we try to start our app and the screen stays white.
What prevents us from shipping our devices with Ubuntu Core.
These are the logs that we see:
We followed the "RUNNING_ON_YOUR_DEVICE" documentation to set up Ubuntu Frame and "Run Flutter Applications on Ubuntu Core" to configure our flutter app.
Here is also our snap config:
Did we configure something wrong or do we need to connect the app with wayland manually to make it work?
Thank you!
The text was updated successfully, but these errors were encountered: