• Georges Basile Stavracas Neto's avatar
    gpu-kms: Ignore GPUs with no connectors · 3832c6b6
    Georges Basile Stavracas Neto authored
    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
    3832c6b6
meta-monitor-manager-kms.c 22.7 KB