-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Display not working on Ubuntu Touch #12247
Comments
What is the callstack of the loop? |
Sorry, I meant to say that the screen is constantly loading. Not sure why I used the word "loop" there. The underlying code (a very basic SDL app that works fine on Ubuntu desktop) runs normally, and enters the app's main loop without any issue. It renders the window to be a uniform color, which works on desktop, but on Ubuntu Touch, it displays the loading spinner infinitely starting from ca2c9f6. The parent commit works as expected. I've tried to undo just this change and this change, but the issue persists, so it probably has something to do with the deduplication algorithm. |
Yes, what's the callstack while it's stuck loading? |
I'm not sure I understand, but the code itself never gets stuck; SDL does not report any error and the app continues normally, as if no error happened. The system side of the window displays a loading spinner indefinitely, but it does not hang the app itself; the code keeps running as expected. I tried to debug on my device, to see if there's any other thread that's stuck, but I struggle to get GDB working. Is there an SDL thread in particular you would like me to check, and/or is there some way to debug windows from the system side? |
Ah, I was under the impression that it was looping indefinitely trying to get the correct video driver. What video driver do you end up with? |
Wayland; X11 is also supported, but it has to launch a compatibility program (not XWayland, really a separate program) which spawns a new window, and generally does not work well within the OS. It does work when I force the driver to be X11, but I would prefer to make it work with Wayland if at all possible, and looking at the commit in question and given that it runs well with Wayland prior to that commit, it seems that it's not a problem with Ubuntu Touch's support of Wayland. |
Are you sure it's getting wayland? My understanding is that commit only enables Wayland if certain compositor extensions are supported. Only two outcomes are possible, you either get x11 or wayland. If you set SDL_VIDEO_DRIVER to either one of those, that should bypass the autodetection logic. Does explicitly setting the video driver to both of those values work correctly? |
I've forced the driver with |
That's wild. There's literally no change in driver functionality before ca2c9f6 and afterwards. I don't know why it would fail to initialize afterwards. |
In a few hours, I'll take some time to revert the commit line by line and see which exact part causes the issue. |
I've narrowed it down: the problem ceases to happen when I give distinct identifiers to the preferred and fallback wayland drivers. By appending I deduce that the preferred driver has some issue that affects Ubuntu Touch, and that the fallback driver doesn't have that issue. I'll try to find out what it is, but analysing the drivers might turn out to be quite a large task. If someone has deeper knowledge about the differences between the preferred and the fallback driver, it would help me a lot. |
I've narrowed it down even further: the offending line is the call to In all situations on Ubuntu Touch, SDL attempts to create the preferred driver, fails for some reason, and then attempts to create the fallback driver, successfully. The fallback driver won't display anything unless I comment some code that is specific to the preferred driver; I suspect that a failing preferred driver leaves the environment in an unclean state, which affects the fallback driver. Has there been testing to ensure that the fallback mechanism works properly? I suppose that a device that supports Wayland but doesn't work with the preferred driver (only the fallback) is quite rare. I'll try to find exactly where it fails on Ubuntu Touch, and then manually make it fail at the same place on desktop; that way, I can see if the problem lies in SDL or Ubuntu Touch. |
@Kontrabant, are we missing important information in that first roundtrip during extension detection? |
Hmm, maybe we need a round trip after destroying the registry in Wayland_IsPreferred() to ensure that everything is cleaned up before possibly unloading the symbols and libraries and trying again? @Semphriss, can you try adding |
I'm on commit ca2c9f6, I presumed the corresponding line was 418 (between |
On Ubuntu Touch, windows are not displaying properly. They are stuck in a loading loop.
I've bisected the breaking commit to be ca2c9f6, however I'm not entirely sure how to fix the issue. I'll investigate and provide more information, but I'd need help from experienced SDL developers to make sure the fix I come up with doesn't break anything else.
The text was updated successfully, but these errors were encountered: