complexlogic / flex-launcher

A customizable HTPC application launcher for Windows and Linux
https://complexlogic.github.io/flex-launcher/
The Unlicense
226 stars 13 forks source link

Launched apps can't draw on screen on Pi 4 without desktop environment #19

Closed Samutz closed 2 years ago

Samutz commented 2 years ago

I can launch apps and they are running, but I think the launcher isn't releasing the screen to allow them to draw. So the launcher screen stays stuck on screen while they run. Is there any way to fix this without a desktop environment?

The apps I'm trying to use are Moonlight-qt and Steamlink. Neither of which require a desktop environment.

For now, I'm working around this by the menu items launch a script that closes flex-launcher, launches the app, and then re-runs flex-launcher when the app closes.

complexlogic commented 2 years ago

Can you give more information on your setup? Are you just running a plain X server with startx?

Samutz commented 2 years ago

I forgot to mention that the OS is Raspberry Pi OS Lite (Debian 11 Bullseye) 64-bit.

No x server. No window manager. I just boot in to bash and .bashrc runs flex-launcher.

Before, I was starting moonlight-qt on startup, but it lacks controls for reboot and shutdown.

complexlogic commented 2 years ago

Ok, so you are using the KMS video backend. I haven't used it before, but I just tried it out and I was able to reproduce your issue.

In KMS, the application is drawing directly onto the GPU's framebuffer. It's not possible for two applications to draw at once. To get it to work, I would have to add some code to completely destroy the launcher's window upon application launch, and then recreate it after the application finishes. The problem with this is that in SDL, destroying the window also destroys the rendering context along with all of the rendered textures. This would hardly be different in terms of performance than just restarting Flex Launcher entirely - as you're currently doing.

So I don't think there's anything further I can do in this case. KMS is really meant for if you just want to run a single application. Either keep going with your current setup, or consider switching to a lightweight window manager such as Openbox. I give some instructions how to do an Openbox-based setup in my Linux setup guide documentation.