Closed baharanchi closed 10 months ago
Fist of all, Does any native Wayland client (not flutter) app work fine on your board (+sway)?
Sway itself works fine and I could run "LXTerminal" on it. But I don't know about any native Wayland client apps. Can you give me an example so I can test it on the board?
How about weston-simple-egl
?
Executing weston-simple-egl
prints Segmentation fault
and exits immediately with a return code of 139.
weston-simple-shm
works fine though.
Okay.
Can you please try the followings?
I tried but it made no difference. I got the exact same error. And also weston-simple-egl
still produces segmentation fault.
Hmm. Sorry, I can't give you any more advice as I don't have that board. If you have an interest to fix this issue, it would be great you investigate this failure point. For some reason, it looks like eglGetDisplay returns EGL_NO_DISPLAY
on your environment.
Okay thanks. Is there any difference in terms of performance or features between X11 and Wayland backends? I want to determine if I really need the Wayland backend.
It depends on system requirements and target board spec, but in general x11 system is heavier than wayland in terms of graphics performance and memory footprint. And also x11 requires a number of dependent libraries.
What about the produced flutter app executable? Do they behave the same in areas like graphics hardware acceleration? In particular, I use Canvas heavily in my project. Do you expect Canvas to be faster on Wayland than X11?
Do they behave the same in areas like graphics hardware acceleration?
Yes, I think so.
Do you expect Canvas to be faster on Wayland than X11?
I'm not sure. I recommend you to evaluate it first on other arm64 devices such as Raspberry Pi 4 that I've confirmed flutter-elinux (both x11 and wayland) works fine.
@baharanchi Just FYI. If you run flutter with wayland backend, please try to use --async-vblank
option to improve performance.
See the links below:
I solved the problem by changing the Linux image. At first I was using the official Debian image mentioned in the NanoPC-T4 wiki which had the problem. Then I tried the unofficial Armbian image for the device and it resolved the issue. I think it has something to do with this forum post.
There was another problem though. I couldn't run Sway or the sample application with Wayland backend directly from the default desktop. So I decided to run Sway from a tty and then run the sample application from a terminal inside Sway. In order to start the terminal in Sway, you can use Mod + Enter
key combinations (Mod is the Super key by default and can be changed in the Sway config file). Also the default terminal in Sway is foot
which should be installed using sudo apt install foot
(This can also be changed in the Sway config file). I hope this helps anyone who might be having the same problem.
I should also note that I feel Flutter applications have better performance on Wayland than X11 in my experience.
I have a NanoPC-T4 development board. I tried to run the sample code on the board on Sway using the commands:
But I got the following error:
Here is the output of
flutter-elinux devices
:I should note that I have no problem running the sample on X11 using the following command:
$ flutter-elinux run -d elinux-x11
The problem occurs only in Wayland mode.