Ignore KMS GPUs with no connectors
Disclaimer: I have no idea if this is the correct fix to issue #77 (closed). I can only attest that my branch fixes the issue in my computer.
(Copying the commit message of the last commit of this branch here)
Mutter recently gained the ability to deal with multiple GPUs rendering at different displays. These GPUs would have a display connected to them, and Mutter was adapted in order to be aware of different GPUs and their outputs.
However, one specific edge case appeared: PRIME systems. PRIME systems have two GPUs:
The integrated GPU (iGPU), usually Intel, which has connectors and deals with the routine load.
The dedicated GPU (dGPU), usually AMD or NVidia, which has no connectors at all and are there just to aid heavy loads.
On those systems, the dGPU is aggressively put to sleep by the kernel to avoid energy waste. Waking it up is a costly operation.
With Mutter's adaptation to deal with multiple GPUs, Mutter began wakening the dGPU every time some rendering had to be done. This was causing stuttering every time the dGPU was put to sleep, and Mutter asked it to wake up again.
To fix this situation, this commit ignores GPUs with no connectors attached.
Issue: #77 (closed)