Git Product home page Git Product logo

Comments (12)

psstoyanov avatar psstoyanov commented on July 16, 2024 1

Thank you! Just had the chance to try the changes out.

Switching to tty3 and using /dev/dri/card1 does create the Flutter window.
However, it crashes shortly after. Usually when I try to tap on the button.
Note: It crashes when using usb mouse and the touchscreen to tap on the button.

The counter text is not visible when using the PinePhone.

lldb log:

Process 6155 launched: '/home/kde/flutter-embedded-linux/build/flutter-drm-backend' (aarch64)
[WARNING][context_egl.h(95)] Failed to create EGL off-screen surface.(eglGetError: EGL_BAD_ALLOC)
[WARNING][linuxes_surface_gl_drm.h(50)] Off-Screen surface is invalid.
[ERROR][native_window_drm.cc(89)] TODO: implement here!!
[ERROR][flutter_linuxes_view.cc(60)] Failed to change surface size.
[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(102)] 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(102)] 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:38703/rbJaBwNaqM8=/
[ERROR][native_window_drm.cc(311)] Unsupported cursor: 
[ERROR][native_window_drm.cc(176)] Could not move the mouse cursor: -13
[ERROR][native_window_drm.cc(130)] Failed to set cursor buffer. (-13)
[ERROR][native_window_drm.cc(176)] Could not move the mouse cursor: -13
[ERROR][native_window_drm.cc(130)] Failed to set cursor buffer. (-13)
[FATAL:flutter/fml/memory/weak_ptr.h(122)] Check failed: (checker_.checker).IsCreationThreadCurrent(). 
Process 6155 stopped
* thread #2, name = 'flutter-drm-bac', stop reason = signal SIGABRT
    frame #0: 0x0000fffff40c26c8 libc.so.6`raise + 216
libc.so.6`raise:
->  0xfffff40c26c8 <+216>: ldr    x5, [x5, #0xed8]
    0xfffff40c26cc <+220>: ldr    x1, [sp, #0x118]
    0xfffff40c26d0 <+224>: ldr    x0, [x5]
    0xfffff40c26d4 <+228>: eor    x0, x1, x0

from flutter-embedded-linux.

 avatar commented on July 16, 2024 1

@psstoyanov
The log shows Could not move the mouse cursor: -13.
-13 means "permission denied"(EACCES).
So, it seems that the cause of the error is not being able to become a DRM master.
I added the check of the DRM master, please retry using the latest flutter-embedded-linux code.
If the log shows Couldn't become the DRM master. ..., please check your environment according to the log.

from flutter-embedded-linux.

 avatar commented on July 16, 2024 1

@psstoyanov
Thank you for your response. I'm glad your Pinephone has worked.
I confirmed debug mode on the DRM backend doesn't work in my environment (x64 ubuntu and RaspberryPi4) too.
I created #33 to investigate this issue.

I close this ticket, thank you for your support.

from flutter-embedded-linux.

HidenoriMatsubayashi avatar HidenoriMatsubayashi commented on July 16, 2024

Thank you for your report.

Just now, we've fixed #9. So, could you see here and try again? You need to specify the drm device filename properly.

from flutter-embedded-linux.

HidenoriMatsubayashi avatar HidenoriMatsubayashi commented on July 16, 2024

Thank you so much. it seems like a bug of mouse cursor. Does it crash if you don't tap on the button?

from flutter-embedded-linux.

psstoyanov avatar psstoyanov commented on July 16, 2024

From what I can see, it doesn't crash when I am not interacting with the app.

When I tap on the screen or do any keyboard or mouse keypress, the app will crash however.

I should add some animated widget in there 🙂 It is quite bland at the moment:

PinePhone photo of the DRM embedder in action

PinePhone_DRM_Mode

from flutter-embedded-linux.

HidenoriMatsubayashi avatar HidenoriMatsubayashi commented on July 16, 2024

@psstoyanov Thank you.

@Mai-Matsuura Could you check and fix the bug?

[ERROR][native_window_drm.cc(311)] Unsupported cursor: 
[ERROR][native_window_drm.cc(176)] Could not move the mouse cursor: -13
[ERROR][native_window_drm.cc(130)] Failed to set cursor buffer. (-13)
[ERROR][native_window_drm.cc(176)] Could not move the mouse cursor: -13
[ERROR][native_window_drm.cc(130)] Failed to set cursor buffer. (-13)
[FATAL:flutter/fml/memory/weak_ptr.h(122)] Check failed: (checker_.checker).IsCreationThreadCurrent(). 
Process 6155 stopped
* thread #2, name = 'flutter-drm-bac', stop reason = signal SIGABRT
    frame #0: 0x0000fffff40c26c8 libc.so.6`raise + 216
