ardera / flutter-pi Goto Github PK
View Code? Open in Web Editor NEWA light-weight Flutter Engine Embedder for Linux Embedded that runs without X11 or Wayland.
License: MIT License
A light-weight Flutter Engine Embedder for Linux Embedded that runs without X11 or Wayland.
License: MIT License
when i do make command in flutter-pi directory it raise it error for me
./include/plugins/gpiod.h:4:10: fatal error: gpiod.h: No such file or directory
#include <gpiod.h>
can you guys help me
Will this only work on a Raspbian version without GUI and will mouse pointer be visible if I'm using mouse pointer as an input device? If an OS with GUI will also work, can you provide me it's image download link or version details?
I am trying to build flutter-pi on a platform other than Raspbian. I got stuck at the following point.
Swapping buffers... Locking front buffer... getting new framebuffer for BO... Setting CRTC... failed to set mode: Permission denied
Why would this come up? Do you have any idea?
I can give you my cross compilation script though, link here. I compile in WSL because compiling on-target takes ages. This needs a cloned repo of GNU binutils, LLVM 9 and LLVM 10.
I have been trying to build the flutter engine for a long time now and followed the medium article too. Nothing worked. I would like to know why you have used two versions of LLVM(9 and 10). Since it's said to use TOT Clang/LLVM, I used v11 and always get stuck at building libcxx.
From what I understood from your script, you use LLVM v9.x for setting up the toolchain, ie, Clang/LLVM and then you setup the binutils. You use LLVM v10.x to build the libcxx and libcxxabi. After that comes the setting up the engine development environment and all. Is my understanding of your script right? I use a Ubuntu-16.04 64-bit to build all the packages.
I remember you sayingt that you wouldn't provide any help towards engine building but I've been stuck at this point for a while and I assure you I wouldn't bug you a lot on this. :)
I tried building flutter-pi on Raspbian and it worked. But when I tried to do the same on another embedded platform providing the necessary dependencies, an error stating that vc4_dri.so and kms_swrast_dri.so are not found came up. Isn't X11 a necessary dependency for building those? I tried building those SO's but get blocked since X11 libraries are not present. Mesa provides those SO's. When I checked, some libraries of X11 are also getting built in Raspberry Pi too.
While running flutter-pi in an embedded-linux build, it gets stuck at
Clearing current context... finished display setup! Initializing Application... Initializing Plugin Registry... Initialized Services plugin. Could not initialize plugin registry: Illegal seek
Why would this be happening?
when i run flutter-pi i got this error i do all you say so many time but i still got this error
Running message loop...
[ERROR:engine/src/flutter/shell/common/shell.cc(199)] Dart Error: Can't load Kernel binary: Invalid kernel binary format version.
[ERROR:engine/src/flutter/shell/common/engine.cc(198)] Could not prepare to run the isolate.
[ERROR:engine/src/flutter/shell/common/engine.cc(137)] Engine not prepare and launch isolate.
[ERROR:engine/src/flutter/shell/common/shell.cc(437)] Could not launch engine with configuration.
Thanks for making this available to everyone. I seem to be stuck on how to build the asset bundle. You call out the need to use a flutter SDK that is compatible with the engine version you are using. I am going to attempt to use the engine from your engine-binaries branch. Do I install a compatible SDK on my regular computer, build the assets bundle, and them move them to the Pi? Can you point me to info that would help me take that step? Again thanks very much.
I'm currently trying to build a own library to communicate with the GPIOs to use UART and PWM. I am using the wiringPi library because it supports both interfaces. The problem is that wiringPi needs root permission to initialize PWM. I already searched for other solutions to run wiringPi without root but didn't find a lot.
So I just came to the point to run flutter-pi as root which doesn't seem to work.
pi@raspberrypi:~/projects/kart_project $ sudo flutter-pi .
sudo: flutter-pi: command not found
I was extra confused when I read this in README.md at the Fixing the GPU permissions part:
Otherwise, you'll need to run flutter-pi with sudo.
So is this a problem of flutter-pi or is there something wrong with my machine?
I am trying to run the flutter program on a 7inch display, but when I run the code I get this error:
./flutter-pi/out/flutter-pi ./dots-clock-master/dots_clock/build/flutter_assets
engine_argv[0] = ./flutter-pi/out/flutter-pi
initializing display...
Finding a suitable DRM device, since none is given...
could not query drm device list: No such file or directory
Seems like it doesn´t find the screen, even though I am currently using the display and it is showing the CLI perfectly. Is there a way to specify the "DRM" device? Any tips are much appreciated.
Hi again, flutter-pi is working great, still loving it.
Just one issue, thought to post here before I dig deeper myself to figure out what's going on. I'm still using the same touchscreen I used earlier in #38 - a WaveShare 1280x800 screen. Starting flutter-pi, everything seems to be fine and in the startup logs it says:
1280 x 800, 63Hz
150mm x 100mm
pixel_ratio = 2.245614
But the resolution in Flutter is most definitely not 1280x800, it looks to be closer to 640x400, everything looking very different than when running the app on my 1280x800 emulator. Any ideas what might be the issue? I know the panel is capable of 1280x800, but I'm wondering whether the panel has some issues again as we had the vsync problem as well.
I have a superior screen on its way that I want to switch to anyways, but it would be good to understand why the resolution is so low when starting flutter-pi and whether I can somehow force it to 1280x800.
Hi,
is it possible to get flutter-pi
running on a Raspberry Pi Zero (Raspberry Pi 1)?
I get an Illegal instruction
error both with the flutter engine you provide and with one that I built from scratch (targeting armv6-linux-gnueabihf).
Thanks!
The raspberry open de app and apparently all work but Touchscreen dont capture click in any /dev/input/event.
Any idea.
Thank you.
when I do flutter doctor command I terminal I got this
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel stable, v1.12.13+hotfix.8, on Linux, locale en_GB.UTF-8)
✗ Downloaded executables cannot execute on host.
See https://github.com/flutter/flutter/issues/6207 for more information
On Debian/Ubuntu/Mint: sudo apt-get install lib32stdc++6
On Fedora: dnf install libstdc++.i686
On Arch: pacman -S lib32-gcc-libs
[✗] 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/setup/#android-setup for detailed
instructions).
If the Android SDK has been installed to a custom location, set
ANDROID_HOME to that location.
You may also want to add it to your PATH environment variable.
[!] Android Studio (not installed)
[!] Connected device
! No devices available
! Doctor found issues in 4 categories.
the android toolchain, android studio and connect device is not mattered for us but I don't know lib32stdc++6 is important or not, anyway i try do sudo apt-get install lib32stdc++6 but i got this error
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package lib32stdc++6
E: Couldn't find any package by regex 'lib32stdc++6'
is it necessary to do that???
Is it necessay to have a pi display so as to work on this? I tried with a HDMI monitor and it resulted in some errors. I'm using Raspberry Pi 3 Model B with Raspbian OS in it.
Don't know what I'm missing right now. After modifying source code to use card1
, downgrading my local flutter to 1.9.1 I still can't see the demo app.
It seems that app is running, flutter-pi
doesn't exit it just stops, but nothing is visible on the monitor. I've checked both HDHMI outputs, also activated fake_KMS
, for now I run out of ideas what could be wrong.
Also seems that flutter engine arguments are not respected, as you can see in the output I'm setting observatory-host
, but later on flutter still prints 127.0.0.1
as observatory host.
Using touchscreen input from /dev/input/event0
Asset bundle path: /home/pi/flutter-raspberry/flutter_assets/
engine_argv[0] = /home/pi/flutter-pi/out/flutter-pi
engine_argv[1] = --observatory-host
engine_argv[2] = 192.168.0.16
initializing display...
Opening DRM device...
Getting DRM resources...
Finding a connected connector from 1 available connectors...
connectors[0]: connected? yes, type: 0x0B (HDMI-A), 340mm x 190mm
Choosing DRM mode from 26 available modes...
modes[0]: name: "1366x768", 1366x768p, 60Hz, type: 72, flags: 5
the chosen DRM mode is preferred by DRM. (DRM_MODE_TYPE_PREFERRED)
Display properties:
1366 x 768, 60Hz
340mm x 190mm
pixel_ratio = 1.057276
Finding DRM encoder...
Creating GBM device
Querying EGL client extensions...
Getting EGL display for GBM device...
Initializing EGL...
Querying EGL display extensions...
Using display 18351384 with EGL version 1.4
===================================
EGL information:
version: 1.4
vendor: "Mesa Project"
client extensions: "EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_EXT_client_extensions EGL_KHR_debug EGL_EXT_platform_wayland EGL_EXT_platform_x11 EGL_MESA_platform_gbm EGL_MESA_platform_surfaceless EGL_EXT_platform_device"
display extensions: "EGL_ANDROID_blob_cache EGL_EXT_buffer_age EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_WL_bind_wayland_display "
===================================
Binding OpenGL ES API...
Choosing EGL config...
Finding EGL configs with appropriate attributes...
Creating EGL context...
Creating EGL window surface...
===================================
OpenGL ES 2.x information:
version: "OpenGL ES 3.0 Mesa 19.2.0-rc1"
shading language version: "OpenGL ES GLSL ES 3.00"
vendor: "Broadcom"
renderer: "V3D 4.2"
extensions: "GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_EXT_texture_sRGB_decode GL_OES_EGL_image GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV GL_OES_get_program_binary GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_EXT_frag_depth GL_NV_fbo_color_attachments GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_array_object GL_EXT_occlusion_query_boolean GL_EXT_texture_rg GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer GL_NV_read_depth GL_NV_read_depth_stencil GL_NV_read_stencil GL_EXT_draw_buffers GL_EXT_map_buffer_range GL_KHR_debug GL_KHR_texture_compression_astc_ldr GL_OES_depth_texture_cube_map GL_OES_required_internalformat GL_OES_surfaceless_context GL_EXT_color_buffer_float GL_EXT_sRGB_write_control GL_EXT_separate_shader_objects GL_EXT_shader_integer_mix GL_EXT_base_instance GL_EXT_compressed_ETC1_RGB8_sub_texture GL_EXT_draw_elements_base_vertex GL_EXT_texture_border_clamp GL_KHR_context_flush_control GL_OES_draw_elements_base_vertex GL_OES_texture_border_clamp GL_OES_texture_stencil8 GL_EXT_float_blend GL_KHR_no_error GL_KHR_texture_compression_astc_sliced_3d GL_OES_EGL_image_external_essl3 GL_MESA_shader_integer_functions GL_KHR_parallel_shader_compile GL_EXT_texture_query_lod "
===================================
Swapping buffers...
Locking front buffer...
getting new framebuffer for BO...
Setting CRTC...
Clearing current context...
finished display setup!
Initializing Input devices...
Initializing Application...
Initializing Plugin Registry...
Initialized Services plugin.
[elm327plugin] elm_open: process doesn't have access to serial device "/dev/rfcomm0": No such file or directory
[elm327plugin] ELM327Plugin_init: ELM327 communication was not initialized successfully. elm327plugin won't supply any OBDII data. error code: No such file or directory
[elm327plugin] running pid query queue processor
[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(107)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.
flutter: Observatory listening on http://127.0.0.1:35297/gARv1zh8gSg=/
[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(107)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.
flutter engine successfully started up.
Running IO thread...
Sending kAdd 0 to Flutter Engine
Running message loop...
Sending kAdd 1 to Flutter Engine
Sending kAdd 2 to Flutter Engine
Sending kAdd 3 to Flutter Engine
Sending kAdd 4 to Flutter Engine
Sending kAdd 5 to Flutter Engine
Sending kAdd 6 to Flutter Engine
Sending kAdd 7 to Flutter Engine
Sending kAdd 8 to Flutter Engine
Sending kAdd 9 to Flutter Engine
Hi, @ardera!
First of all I'd like to thank for developing this project. I was able to run a project which I've been planning for a long time. And now, using the flutter I could achieve the best perfomance ever!
I've developed my project and got a working version using a forked version of your repo. It's is in the working branch.
It's running fine on my Samsung TV 32 inch, but when I try to run it on a bigger TV screen I get Segmentation fault
error without any screen. Full log:
Using mouse input from mouse /dev/input/mouse0
Asset bundle path: ./flutter_assets/build/flutter_assets/
engine_argv[0] = ./libs/flutter-pi/out/flutter_pi
initializing display...
Opening DRM device...
Getting DRM resources...
Finding a connected connector...
Choosing DRM mode...
Display properties:
0 x 0, 0Hz
1210mm x 680mm
pixel_ratio = 1.367100
Finding DRM encoder...
Creating GBM device
Querying EGL client extensions...
Getting EGL display for GBM device...
Initializing EGL...
Querying EGL display extensions...
Using display 4942280 with EGL version 1.4
===================================
EGL information:
version: 1.4
vendor: "Mesa Project"
client extensions: "EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_EXT_client_extensions EGL_KHR_debug EGL_EXT_platform_wayland EGL_EXT_platform_x11 EGL_MESA_platform_gbm EGL_MESA_platform_surfaceless EGL_EXT_platform_device"
display extensions: "EGL_ANDROID_blob_cache EGL_ANDROID_native_fence_sync EGL_EXT_buffer_age EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_MESA_query_driver EGL_WL_bind_wayland_display "
===================================
Binding OpenGL ES API...
Choosing EGL config...
Finding EGL configs with appropriate attributes...
Creating EGL context...
Creating EGL window surface...
===================================
OpenGL ES 2.x information:
version: "OpenGL ES 2.0 Mesa 19.3.2"
shading language version: "OpenGL ES GLSL ES 1.0.16"
vendor: "Broadcom"
renderer: "VC4 V3D 2.1"
extensions: "GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_EGL_image GL_OES_depth_texture GL_AMD_performance_monitor GL_OES_packed_depth_stencil GL_OES_get_program_binary GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_EXT_frag_depth GL_NV_fbo_color_attachments GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_array_object GL_EXT_occlusion_query_boolean GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer GL_NV_read_depth GL_NV_read_depth_stencil GL_NV_read_stencil GL_EXT_draw_buffers GL_EXT_map_buffer_range GL_KHR_debug GL_KHR_texture_compression_astc_ldr GL_OES_required_internalformat GL_OES_surfaceless_context GL_EXT_separate_shader_objects GL_EXT_compressed_ETC1_RGB8_sub_texture GL_EXT_draw_elements_base_vertex GL_EXT_texture_border_clamp GL_KHR_context_flush_control GL_OES_draw_elements_base_vertex GL_OES_texture_border_clamp GL_KHR_no_error GL_KHR_texture_compression_astc_sliced_3d GL_KHR_parallel_shader_compile GL_MESA_tile_raster_order "
===================================
Swapping buffers...
Locking front buffer...
getting new framebuffer for BO...
Segmentation fault
Do you have any clue about it?
Thanks in advance!
Standard way of changing flutter application orientation doesn't work on Rpi. Setting:
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
]);
doesn't affect screen layout. I've also tried with DeviceOrientation.landscapeLeft
and there is no difference.
I'm using flutter pi on a raspberry pi official touchscreen. However, when you touch the screen whenever a different finger is pressing a widget, the widget will never be released any more. This is tested on a slider and a card, but on both widgets the issue exists.
Flutter version 1.17.3
Flutter-pi version: latest commit on master 94f38d3
Flutter-pi engine: latest on engine binaries branch dcf0d22
To reproduce:
@override
Widget build(BuildContext context) {
// This method is rerun every time setState is called, for instance as done
// by the _incrementCounter method above.
//
// The Flutter framework has been optimized to make rerunning build methods
// fast, so that you can just rebuild anything that needs updating rather
// than having to individually change instances of widgets.
return Scaffold(
appBar: AppBar(
// Here we take the value from the MyHomePage object that was created by
// the App.build method, and use it to set our appbar title.
title: Text(widget.title),
),
body: Center(
// Center is a layout widget. It takes a single child and positions it
// in the middle of the parent.
child: Slider(
value: _sliderValue,
min: 0.0,
max: 1.0,
activeColor: Colors.red,
inactiveColor: Colors.black,
onChanged: (double newValue) {
setState(() => _sliderValue = newValue);
},
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
With a Card this issue is a bigger problem, because i cannot recognise a new touch after the problem arises.
Can we have GPIO access of some sort with this implementation ?? Just asking
Hi folks, first of all, thank you very much for this engine. It's amazing work.
I'm trying tu use this engine, but in portrait mode, then I do the change in the flutter code, but the pixel ratio of the display dont change, causing some mistakes in the view. The pixel ratio keeps in 1.00 even though I do changed it on rpi config.
I guess you can help me with this little thing. Thanks
Choosing DRM mode from 28 available modes...
modes[0]: name: "1024x600", 1024x600p, 60Hz, type: 72, flags: 6
this mode is preferred by DRM. (DRM_MODE_TYPE_PREFERRED)
modes[1]: name: "1920x1080", 1920x1080p, 60Hz, type: 64, flags: 5
modes[2]: name: "1920x1080", 1920x1080p, 60Hz, type: 64, flags: 5
modes[3]: name: "1920x1080", 1920x1080p, 50Hz, type: 64, flags: 5
modes[4]: name: "1280x1024", 1280x1024p, 75Hz, type: 64, flags: 5
modes[5]: name: "1280x1024", 1280x1024p, 60Hz, type: 64, flags: 5
modes[6]: name: "1440x900", 1440x900p, 75Hz, type: 64, flags: 6
modes[7]: name: "1440x900", 1440x900p, 60Hz, type: 64, flags: 9
modes[8]: name: "1152x864", 1152x864p, 75Hz, type: 64, flags: 5
modes[9]: name: "1280x720", 1280x720p, 60Hz, type: 64, flags: 5
modes[10]: name: "1280x720", 1280x720p, 60Hz, type: 64, flags: 5
modes[11]: name: "1280x720", 1280x720p, 50Hz, type: 64, flags: 5
modes[12]: name: "1024x768", 1024x768p, 75Hz, type: 64, flags: 5
modes[13]: name: "1024x768", 1024x768p, 70Hz, type: 64, flags: 10
modes[14]: name: "1024x768", 1024x768p, 60Hz, type: 64, flags: 10
modes[15]: name: "832x624", 832x624p, 75Hz, type: 64, flags: 10
modes[16]: name: "800x600", 800x600p, 75Hz, type: 64, flags: 5
modes[17]: name: "800x600", 800x600p, 72Hz, type: 64, flags: 5
modes[18]: name: "800x600", 800x600p, 60Hz, type: 64, flags: 5
modes[19]: name: "800x600", 800x600p, 56Hz, type: 64, flags: 5
modes[20]: name: "720x576", 720x576p, 50Hz, type: 64, flags: 10
modes[21]: name: "720x480", 720x480p, 60Hz, type: 64, flags: 10
modes[22]: name: "720x480", 720x480p, 60Hz, type: 64, flags: 10
modes[23]: name: "640x480", 640x480p, 75Hz, type: 64, flags: 10
modes[24]: name: "640x480", 640x480p, 73Hz, type: 64, flags: 10
modes[25]: name: "640x480", 640x480p, 60Hz, type: 64, flags: 10
modes[26]: name: "640x480", 640x480p, 60Hz, type: 64, flags: 10
modes[27]: name: "720x400", 720x400p, 70Hz, type: 64, flags: 6
Display properties:
1024 x 600, 60Hz
410mm x 260mm
pixel_ratio = 1.000000
Finding DRM encoder...
Creating GBM device
Querying EGL client extensions...
Getting EGL display for GBM device...
Initializing EGL...
Querying EGL display extensions...
Using display 0x590aa0 with EGL version 1.4
I am having the same issue as in #16
That is, flutter-pi shows a blank screen when I try to start the app when the Pi is connected to this display: https://www.waveshare.com/10.1inch-HDMI-LCD-B-with-case.htm
Connecting the Raspberry Pi to an hp 1080p monitor, everything works fine, including the touch screen panel from the above Waveshare display, so I can control the app fine by touching the display when I pipe the image to the HP monitor.
I'm running flutter-pi on Raspberry Pi 4 with the latest version of Raspbian Buster Desktop. I've modified it to boot to command line and then running flutter-pi there. The Waveshare display works otherwise fine, I'm able to for example boot to chromium in kiosk-mode and run a Flutter for Web app on it fine.
Any ideas how to get the display to work on flutter-pi? My expertise on such hardware issues is limited so it's a bit challenging to troubleshoot this one.
Here's the log when starting the app from SSH:
pi@raspberrypi:~/flutter-pi/out $ ./flutter-pi /home/pi/uikit/flutter_assets
engine_argv[0] = ./flutter-pi
initializing display...
Finding a suitable DRM device, since none is given...
looking for a suitable DRM device from 2 available DRM devices...
devices[0]:
available nodes: DRM_NODE_PRIMARY,
nodes[DRM_NODE_PRIMARY] = "/dev/dri/card1"
bustype: DRM_BUS_PLATFORM
businfo.fullname: /soc/gpu
opening DRM device candidate at "/dev/dri/card1"...
getting resources of DRM device candidate at "/dev/dri/card1"...
flutter-pi chose "/dev/dri/card1" as its DRM device.
devices[1]:
available nodes: DRM_NODE_PRIMARY, DRM_NODE_RENDER
nodes[DRM_NODE_PRIMARY] = "/dev/dri/card0"
nodes[DRM_NODE_RENDER] = "/dev/dri/renderD128"
bustype: DRM_BUS_PLATFORM
businfo.fullname: /v3dbus/v3d@7ec04000
Finding a connected connector from 1 available connectors...
connectors[0]: connected? yes, type: 0x0B (HDMI-A), 150mm x 100mm
Choosing DRM mode from 2 available modes...
modes[0]: name: "1280x800", 1280x800p, 63Hz, type: 72, flags: 10
this mode is preferred by DRM. (DRM_MODE_TYPE_PREFERRED)
modes[1]: name: "1280x800", 1280x800p, 60Hz, type: 32, flags: 6
Display properties:
1280 x 800, 63Hz
150mm x 100mm
pixel_ratio = 2.245614
Finding DRM encoder...
Creating GBM device
Querying EGL client extensions...
Getting EGL display for GBM device...
Initializing EGL...
Querying EGL display extensions...
Using display 0x5cc538 with EGL version 1.4
===================================
EGL information:
version: 1.4
vendor: "Mesa Project"
client extensions: "EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_EXT_client_extensions EGL_KHR_debug EGL_EXT_platform_wayland EGL_EXT_platform_x11 EGL_MESA_platform_gbm EGL_MESA_platform_surfaceless EGL_EXT_platform_device"
display extensions: "EGL_ANDROID_blob_cache EGL_EXT_buffer_age EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_MESA_query_driver EGL_WL_bind_wayland_display "
===================================
Binding OpenGL ES API...
Choosing EGL config...
Finding EGL configs with appropriate attributes...
Creating EGL context...
Creating EGL window surface...
===================================
OpenGL ES information:
version: "OpenGL ES 3.0 Mesa 19.2.0-rc1"
shading language version: "OpenGL ES GLSL ES 3.00"
vendor: "Broadcom"
renderer: "V3D 4.2"
extensions: "GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_EXT_texture_sRGB_decode GL_OES_EGL_image GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV GL_OES_get_program_binary GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_EXT_frag_depth GL_NV_fbo_color_attachments GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_array_object GL_EXT_occlusion_query_boolean GL_EXT_texture_rg GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer GL_NV_read_depth GL_NV_read_depth_stencil GL_NV_read_stencil GL_EXT_draw_buffers GL_EXT_map_buffer_range GL_KHR_debug GL_KHR_texture_compression_astc_ldr GL_OES_depth_texture_cube_map GL_OES_required_internalformat GL_OES_surfaceless_context GL_EXT_color_buffer_float GL_EXT_sRGB_write_control GL_EXT_separate_shader_objects GL_EXT_shader_integer_mix GL_EXT_base_instance GL_EXT_compressed_ETC1_RGB8_sub_texture GL_EXT_draw_elements_base_vertex GL_EXT_texture_border_clamp GL_KHR_context_flush_control GL_OES_draw_elements_base_vertex GL_OES_texture_border_clamp GL_OES_texture_stencil8 GL_EXT_float_blend GL_KHR_no_error GL_KHR_texture_compression_astc_sliced_3d GL_OES_EGL_image_external_essl3 GL_MESA_shader_integer_functions GL_KHR_parallel_shader_compile GL_EXT_texture_query_lod "
===================================
Swapping buffers...
Locking front buffer...
getting new framebuffer for BO...
Setting CRTC...
Clearing current context...
finished display setup!
Initializing Application...
Initializing Plugin Registry...
[services-plugin] init.
[text_input] init.
[raw_keyboard] init.
[test-plugin] init.
[elm327plugin] elm_open: process doesn't have access to serial device "/dev/rfcomm0": No such file or directory
[elm327plugin] ELM327Plugin_init: ELM327 communication was not initialized successfully. elm327plugin won't supply any OBDII data. error code: No such file or directory
[elm327plugin] running pid query queue processor
[ERROR:engine/src/flutter/shell/platform/embedder/embedder_surface_gl.cc(107)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.
flutter: Observatory listening on http://127.0.0.1:35431/U7qsOz2kkTw=/
[ERROR:engine/src/flutter/shell/platform/embedder/embedder_surface_gl.cc(107)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.
flutter engine successfully started up.
Initializing Input devices...
input device 0: path="/dev/input/event0"
WaveShare WS170120, connected via USB. vendor: 0x0EEF, product: 0x0005, version: 0x0110
Running IO thread...
Running message loop...
Is stable branch of flutter SDK used to build the flutter assets? I don't find a stable SDK release with version 1.12.3 here.
Is the flutter SDK version and flutter engine version used by flutter-pi
in anyway related?
Would the keyboard support code of flutter-pi
work if the engine-version is kept at 1.9.1? (I found out that it wouldn't but what would be the reason for that?)
Currently, flutter-pi runs without vsync, which results in visible tearing. In the future, there should be vsync support, but I first have to figure out how to do this.
There are multiple ways you can implement vsync:
I have no idea which is better (in terms of performance, compatibility, etc). Compatibility would be nice to have, since this embedder may support other platforms than raspberry pi in the future.
I encounter following error when I try to compile flutter-pi on my Raspi.
cc -D_GNU_SOURCE
-I/opt/vc/include
-I/home/pi/flutter_engine \ <- home flutter_embedder.h
-L/usr/local/lib \ <-home of libflutter_engine.so
-L/opt/vc/lib
-lrt -lbrcmGLESv2 -lflutter_engine -lpthread -ldl -lbcm_host -lvcos -lvchiq_arm -lm
./src/flutter-pi.c ./src/methodchannel.c -o ./out/flutter-pi
I get this:
/usr/bin/ld: /tmp/ccFN4OTA.o: undefined reference to symbol 'eglTerminate'
//opt/vc/lib/libbrcmEGL.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Would appreciate your support.
I forget to mention that I'm using Raspbian Stretch Lite
Apart from the fact that one is designed for Pi and other for a 64bit machine, what is the difference between flutter_wayland and flutter-pi?
Does flutter-pi run on a machine if vc4graphics isn't available?
What is the recommended approach to writing new plugins for flutter-pi?
Looking at the gpiod plugin, it looks like a dart package (no native code) combined with a gpiod.c file in the plugins folder.
What are the steps necessary to link and build the .c file and make flutter-pi aware of new plugins?
Nevertheless, I'm guessing that tapping on the TextField and typing from keyboard will also not work,
Keyboard Input will not work, because of #22.
since keyboard is still connected to text terminal.
text terminal and application are the same entity in that respect, so you can't "disconnect" a keyboard from a terminal and "connect" it to an application.
the keyboard also needs to be attached to terminal in order for text input to work. stdin is the only way to get text input (not keyboard/keycode input!) without manually parsing the Xkb config file, loading & applying keymaps.
Originally posted by @ardera in #28 (comment)
Can I have some more guidance on how I can add keyboard support? I am really interested in getting it done.
Initializing EGL...
Querying EGL display extensions...
Using display 0x14e3aa8 with EGL version 1.4
===================================
EGL information:
version: 1.4
vendor: "Mesa Project"
client extensions: "EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_EXT_client_extensions EGL_KHR_debug EGL_EXT_platform_wayland EGL_EXT_platform_x11 EGL_MESA_platform_gbm EGL_MESA_platform_surfaceless EGL_EXT_platform_device"
display extensions: "EGL_EXT_buffer_age EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_WL_bind_wayland_display "
===================================
Binding OpenGL ES API...
Choosing EGL config...
Finding EGL configs with appropriate attributes...
Creating EGL context...
Creating EGL window surface...
===================================
OpenGL ES information:
version: "OpenGL ES 3.0 Mesa 19.1.0-devel"
shading language version: "OpenGL ES GLSL ES 3.00"
vendor: "Broadcom"
renderer: "V3D 4.2"
extensions: "GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_EXT_texture_sRGB_decode GL_OES_EGL_image GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV GL_OES_get_program_binary GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_EXT_frag_depth GL_NV_fbo_color_attachments GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_array_object GL_EXT_occlusion_query_boolean GL_EXT_texture_rg GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer GL_NV_read_depth GL_NV_read_depth_stencil GL_NV_read_stencil GL_EXT_draw_buffers GL_EXT_map_buffer_range GL_KHR_debug GL_KHR_texture_compression_astc_ldr GL_OES_depth_texture_cube_map GL_OES_required_internalformat GL_OES_surfaceless_context GL_EXT_color_buffer_float GL_EXT_sRGB_write_control GL_EXT_separate_shader_objects GL_EXT_shader_integer_mix GL_EXT_base_instance GL_EXT_compressed_ETC1_RGB8_sub_texture GL_EXT_draw_elements_base_vertex GL_EXT_texture_border_clamp GL_KHR_context_flush_control GL_OES_draw_elements_base_vertex GL_OES_texture_border_clamp GL_OES_texture_stencil8 GL_EXT_float_blend GL_KHR_no_error GL_KHR_texture_compression_astc_sliced_3d GL_OES_EGL_image_external_essl3 GL_MESA_shader_integer_functions GL_KHR_parallel_shader_compile GL_EXT_texture_query_lod "
===================================
Swapping buffers...
Locking front buffer...
getting new framebuffer for BO...
Setting CRTC...
failed to set mode: Permission denied
Hi, might be you can give me an advice.
I create a simple app with following command my host machine:
flutter create helloworld
cd helloworld
flutter build bundle
Then I copied my flutter_asset folder to my RaspPI
When I try to start the app with flutter-pi I get following dump:
asset_bundle_path: ./helloworld
initializing display...
Initializing bcm_host...
Getting the EGL display...
Initializing EGL...
Choosing an EGL config...
Creating the EGL context...
Querying the display size...
Opening the dispmanx display...
Setting up the dispmanx display...
Creating the EGL window surface...
Initializing Input devices...
Initializing Application...
[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(95)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.
calling proc_resolver with glGetString
...
calling proc_resolver with glGetShaderPrecisionFormat
[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(95)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.
Running IO thread...
Running message loop...
flutter: Observatory listening on http://127.0.0.1:45969/Lsd268iTVj8=/
flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
flutter: The following assertion was thrown building MyApp(dirty):
flutter: Unknown platform.
flutter: linux was not recognized as a target platform. Consider updating the list of TargetPlatforms to
flutter: include this platform.
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0 defaultTargetPlatform (package:flutter/src/foundation/_platform_io.dart:27:5)
...
Desktop support ist enabled.
export ENABLE_FLUTTER_DESKTOP=true
I'm pretty sure I missed a step, because the example app from flutter-desktop-embedding works without any problem
I know is not related directly to you repository, but might be you have an advice for me.
I'm followed the steps from flutter from scratch article. I get nearly all my files in engine/src folder compiled. Build process stuck AT ../flutter/shell/platform/glfw/flutter_glfw.key_event_handler with ../../third_party/glfw/include/GLFW/glfw3.h:171:12: fatal error: 'GL/gl.h' file not found
In my /opt/vc/include folder copied form my Raspberry PI 3 there are only header files in EGL/GLES/GLES2. I don't have a /opt/vc/include/GL
Is there an option to use EGL or GLES instead? Or do I missing some packages on my Raspberry PI?
Thanks in advance.
hi ,
can use pi zero w (wifi or bluetooth) in flutter-pi .
thank you
When setState
is called from code instead of on user action (like mouse click or screen tap), first execution is not reflected in the UI.
Here is counter project modified to automatically increment counter value every 2s: https://github.com/dluksza/flutter_auto_refresh
On android emulator everything works fine UI shows 0, 1, 2, 3, 4, 5
etc. every 2s. But when the same code is run using flutter-pi
on Rpi3 it shows 0, 2, 4, 6
etc every 4s. whereas on console values 1, 2, 3, 4
etc. are printed every 2s.
This also means that other automatic UI updates will not be reflected until another setState
is called.
I just found this project and I would very much like to add a Flutter based UI to my code running on RPi 3B+ and RPi 4 systems under Ubuntu 19.10 (64bit). I read in your docs that 64bit support would be easy but isn't there yet. Is this possible with flutter-pi in the near future?
https://github.com/ardera/flutter-pi/tree/engine-binaries
I know flutter engine can work with Vulkan, if it is compiled with flag.
(I have builded engine 1 year ago, also i have experimented with release mode and snapshot, but result is fail.)
I am ready try install RaPi V3D 4.2 (if i find it :) )
RaPi4 has early support Vulkan now.
https://www.youtube.com/watch?v=ygBB3D5vryw
https://www.raspberrypi.org/blog/vulkan-update-now-with-added-source-code/
But this gives a performance boost.
Package dri was not found in the pkg-config search path.
Perhaps you should add the directory containing dri.pc' to the PKG_CONFIG_PATH environment variable No package 'dri' found Package dri was not found in the pkg-config search path. Perhaps you should add the directory containing
dri.pc'
to the PKG_CONFIG_PATH environment variable
No package 'dri' found
cc -c -I./include -DBUILD_ELM327_PLUGIN -DBUILD_TEST_PLUGIN -ggdb -lrt -lflutter_engine -lpthread -ldl src/flutter-pi.c -o out/obj/flutter-pi.o
In file included from src/flutter-pi.c:24:
/usr/include/xf86drm.h:40:10: fatal error: drm.h: No such file or directory
#include <drm.h>
^~~~~~~
compilation terminated.
make: *** [Makefile:15: out/obj/flutter-pi.o] Error 1
The above error was found when I did the whole in a newly flashed Raspbian Lite image
Hi,
I'm trying to get flutter-pi
running on Raspbian Buster Lite image using engine files from your other github repository. I've modified flutter_gallery
app, build assets on my Linux desktop, then transferred them to raspberry-pi. Display with touchscreen is connected to HDMI0 port. I've also installed lib packages you have listed in the README.md. But still can't run the flutter app because of DRM related issue.
Here is console output from flutter-pi
:
root@raspberrypi:~# /home/pi/flutter-pi/out/flutter-pi -t /dev/input/event0 /home/pi/flutter_assets/
Using touchscreen input from /dev/input/event0
Asset bundle path: /home/pi/flutter_assets/
engine_argv[0] = /home/pi/flutter-pi/out/flutter-pi
initializing display...
Opening DRM device...
Getting DRM resources...
drmModeGetResources failed: Invalid argument
Here are the installed packages version:
2.4.99-1~bpo10~1
19.2.0~rc1-1~bpo10+1~rpt2
19.2.0~rc1-1~bpo10+1~rpt2
19.2.0~rc1-1~bpo10+1~rpt2
19.2.0~rc1-1~bpo10+1~rpt2
Any hint what could cause drmModeGetResources failed
?
I'm trying to run the example from https://github.com/google/flutter-desktop-embedding.
It runs fine on my development PC but I get the following when trying to run it using flutter-pi on a Raspberry Pi 3 B+:
pi@raspberrypi:~ $ flutter-pi -m /dev/input/mouse0 build/flutter_assets/
Using mouse input from mouse /dev/input/mouse0
Asset bundle path: build/flutter_assets/
engine_argv[0] = flutter-pi
initializing display...
Opening DRM device...
Getting DRM resources...
Finding a connected connector...
Choosing DRM mode...
Display properties:
1920 x 1080, 60Hz
510mm x 290mm
pixel_ratio = 0.990712
Finding DRM encoder...
Creating GBM device
Querying EGL client extensions...
Getting EGL display for GBM device...
Initializing EGL...
Querying EGL display extensions...
Using display 4098528 with EGL version 1.4
===================================
EGL information:
version: 1.4
vendor: "Mesa Project"
client extensions: "EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_EXT_client_extensions EGL_KHR_debug EGL_EXT_platform_wayland EGL_EXT_platform_x11 EGL_MESA_platform_gbm EGL_MESA_platform_surfaceless EGL_EXT_platform_device"
display extensions: "EGL_ANDROID_blob_cache EGL_ANDROID_native_fence_sync EGL_EXT_buffer_age EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_WL_bind_wayland_display "
===================================
Binding OpenGL ES API...
Choosing EGL config...
Finding EGL configs with appropriate attributes...
Creating EGL context...
Creating EGL window surface...
===================================
OpenGL ES 2.x information:
version: "OpenGL ES 2.0 Mesa 19.2.0-rc1"
shading language version: "OpenGL ES GLSL ES 1.0.16"
vendor: "Broadcom"
renderer: "VC4 V3D 2.1"
extensions: "GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_EGL_image GL_OES_depth_texture GL_AMD_performance_monitor GL_OES_packed_depth_stencil GL_OES_get_program_binary GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_EXT_frag_depth GL_NV_fbo_color_attachments GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_array_object GL_EXT_occlusion_query_boolean GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer GL_NV_read_depth GL_NV_read_depth_stencil GL_NV_read_stencil GL_EXT_draw_buffers GL_EXT_map_buffer_range GL_KHR_debug GL_KHR_texture_compression_astc_ldr GL_OES_required_internalformat GL_OES_surfaceless_context GL_EXT_separate_shader_objects GL_EXT_compressed_ETC1_RGB8_sub_texture GL_EXT_draw_elements_base_vertex GL_EXT_texture_border_clamp GL_KHR_context_flush_control GL_OES_draw_elements_base_vertex GL_OES_texture_border_clamp GL_KHR_no_error GL_KHR_texture_compression_astc_sliced_3d GL_KHR_parallel_shader_compile GL_MESA_tile_raster_order "
===================================
Swapping buffers...
Locking front buffer...
getting new framebuffer for BO...
Setting CRTC...
Clearing current context...
finished display setup!
Initializing Input devices...
Initializing Application...
Initializing Plugin Registry...
Initialized Services plugin.
[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(107)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.
[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(107)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.
Running IO thread...
[ERROR:flutter/shell/common/shell.cc(178)] Dart Error: Can't load Kernel binary: Invalid kernel binary format version.
[ERROR:flutter/shell/common/engine.cc(188)] Could not prepare to run the isolate.
[ERROR:flutter/shell/common/engine.cc(127)] Engine not prepare and launch isolate.
[ERROR:flutter/shell/common/shell.cc(407)] Could not launch engine with configuration.
Running message loop...
flutter: Observatory listening on http://127.0.0.1:46873/t2-u1_WjUOE=/
The code already has debugDefaultTargetPlatformOverride = TargetPlatform.fuchsia;
. I tried deleting bin/cache on my flutter installation and rebuilding again but to no avail.
I'm using the prebuilt flutter engine.
Any tips?
It seems that flutter kernel is not compatible with flutter-pi
. I'm trying to run counter app that I've build on my linux desktop using using flutter from stable (1.9.1+hotfix.6), beta (1.10.7) and master channel. When I try to run it on raspberry I'm getting the log below:
[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(107)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.
[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(107)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.
flutter engine successfully started up.
Running IO thread...
[ERROR:flutter/shell/common/shell.cc(178)] Dart Error: Can't load Kernel binary: Invalid kernel binary format version.
Sending kAdd 0 to Flutter Engine
[ERROR:flutter/shell/common/engine.cc(188)] Could not prepare to run the isolate.
[ERROR:flutter/shell/common/engine.cc(127)] Engine not prepare and launch isolate.
Sending kAdd 1 to Flutter Engine
[ERROR:flutter/shell/common/shell.cc(407)] Could not launch engine with configuration.
Should I use specific flutter version?
Hi,
First of all so many thanks for your 'flutter-pi'. It really works very well.
There is only 1 problem I am currently facing using the "standard" 7" LCD display.
Flutter-pi only works in Landscape mode (even if the lcd_rotate=2).
Also, "await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]);" prevents the application from running.
Would you have any solution to this?
In advance, many thanks
Didier
First thanks for providing flutter-pi it helps a lot.
As everyone of us know the difference in performance of flutter between release & debug mode.
I tried adding --release to the "flutter build bundle" and tried to run the app still was is debug mode, I also tried adding --release to the "flutter-pi my_project/build/flutter_assets" still can't figure out how to build/run in release mode.
I try to make flutter asset form a new project that I create now, and edit lib/main.dart void main() to what you say after that I try to do flutter build bundle but it raises this error
Snapshot not compatible with the current VM configuration: the snapshot requires
'release use_bare_instructions no-"asserts" "use_field_guards" "use_osr"
causal_async_stacks no-code-comments x64-sysv' but the VM has 'release
use_bare_instructions no-"asserts" "use_field_guards" "use_osr"
causal_async_stacks no-code-comments arm-eabi hardfp'
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
Failed to build bundle.
I search about that and I get this error to come when dart version it not for flutter is it right?
I use flutter
Flutter 1.12.13+hotfix.8 • channel stable •
https://github.com/flutter/flutter.git
Framework • revision 0b8abb4724 (4 weeks ago) • 2020-02-11 11:44:36 -0800
Engine • revision e1e6ced81d
Tools • Dart 2.7.1
With the Flutter 1.12.13 release, will you update the engine binaries?
V1.12.13 Mainline builds don't work on the V1.9.1 Engine Binaries.
this looks really intzeresting for a project we have to build a secure collaboration system for volunteers. I already use flutter on other projects.
The main thing i need is webrtc.
I have a few high level questions:
Can i build in docker on my desktop ?
How long does the build take on a rasp pi 4 ?
Whats the approach to write a plugin. for example connectivity or Video / Audio ?
I use libwebrtc and can build for rapi pi currently.
When running my app on flutter-pi
commit e8f86132
pressing any keyboard key result in segfault error and application crash.
Within my app I don't have any text input fields. I've discovered this because wanted to switch back to text console.
What I also noticed is that mouse doesn't work. Both keyboard and mouse are connected to rpi at the same time (occupying 2 out of 4 USB ports). But now of them work.
Here is the output from running flutter-pi
engine_argv[0] = flutter-pi/out/flutter-pi
initializing display...
Finding a suitable DRM device, since none is given...
looking for a suitable DRM device from 1 available DRM devices...
devices[0]:
available nodes: DRM_NODE_PRIMARY, DRM_NODE_RENDER
nodes[DRM_NODE_PRIMARY] = "/dev/dri/card0"
nodes[DRM_NODE_RENDER] = "/dev/dri/renderD128"
bustype: DRM_BUS_PLATFORM
businfo.fullname: /soc/gpu
opening DRM device candidate at "/dev/dri/card0"...
getting resources of DRM device candidate at "/dev/dri/card0"...
flutter-pi chose "/dev/dri/card0" as its DRM device.
Finding a connected connector from 1 available connectors...
connectors[0]: connected? yes, type: 0x0B (HDMI-A), 1600mm x 900mm
Choosing DRM mode from 23 available modes...
modes[0]: name: "1920x1080", 1920x1080p, 60Hz, type: 72, flags: 5
this mode is preferred by DRM. (DRM_MODE_TYPE_PREFERRED)
modes[1]: name: "1920x1080", 1920x1080p, 60Hz, type: 64, flags: 5
modes[2]: name: "1920x1080", 1920x1080p, 50Hz, type: 64, flags: 5
modes[3]: name: "1920x1080", 1920x1080p, 30Hz, type: 64, flags: 5
modes[4]: name: "1920x1080", 1920x1080p, 30Hz, type: 64, flags: 5
modes[5]: name: "1920x1080", 1920x1080p, 25Hz, type: 64, flags: 5
modes[6]: name: "1920x1080", 1920x1080p, 24Hz, type: 64, flags: 5
modes[7]: name: "1920x1080", 1920x1080p, 24Hz, type: 64, flags: 5
modes[8]: name: "1280x1024", 1280x1024p, 60Hz, type: 64, flags: 5
modes[9]: name: "1360x768", 1360x768p, 60Hz, type: 64, flags: 5
modes[10]: name: "1152x864", 1152x864p, 60Hz, type: 0, flags: 6
modes[11]: name: "1280x720", 1280x720p, 60Hz, type: 64, flags: 9
modes[12]: name: "1280x720", 1280x720p, 60Hz, type: 64, flags: 5
modes[13]: name: "1280x720", 1280x720p, 60Hz, type: 64, flags: 5
modes[14]: name: "1280x720", 1280x720p, 50Hz, type: 64, flags: 5
modes[15]: name: "1024x768", 1024x768p, 60Hz, type: 64, flags: 10
modes[16]: name: "800x600", 800x600p, 60Hz, type: 64, flags: 5
modes[17]: name: "720x576", 720x576p, 50Hz, type: 64, flags: 10
modes[18]: name: "720x480", 720x480p, 60Hz, type: 64, flags: 10
modes[19]: name: "720x480", 720x480p, 60Hz, type: 64, flags: 10
modes[20]: name: "640x480", 640x480p, 60Hz, type: 64, flags: 10
modes[21]: name: "640x480", 640x480p, 60Hz, type: 64, flags: 10
modes[22]: name: "720x400", 720x400p, 70Hz, type: 64, flags: 6
Display properties:
1920 x 1080, 60Hz
1600mm x 900mm
pixel_ratio = 1.000000
Finding DRM encoder...
Creating GBM device
Querying EGL client extensions...
Getting EGL display for GBM device...
Initializing EGL...
Querying EGL display extensions...
Using display 8651104 with EGL version 1.4
===================================
EGL information:
version: 1.4
vendor: "Mesa Project"
client extensions: "EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_EXT_client_extensions EGL_KHR_debug EGL_EXT_platform_wayland EGL_EXT_platform_x11 EGL_MESA_platform_gbm EGL_MESA_platform_surfaceless EGL_EXT_platform_device"
display extensions: "EGL_ANDROID_blob_cache EGL_ANDROID_native_fence_sync EGL_EXT_buffer_age EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_WL_bind_wayland_display "
===================================
Binding OpenGL ES API...
Choosing EGL config...
Finding EGL configs with appropriate attributes...
Creating EGL context...
Creating EGL window surface...
===================================
OpenGL ES information:
version: "OpenGL ES 2.0 Mesa 19.2.0-rc1"
shading language version: "OpenGL ES GLSL ES 1.0.16"
vendor: "Broadcom"
renderer: "VC4 V3D 2.1"
extensions: "GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_EGL_image GL_OES_depth_texture GL_AMD_performance_monitor GL_OES_packed_depth_stencil GL_OES_get_program_binary GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_EXT_frag_depth GL_NV_fbo_color_attachments GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_array_object GL_EXT_occlusion_query_boolean GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer GL_NV_read_depth GL_NV_read_depth_stencil GL_NV_read_stencil GL_EXT_draw_buffers GL_EXT_map_buffer_range GL_KHR_debug GL_KHR_texture_compression_astc_ldr GL_OES_required_internalformat GL_OES_surfaceless_context GL_EXT_separate_shader_objects GL_EXT_compressed_ETC1_RGB8_sub_texture GL_EXT_draw_elements_base_vertex GL_EXT_texture_border_clamp GL_KHR_context_flush_control GL_OES_draw_elements_base_vertex GL_OES_texture_border_clamp GL_KHR_no_error GL_KHR_texture_compression_astc_sliced_3d GL_KHR_parallel_shader_compile GL_MESA_tile_raster_order "
===================================
Swapping buffers...
Locking front buffer...
getting new framebuffer for BO...
Setting CRTC...
Clearing current context...
finished display setup!
Initializing Application...
Initializing Plugin Registry...
Initialized Services plugin.
[elm327plugin] elm_open: process doesn't have access to serial device "/dev/rfcomm0": No such file or directory
[elm327plugin] ELM327Plugin_init: ELM327 communication was not initialized successfully. elm327plugin won't supply any OBDII data. error code: No such file or directory
[elm327plugin] running pid query queue processor
[ERROR:engine/src/flutter/shell/platform/embedder/embedder_surface_gl.cc(107)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.
detected VideoCore IV as underlying graphics chip, and VC4 as the driver.
Reporting modified GL_EXTENSIONS string that doesn't contain non-working extensions.
[ERROR:engine/src/flutter/shell/platform/embedder/embedder_surface_gl.cc(107)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.
flutter engine successfully started up.
Initializing Input devices...
input device 0: path="/dev/input/event0"
USB Keyboard, connected via USB. vendor: 0x04D9, product: 0x04D9, version: 0x805C98
input device 1: path="/dev/input/event1"
USB Keyboard System Control, connected via USB. vendor: 0x04D9, product: 0x04D9, version: 0x805C98
input device 2: path="/dev/input/event2"
USB Keyboard Consumer Control, connected via USB. vendor: 0x04D9, product: 0x04D9, version: 0x805C98
input device 3: path="/dev/input/event3"
Logitech USB Optical Mouse, connected via USB. vendor: 0x046D, product: 0x046D, version: 0x805C98
Running IO thread...
Running message loop...
What is the purpose of ELM327 plugin? Is it to let the app have bluetooth communication? Is it the ELM327 plugin that needs /dev/rfcomm0? Can the flutter-pi run without the same? Can ELM327 plugin be disabled by me if itsn't necessary?
Hello!
A new stable version of Flutter was released a few days ago. Will you be updating the engine binaries to this version, as the engine binaries are currently for the previous stable version?
I have an app that use keyboard navigation. Is it possible to take input from keyboard in Flutter-pi.?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.