Ghost applications after wake

I have bluefin-dx installed on a laptop (Dell G15 5515 Ryzen Ed) connected to an external screen.
I’m usually working with laptop screen closed, and bluetooth mouse and keyboard.

All is well, but when I turn off the external screen and come back after a while, I’m witnessing the following behaviour:

  1. I have to open the laptop lid in order to wake it up because it doesn’t respond to mouse/keyboard commands. (I understand that it may be to BT)
  2. Some apps (including vscode) are not shown as running in the Dock, but they are still live as per Mission Center Apps list. Also the processes I’ve started in vscode terminal are also live.

Some questions:

  1. Is there any way to prevent app windows from disappearing after wake?
  2. If it’s not possible, how do I get again the specific vscode UI to appear, without launching a new vscode window?

Do you see anything in right-click | All Windows?

Or, can you Meta-Tab to VSCode?

No, nothing.
If I create a new vscode window, the original window is not shown in ‘All WIndows’, or in Alt-Tab.

Strange.
Since we’re in long shot territory:
If you look in the app overview, do you have more than one vscode?
At times, I’ve had a couple due to installing in a distrobox, etc.

Investigating further the issue, I saw that it’s maybe a vscode issue (or its flatpak?) because it’s happening also when I quit vscode from the x button on its title bar.

If I have started a process (let’s say erlang’s beam) then by closing in this way there is a remnant process called “common” below “Visual Studio Code” in the running apps list, but no “code” (!!) which is the actual parent vscode process.

Edit: It’s "conmon’ and not “common”

ChatGPT answer :angry:

I’ve also changed vscode setting:
"terminal.integrated.confirmOnExit": "always",
which resulted in a nice vscode dialog question window on exit, but the result is the same :
conmon is still running and underneath the beam.smp process.

You mentioned flatpak, on bluefin-dx, Vscode is installed in the system, so the flatpak version isn’t used (or needed).

Yes, you’re right!
vscode was automatically installed with the system.

The other thing that comes to mind, is that the zombie process starting in vscode’s terminal is exported as a binary from a distrobox.

I’ve installed erlang and elixir on a rockylinux9 container following along the lines this guide .