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

Show splash screen above Cage #366

Open
The-Man11 opened this issue Oct 16, 2024 · 5 comments
Open

Show splash screen above Cage #366

The-Man11 opened this issue Oct 16, 2024 · 5 comments

Comments

@The-Man11
Copy link

Hi everyone, much love from Italy!
I am currently building an embedded system for a car infotainment, and decided to opt for Cage, since it seemed the most sensible choice.

I tried (with no success, and not much experience either) to keep the Plymouth (or any other splash screen) active after starting Cage, but to me it seems not possible. Not sure if it is even supported by hardware/software implementations.

Let me know if there could be any workaround or solution to this, since i would really need to keep up that splash screen to hide some of the loading that is happening inside of the application. (And i think there might be quite a lot of use cases for this, mostly for embedded systems).

Thanks,
Man

@joggee-fr
Copy link
Collaborator

I don't know if it is Cage or elsewhere, but I think the "framebuffer" (DRM devce) is cleared at Cage initialization. Are you not able to show a kind of splash screen directly in the started application?

@emersion
Copy link
Contributor

I think that'd be a very nice feature.

Yeah, on startup cage performs a modeset with a black buffer. We'd need to avoid doing that modeset for outputs which are already turned on and if we can page-flip with our own swapchain, then delay the render loop until the client commits its first buffer.

@The-Man11
Copy link
Author

I don't know if it is Cage or elsewhere, but I think the "framebuffer" (DRM devce) is cleared at Cage initialization. Are you not able to show a kind of splash screen directly in the started application?

Hi Jonathan!
Yes well, i implemented that splash screen on the application as well since i could not find a solution using Cage, but it is sub-optimal. The Plymouth splash disappears, then there is a black screen, followed by a white screen briefly, and that is not really something I would want on my finished product (bear in mind that right now its only a personal project, so it doesnt really matter that much), but i would prefer something more polished and OEM-like.

@The-Man11
Copy link
Author

The-Man11 commented Oct 17, 2024

I think that'd be a very nice feature.

Yeah, on startup cage performs a modeset with a black buffer. We'd need to avoid doing that modeset for outputs which are already turned on and if we can page-flip with our own swapchain, then delay the render loop until the client commits its first buffer.

Exactly Simon! It would be very cool, and not limited to this case, but as i said it could be used for other purposes, like terminals, vending machines etc.

I am not sure about what you wrote tho, i didn't really understand much of it ahahah. But correct me if i'm wrong, in simple terms what you are saying is that we should try to "disable" the video output until the first frame of the app renders, right?

My goal as i said is to have a clean startup.
Power Button > Splash Screen (with no flickers, black or white screens) > Loaded App (which in this case is React Carplay by Rhys Morgan)

I modified it a bit but still is not as nice as i would like the final project to look like...

@ZirixCZ
Copy link
Contributor

ZirixCZ commented Oct 20, 2024

Does the client immediately commit its buffer @The-Man11 ? Are you trying to display splash until the client commits, or are you trying to hide the client's loading state. You mentioned "then there is a black screen, followed by a white screen briefly,". If cage waited for the client's frame buffer commit and the client committed with a white screen, it would be displayed regardless. You also asked for a workaround. This is what I though of. Use Plymouth's Fade-In option. When cage loads spawn your app and immediately the splash screen again. Once your app loads, kill the splash screen. Post demonstrative videos if you try any workarounds, I'm curious of how it'd look like.

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

No branches or pull requests

4 participants