I don’t think he should have included the starting frame-- if the cursor were theoretically instant, his method records it with a 1 frame delay, and this +1 frame error happens on every test. Correcting this actually makes Wayland more laggy proportionally, although it makes both less laggy absolutely.

  • tal
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    edit-2
    2 days ago

    Plasma

    I don’t perceive this with Sway (1.10-2) using a mouse being polled at 1000 Hz.

    When I turn on my monitor’s FPS display and my mouse is not moving, the monitor reports that the frame rate drops down to the lowest rate available (48 Hz), then when the mouse is moving, jumps up to the highest rate.

    investigates

    Hmm. Apparently there’s someone complaining about that behavior occurring in games during mouse movement, and saying that Sway’s behavior is a bug.

    https://github.com/swaywm/sway/issues/6832#issuecomment-1079941291

    I start a game (for example Overwatch, or Witcher 3 - both are running through wine). Normally the game would run at a framerate higher than 165fps
    I cap the framerate (for example with Overwatchs ingame limiter, MangoHud, or Gamescope), to something lower, for example to 100fps
    FreeSync is working, which I can see because my monitor displays the current refresh rate
    As soon as I move the mouse, the refresh rate jumps up to 165

    The effect does not occur in Plasma Wayland (with Kwin)

    I guess the concern is that one doesn’t want that to happen in a typical fullscreen game that can’t render at the monitor’s full frame rate, but do want to with, say, the desktop environment to keep the pointer responsive.

    Honestly, while I use adaptive sync, I only really care about it for fullscreen movie playback, where I want the monitor to be able to run at the movie’s framerate. I actually hadn’t even thought about the fact that it affects games. Hmm.