libc.so.6`raise:
->  0xfffff40c26c8 <+216>: ldr    x5, [x5, #0xed8]
    0xfffff40c26cc <+220>: ldr    x1, [sp, #0x118]
    0xfffff40c26d0 <+224>: ldr    x0, [x5]
    0xfffff40c26d4 <+228>: eor    x0, x1, x0

from flutter-embedded-linux.

HidenoriMatsubayashi avatar HidenoriMatsubayashi commented on July 16, 2024

@Mai-Matsuura I used the DRM backend on Ubuntu 20.04 desktop, but the mouse cursor won't be shown.

from flutter-embedded-linux.

 avatar commented on July 16, 2024

@HidenoriMatsubayashi

I used the DRM backend on Ubuntu 20.04 desktop, but the mouse cursor won't be shown.

I've confirmed the mouse cursor is shown with the DRM backend on Ubuntu 20.04 desktop.
If you use a user who doesn't belong to the input group, the cursor will not be shown.
See: https://github.com/sony/flutter-embedded-linux/blob/master/README.md#note
If this is not the cause, please get a log to investigate the cause of the problem.

from flutter-embedded-linux.

HidenoriMatsubayashi avatar HidenoriMatsubayashi commented on July 16, 2024

If you use a user who doesn't belong to the input group, the cursor will not be shown.

Sorry, I've completely forgot that.

from flutter-embedded-linux.

psstoyanov avatar psstoyanov commented on July 16, 2024

@Mai-Matsuura , will report tonight 👍

from flutter-embedded-linux.

psstoyanov avatar psstoyanov commented on July 16, 2024

@Mai-Matsuura , just checked on my PinePhone.
I can no longer observe the error Could not move the mouse cursor: -13.
I can't see a log message with Couldn't become the DRM master. neither.

When running the flutter app in release or profile mode:

  • no issues, the cursor is visible, the text is visible, no crashes observed when moving the cursor, clicking or tapping on the button 👍

When running the flutter app in debug mode:

  • I can't see the error for Could not move the mouse cursor: -13 nor the log message for Couldn't become the DRM master.
  • The app still crashes with the error for weak pointer
weak pointer error in debug mode
$ LD_LIBRARY_PATH=/home/kde FLUTTER_DRM_DEVICE="/dev/dri/card1" lldb ./flutter-drm-backend ./sample/build/linux/arm64/debug/bundle/
(lldb) target create "./flutter-drm-backend"
Current executable set to '/home/kde/flutter-embedded-linux/build/flutter-drm-backend' (aarch64).
(lldb) settings set -- target.run-args  "./sample/build/linux/arm64/debug/bundle/"
No entry for terminal type "xterm-termite";
using dumb terminal settings.
(lldb) run
Process 80258 launched: '/home/kde/flutter-embedded-linux/build/flutter-drm-backend' (aarch64)
[WARNING][context_egl.h(95)] Failed to create EGL off-screen surface.(eglGetError: EGL_BAD_ALLOC)
[WARNING][linuxes_surface_gl_drm.h(50)] Off-Screen surface is invalid.
[ERROR][native_window_drm.cc(97)] TODO: implement here!!
[ERROR][flutter_linuxes_view.cc(60)] Failed to change surface size.
[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(102)] 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(102)] 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:44457/7vYHYiWX6W4=/
[FATAL:flutter/fml/memory/weak_ptr.h(122)] Check failed: (checker_.checker).IsCreationThreadCurrent(). 
Process 80258 stopped
* thread #2, name = 'flutter-drm-bac', stop reason = signal SIGABRT
    frame #0: 0x0000fffff41736c8 libc.so.6`raise + 216
libc.so.6`raise:
->  0xfffff41736c8 <+216>: ldr    x5, [x5, #0xed8]
    0xfffff41736cc <+220>: ldr    x1, [sp, #0x118]
    0xfffff41736d0 <+224>: ldr    x0, [x5]
    0xfffff41736d4 <+228>: eor    x0, x1, x0
Just tried the same setup running the app in debug mode on the PinebookPro and experienced the same crash - the crash should be in a new ticket from based on the latest results. I just happened to try it first on the PinePhone.

Note: On the PinebookPro after the app crashed, the tty session remained with black screen. Switching to tty4 and then back to tty3 returned the terminal session view.

@HidenoriMatsubayashi , @Mai-Matsuura , I believe this ticket can be closed as the drm mode works with the PinePhone now.

from flutter-embedded-linux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.