Virtual displays go black after being idle for 10sec when screen is off (original) (raw)

Environment

Describe the bug

Virtual displays created with --new-display all automatically go black after not interacting with any of them for 10 seconds, the countdown seems to start only once the physical screen turns off.

This doesn't occur with --stay-awake, but that requires the device to be plugged in which might not always be practical. The only workaround I found to prevent this behavior when connecting wirelessly is to keep the physical screen awake manually, either by tapping it or through third party utilities (Caffeinate, etc), which is still not ideal since it increases battery usage.

One weird thing about this blackout behavior, that is only noticeable with #6772, is that the black out seems to be just an opaque black surface that takes the size of the virtual display the moment it appears, and stays the same size even if the display is resized, revealing that the app below is still rendering and still playing animations, albeit non-intractable.

Example of a resized virtual display with this issue

The blackout doesn't disappear once the physical screen is waked up again, but the virtual display regains input interactivity, but only in the areas not covered by the blackout surface.

I also tried --no-vd-system-decorations but to no avail.