pop-os / cosmic-comp

Compositor for the COSMIC desktop environment
GNU General Public License v3.0
420 stars 53 forks source link

Add support for linux-drm-syncobj-v1 #409

Open ryzendew opened 3 months ago

ryzendew commented 3 months ago

In recent developments, Linux desktop environments have been transitioning from implicit sync mechanisms to explicit sync. This shift aims to enhance performance, responsiveness, and overall user experience. Two prominent desktop environments, Mutter and Plasma, have already embraced this change, and more are following suit.

Here’s a breakdown of the key points:

  1. Implicit Sync vs. Explicit Sync: Implicit Sync: Traditionally, Linux desktop environments relied on implicit synchronization mechanisms. These mechanisms automatically synchronized various processes, such as rendering graphics, handling input events, and managing window updates. However, this approach sometimes led to inefficiencies and unnecessary resource consumption.

  2. Explicit Sync: The move towards explicit synchronization involves giving developers more control over synchronization points. Instead of automatic synchronization, explicit sync allows developers to specify when synchronization should occur. This fine-grained control enables better optimization and reduces unnecessary overhead.

https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/90

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3300

https://github.com/Smithay/smithay/pull/1356 Seems its a thing sorta may the 15th explicit sync comes to nvidia!

https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/967 was just merged also

CosmicFusion commented 3 months ago

Just to add:

So this would help nvidia cards greatly.

ryanabx commented 3 months ago

Duplicate of https://github.com/pop-os/cosmic-comp/issues/343

ryzendew commented 3 months ago

Duplicate of #343

Mine was better

gabriele2000 commented 3 months ago

Duplicate of #343

Mine was better

Heh, I know

ids1024 commented 3 months ago

Nvidia's XWayland explicit sync merge request was just merged: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/967

From recent comments on https://github.com/NVIDIA/egl-wayland/pull/104, it seems the Nvidia 555 driver should have explicit sync support for Wayland EGL, and for GLX. While Vulkan WSI support for it will be in 560.

Edgars-Cirulis commented 3 months ago

Just to add:

  • Nvidia drivers do mot support implict sync at all and never will, thus synchronisation is completely broken on nvidia cards, However explicit sync is partially supported in nvidia 545 and later, and we were promised full and total support for explicit sync in nvidia 555

So this would help nvidia cards greatly.

"Nvidia drivers do mot"? What that means?

leviport commented 3 months ago

I believe that is a typo. "do mot support" is close to "do not support". M and N are next to each other on QWERTY keyboards.

SteavenGamerYT commented 3 months ago

what is wrong in this?, explicit sync was merged everywhere expect this and wlroots

ids1024 commented 3 months ago

It's being worked on (https://github.com/Smithay/smithay/pull/1356, https://github.com/pop-os/cosmic-comp/pull/411).

This is most important with Nvidia drivers, and its still another month before there's an Nvidia beta driver that supports it. It will be good to have something working by then to test that XWayland is working better on Nvidia.

It's potentially better for performance of Vulkan applications on Mesa drivers, but in most cases it shouldn't really have any noticeable impact. So it's not especially urgent.

ryzendew commented 3 months ago

for nvidia users it's urgent may the 15th changes everything and i have a video that will let every nvidia user on ubuntu or arch even fedora and pop compile the patches and use them

DemiMarie commented 1 month ago

Implicit sync also causes serious problems for driver implementers and the entire userspace stack. See https://lpc.events/event/11/contributions/1115/attachments/929/1831/Why%20we%20can't%20have%20nice%20things.pdf.