Skip to content
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

Atomic Modeset fails #383

Open
hundeboll opened this issue Aug 30, 2023 · 8 comments
Open

Atomic Modeset fails #383

hundeboll opened this issue Aug 30, 2023 · 8 comments
Labels
drm Topics of DRM backend

Comments

@hundeboll
Copy link

Hi,

I'm trying to run flutter-embedded-linux on a buildroot based linux using the eglstream backend for an nvidia card. I've enabled modesetting on the command-line, but it fails like this:

# LD_LIBRARY_PATH=/root/drm/lib/ FLUTTER_DRM_DEVICE=/dev/dri/card0 ./flutter-drm-eglstream-backend -b drm/
[ERROR][native_window_drm_eglstream.cc(132)] Failed to commit an atomic property change request
[ERROR][elinux_window_drm.h(131)] Failed to create the native window (/dev/dri/card0).
Segmentation fault (core dumped)

The dmesg.log (with drm.debug=0xff on the command line) does give a hint about no framebuffer being set.

I am by no means an DRM expert, so any hints would be greatly appreciated.

@HidenoriMatsubayashi HidenoriMatsubayashi added the drm Topics of DRM backend label Aug 30, 2023
@HidenoriMatsubayashi
Copy link
Contributor

I'm trying to run flutter-embedded-linux on a buildroot based linux using the eglstream backend for an nvidia card.

Specifically, what device are you using? Also, did you run that command with sudo?

@HidenoriMatsubayashi
Copy link
Contributor

Can you modify the source code as below and see what happens?

native_window_drm_eglstream.cc:

  drmModeAtomicFree(atomic);
  if (result != 0) {
    ELINUX_LOG(ERROR) << "Failed to commit an atomic property change request: " << result;
    // return false;  <= comment-out
  }

@hundeboll
Copy link
Author

Running as root, yes. With the suggested changes:

# LD_LIBRARY_PATH=/root/drm/lib/ FLUTTER_DRM_DEVICE=/dev/dri/card0 ./flutter-drm-eglstream-backend -b drm/
[ERROR][native_window_drm_eglstream.cc(132)] Failed to commit an atomic property change request: -22
[ERROR][environment_egl_stream.cc(16)] Failed to set extension function pointers
[ERROR][context_egl.cc(71)] Failed to choose EGL surface config: eglGetError: EGL_BAD_DISPLAY
[ERROR][context_egl_stream.cc(20)] Failed to set extension function pointers
Segmentation fault (core dumped)

@HidenoriMatsubayashi
Copy link
Contributor

[ERROR][native_window_drm_eglstream.cc(132)] Failed to commit an atomic property change request: -22

-22 means:

-EINVAL if DRM_CLIENT_CAP_ATOMIC is not enabled, the value of flags is illegal, or atomic property IDs in the request are not recognized.

BTW, what device are you using?

@hundeboll
Copy link
Author

NVIDIA GPU GeForce GTS 450 (GF106)
NVIDIA GLX Module 390.151

@HidenoriMatsubayashi
Copy link
Contributor

I see. I haven't tried this backend on desktop graphics cards.

Sorry, I can't think of anything right away. Need investigation.

@hundeboll
Copy link
Author

No problem. Thanks for a prompt response!

@HidenoriMatsubayashi
Copy link
Contributor

If you find a bug, please send a pull request :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
drm Topics of DRM backend
Projects
None yet
Development

No branches or pull requests

2 participants