this post was submitted on 27 Jan 2025
24 points (92.9% liked)

Linux

8605 readers
151 users here now

Welcome to c/linux!

Welcome to our thriving Linux community! Whether you're a seasoned Linux enthusiast or just starting your journey, we're excited to have you here. Explore, learn, and collaborate with like-minded individuals who share a passion for open-source software and the endless possibilities it offers. Together, let's dive into the world of Linux and embrace the power of freedom, customization, and innovation. Enjoy your stay and feel free to join the vibrant discussions that await you!

Rules:

  1. Stay on topic: Posts and discussions should be related to Linux, open source software, and related technologies.

  2. Be respectful: Treat fellow community members with respect and courtesy.

  3. Quality over quantity: Share informative and thought-provoking content.

  4. No spam or self-promotion: Avoid excessive self-promotion or spamming.

  5. No NSFW adult content

  6. Follow general lemmy guidelines.

founded 2 years ago
MODERATORS
 

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.

top 6 comments
sorted by: hot top controversial new old
[–] [email protected] 8 points 2 days ago* (last edited 2 days ago) (1 children)

What I've noticed with Wayland in Plasma is that it's very much tied to my monitors refresh rate.

At 240Hz, with adaptive sync turned off or to Automatic, I get a very responsive cursor.

At 75Hz, or if I force adaptive sync to be on at all times (instead of off or Automatic), then I get a noticeable mouse latency

[–] [email protected] 1 points 2 days ago* (last edited 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.

[–] A_A 7 points 2 days ago* (last edited 2 days ago) (1 children)

Latency raw data :

Gnome Variant Δ camera frames Average (Δ) Δ milli seconds Δ monitor refreshes
X11 5 4 3 4 5 4 6 5 1 4 4 4 3 4 4 4 4.00 16.7 2.4
Wayland 6 5 6 5 5 6 6 4 8 6 5 5 5 6 5 6 5.5625 23.2 3.3
Δ(Δ) - - ~1.5 ~6.5 ~1.0

instead of calculating the average one could decide to drop the data points that are way outside of their goups.
Doing so, in the first group I would neglect the value of Δ = 1 or 6 frame and in the second group I would neglect the value of 4 or 8 frames

Results :
X11 : from 3 to 5 frames
Wayland : from 5 to 6 frames
Δ(Δ) = 5.5 - 4 = 1.5

Still it doesn't change the final result that the difference between these two Gnome versions is 1.5 camera frames at 240 frames per second.

[–] Feathercrown 3 points 2 days ago (1 children)
[–] A_A 2 points 2 days ago* (last edited 2 days ago)

Thanks. Also, after a bit of thought, i do believe you are right saying that we should remove one frame of all the raw camera data. ... it will, as you say, decrease the absolute values and make Wayland more laggy proportionally, yet, it doesn't change the absolute difference.

[–] [email protected] 4 points 2 days ago* (last edited 2 days ago)

I saw some cheap laptops with Ubuntu in a local mall and on them the latency on Wayland was unbearable.