Announcement

Collapse
No announcement yet.

Wine Wayland Driver Lands Mouselook Support, Relative Cursor Motion

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Originally posted by shmerl View Post

    How is it worse with latency? If you are using 60 Hz display, worrying about latency shouldn't be your concern, rather getting a better display should be.
    In short: VSync pushes complete frames to the monitor at a fixed interval (which is known as vblank). This causes the compositor to delay rendering until frames are ready which means the monitor's buffer isn't updated as soon as possible (to fix tearing). This introduces higher latency.

    Another issue is missing vblank deadline which causes output to be delayed even more. This creates stuttering.

    Speaking of rendering, Wlroots (+Sway) have a major scheduler update to avoid missing vblank which will improve output latency:
    https:/gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4307

    Here's a benchmark of this PR to demonstrate render time vs vblank deadline:


    I've tried every Wayland compositor and Sway is already noticeably smoother than any other project (even without this update).
    Last edited by Kjell; 09 December 2023, 12:33 PM.

    Comment


    • #22
      Originally posted by Kjell View Post

      In short: VSync pushes complete frames to the monitor at a fixed interval (which is known as vblank).
      Forget about vsync. We are talking about a proper use case like adaptive sync (VRR) working with decent refresh rate and such and then above monitor refresh rate using something like Vulkan mailbox present mode.

      Too much latency implies you have compositor doing some stuff not efficiently which delays submitting frames sooner.

      So going back to the above, how is Wayland causing any issues for that?

      If people are using old style vysnc and 60 Hz, complaining about latency should be the least of their concerns.

      More precise frame scheduling is an interesting one. If that improves things by decreasing latency - all the better. But how is X11 better than Wayland in that regard anyway?
      Last edited by shmerl; 08 December 2023, 05:09 PM.

      Comment


      • #23
        Originally posted by shmerl View Post

        So going back to the above, how is Wayland causing any issues for that?
        In layman terms, Wayland is just a protocol. Unlike Xorg there is no shared code/implementation. This gives developers the freedom to use any programming language to create a custom compositor. As a result, each implementation has subtle performance differences and features.

        When people talk about worse latency "in Wayland" they're often talking about bottlenecks of VSync (which I explained above) and the fact that a lot of people still don't have VRR (which you pointed out).

        However, the biggest problem (in my opinion) that gives Wayland a bad reputation is the lack of a unified codebase (yay Unix). This means you'll have implementations which are underperforming (like direct scanout breaking VRR in Sway for years now), high output latency in Hyprland (only god knows why) or cursor pane breaking VRR in KDE and Wlroots (due to missing atomic page flips in the kernel from my understanding).

        Nonetheless, I still love Wayland and I use Sway every day
        Last edited by Kjell; 09 December 2023, 11:58 AM.

        Comment


        • #24
          Originally posted by Kjell View Post

          In short: VSync pushes complete frames to the monitor at a fixed interval (which is known as vblank). This causes the compositor to delay rendering until frames are ready which means the monitor's buffer isn't updated as soon as possible (to fix tearing). This introduces higher latency.
          Allow me to interject for a moment: From a Computer Science perspective, this is how it should be done. You should always push complete frames to the screen, otherwise you get half-frames overlaid on top of previous full frames, aka screen tearing, which is worse than having some frame latency.

          Comment


          • #25
            Originally posted by kurkosdr View Post
            Allow me to interject for a moment: From a Computer Science perspective, this is how it should be done. You should always push complete frames to the screen, otherwise you get half-frames overlaid on top of previous full frames, aka screen tearing, which is worse than having some frame latency.
            That's why I really enjoy Wayland + VRR

            Comment


            • #26
              Originally posted by Kjell View Post
              I have a 4k@144Hz monitor with low pixel latency which makes tearing extremely noticable and irritating.

              I've tested every possible configuration and perfect frames delivered through variable refresh rate is the smoothest option in my opinion. This makes Wayland + VRR just perfect.

              I can totally understand that forced vsync isn't appealing to people with low specs or low resolution + high refresh rate (like CSGO)

              Yes, I play competitive games like Rainbow Six Siege in high rank on Windows just fine with VRR
              "just fine" is an opinion. You get up to 2 frames of latency with Vsync (don't ask me why, look at videos that measure it with high speed cameras). That's pretty huge if you ask me.

              BTW latency adds up. Even if your reaction time is order of magnitude larger, it doesn't shadow it. It adds up. 200 reaction becomes 230 and so on.

              Anyway, I agree tearing is awful when you're doing casual stuff like browsing. That's why I enable tearing only on fullscreen unidirect on X11 compositor. I have no idea if Crapland allows something similar, it's unusable for me until they allow querying absolute window positions or setting it from applications and not just the fucking compositor.
              Last edited by Weasel; 09 December 2023, 03:36 PM.

              Comment


              • #27
                Originally posted by kurkosdr View Post
                Allow me to interject for a moment: From a Computer Science perspective, this is how it should be done. You should always push complete frames to the screen, otherwise you get half-frames overlaid on top of previous full frames, aka screen tearing, which is worse than having some frame latency.
                Worse? LMFAO.

                You're obviously a no name casual who doesn't play video games competitively. Nobody cares about your input on latency because you don't need it. But other people do. Saying "it's not important" is just bullshit, it's like you're blind and tell someone that monitor quality and resolution do not matter. Because you're blind.

                Nobody cares about your use cases. Stop making general claims.

                Comment


                • #28
                  Originally posted by shmerl View Post
                  How is it worse with latency? If you are using 60 Hz display, worrying about latency shouldn't be your concern, rather getting a better display should be.
                  Worse means it has more latency.

                  Display is irrelevant. That's a software fact on the same monitor.

                  That's like saying, A is slower than B but just get better hardware so it's faster than B on slower hardware!

                  Anyway, he brought up latency so he obviously does care.

                  Comment


                  • #29
                    Originally posted by Weasel View Post
                    Worse? LMFAO.

                    You're obviously a no name casual who doesn't play video games competitively. Nobody cares about your input on latency because you don't need it. But other people do. Saying "it's not important" is just bullshit, it's like you're blind and tell someone that monitor quality and resolution do not matter. Because you're blind.

                    Nobody cares about your use cases. Stop making general claims.
                    The correct way to do it is with V-sync on, you are free to play with V-sync off or with no shaders or with wireframe graphics so you can play competitively on an old monitor+pc combination, but it's not how it should be done. All the stuff I mentioned above are hacks to get more performance out of sub-par hardware but give you a picture that's out-of-spec.

                    Also, competitive players who know what they are doing have moved to VRR years ago.

                    Comment


                    • #30
                      Originally posted by kurkosdr View Post
                      The correct way to do it is with V-sync on, you are free to play with V-sync off or with no shaders or with wireframe graphics so you can play competitively on an old monitor+pc combination, but it's not how it should be done. All the stuff I mentioned above are hacks to get more performance out of sub-par hardware but give you a picture that's out-of-spec.

                      Also, competitive players who know what they are doing have moved to VRR years ago.
                      What do you mean "the correct way to do it is with V-sync on"? The whole point of this conversation was that Vsync has to be able to be turned off. I can turn it off only for specific unidirected fullscreen windows on my X11 compositor, so I get no tearing rest of the time, and Wayland somehow still manages to get more latency even with tearing. I heard some compositors also force triple buffering (yuck) or something, that's simply insane.

                      Also, unrelated, but VRR adds slight latency especially with Freesync unless you turn VSync off. You know it's not that complicated to look at videos people post with high speed cameras. Though I guess it does depend on the monitor but would you really take a risk when you can simply turn it off?

                      Comment

                      Working...
                      X