Disable Layers Automatically When Needed (Optimus?)
I found recently that the --disable-layers flag was necessary for the embedded mode to work properly on my setup. I posted some details and a few debug logs in another issue https://github.com/Plagman/gamescope/issues/526#issuecomment-1189685887
I was a little suprised to see KMS (libliftoff) and Vulkan interacting at all since I thought (from my non-expert view) that the former was for GL applications while the later had its own VK_KHR_DISPLAY for rendering directly to a DRM device so I tried disabling layers based on this hunch and it ended up working. I figured that instead of failing without the flag, that perhaps gamescope could intelligently detect when one or the other is needed.
Perhaps I don't understand things clearly but this would definitely be better UX than everyone with Optimus (et. al?) hardware thinking this doesn't work. https://github.com/Plagman/gamescope/issues/526#issuecomment-1189685887