Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Using Allegro with Xwayland on an imx6 platform

This thread is locked; no one can reply to it. rss feed Print
Using Allegro with Xwayland on an imx6 platform
thejefty
Member #23,737
February 2023

We're having a problem getting a new Allegro project up and running on an IMX6 SMARC board.
We're using a Yocto image (based on core-image-weston-imx6 with various tools and libraries added). Native Wayland executables run with acceleration. We have Xwayland running.
We've been able to build Allegro 5.2.7, but the example programs fail with the message "Unable to set any graphic mode".

It seems like this should work and there's something obvious that we've missed, but I can't figure it out.
Anyone have any thoughts?

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

thejefty
Member #23,737
February 2023

But it should work using Xwayland, right?

Seems to on an X86 platform.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Not being able to set a graphics mode is a fatal failure. I don't know anything about XWayland. Is it based on X11? Sounds like it should run, but I don't know.

Also, that sounds like an Allegro 4 error message. Does al_init succeed?

thejefty
Member #23,737
February 2023

It's definitely in Allegro5. al_init() succeeds. It's al_create_display() that was failing. And still is, but differently.

I've actually made a bit of progress, though I'm not entirely sure how. The original issue might have been that xwayland wasn't started properly.

Now it's actually seg-faulting in fill_in_info_struct() because the GL_RENDERER passed in is empty. Should be Vivante GC2000, but it's not yet clear to me how it's supposed to be set.

Edit: More accurately, glGetString is returning null when passed GL_RENDERER

dthompson
Member #5,749
April 2005
avatar

Hah, so I'm seeing a few possible red flags here. By nature, Yocto images are liable to exclude stuff you'd normally take for granted; that could involve any number of missing dependencies.

A few things it'd be worth checking:

  • Can you try shoving plain old XOrg (and all of its dependencies) into your image too, and then try again with XWayland?

  • Are you able to run a more full-fat Linux on the board? If so, will your program run under XWayland on that?

  • Are you able to run your program on XOrg without any Wayland at all?

______________________________________________________
Website. It was freakdesign.bafsoft.net.
This isn't a game!

thejefty
Member #23,737
February 2023

I definitely suspect it's a Yocto missing some dependency problem. Question is what? And I'm kind of surprised cmake didn't catch it, but I guess there are run time things not needed for the build.

We've tried a full Ubuntu build and could get allegro to run, but we couldn't get graphics acceleration that way, which is why we turned to the manufacturer's Yocto build.
Similarly with an older pre-Wayland image - Allegro, but no acceleration.

I can try getting all the xorg stuff onto the image, though I'm not sure yocto will cooperate.
Edit: I take that back. xserver-xorg is already in the image.

I've dug a bit deeper, with a debugger and a Debug build of Allegro. It seems to be glXMakeContextCurrent that's failing - then it crashes after that when it tries to use a null GL_RENDERER that it got from the current context. Doesn't seem to be logging the error from that anywhere I can find though, so I can't tell why it's failing.

dthompson
Member #5,749
April 2005
avatar

Hmm. I wonder whether this means that it's the enablement of graphics acceleration itself that's causing the problem?

I guess there's a small chance this could be a hardware issue, so do you have another board you could try this on?

______________________________________________________
Website. It was freakdesign.bafsoft.net.
This isn't a game!

Go to: