Debian_SuperUser
Active Member
Before when I was on Ubuntu, I used I think it was called x11-perf from the phoronix test suite (Gnome on Xorg and Wayland). The test results tied with each other. In some tests Xorg won and in some Wayland. But the test I think is very old and probably not a good test. Even before that I was mainly using Xorg, because on Ubuntu Gnome, Wayland took more memory bandwidth than Xorg (yes I am this sensitive). But then I slowly moved on to Wayland, and then I did some vague real tests by running actual graphical programs and games, and I think Wayland did noticeably better, even on programs running on XWayland.
Now on Arch, I am using sway (Wayland) but also have i3wm (Xorg) installed as a second source. I tested i3wm vs Sway in a game, and Sway does take a win. And also, Sway does not take that much memory bandwidth as Gnome Wayland on Ubuntu took. It is actually as close as Xorg (i3wm).
First of all, I think Sway is not that optimized, because I am getting a little lower fps than what I was getting on Ubuntu Gnome Wayland. The swaybar also displays the seconds in time, which updates every second, so, any chance that might be a contributing factor?
On Sway, I ran two benchmarks; Furmark 2 (linux version) and memtest_vulkan (stresses the VRAM, and I am on integrated graphics). I was not running both the benchmarks for performance points (the points would pretty much be the same at such low fps on Furmark, and not much difference in memtest_vulkan), but rather the latency and how the display servers would function in a heavy load. On Sway, when running Furmark and getting like 6 fps, not only Furmark and other windows are laggy, but my cursor also experiences huge latency. I already had experienced this when playing a game and when getting less fps, my cursor lags. And when running memtest_vulkan on Sway, there were some stutters for the cursor but the whole display server didn't lag (note that memory bandwidth for both CPU and GPU is maxed out).
On Xorg though, the cursor does not lag at all in Furmark even when getting 6 fps. And the cursor also doesn't stutter in memtest_vulkan. If somebody knows, I would like to know the specific Xorg vs Wayland differences that play here. Does Xorg use a completely separate render thread or something?
Now my memory is very weak, but I vaguely think that this was the opposite on Ubuntu. It lagged on Xorg, and didn't on Wayland. If I believe myself, then it should be correct, or else why would I still use Wayland? But this makes no sense. And I also thought that the higher memory bandwidth usage was just a Wayland thing, but Sway does not have it, and it actually might not be a good thing (heavier but efficient software is better than lighter but in-efficient)?
With that said, i3wm has its own problems which keep me on Sway. Switching between workspaces creates a flashy and jumbled screen for a few frames. I can't even tell if Vsync is on or off, because I kind of see some tearing but I am on a 120Hz screen so that is why I am being confused. But these are the things which might be fixed if I install picom or other Xorg compositors, so maybe no worries. And I remember that when prior when I was on Debian (not Ubuntu), it used the older Intel Xorg driver by default rather than the modesetting driver, and vsync was definitely not there without picom, and the modesetting driver itself did not include tear-free option, but the older Xorg driver did, and hence picom was needed for compositor level vsync.
But I forgot to ask the main question. What benchmarks can I use to more deeply and accurately benchmark Xorg vs Wayland, and additionally, if there is a fix for the latency issue on Sway.
Now on Arch, I am using sway (Wayland) but also have i3wm (Xorg) installed as a second source. I tested i3wm vs Sway in a game, and Sway does take a win. And also, Sway does not take that much memory bandwidth as Gnome Wayland on Ubuntu took. It is actually as close as Xorg (i3wm).
First of all, I think Sway is not that optimized, because I am getting a little lower fps than what I was getting on Ubuntu Gnome Wayland. The swaybar also displays the seconds in time, which updates every second, so, any chance that might be a contributing factor?
On Sway, I ran two benchmarks; Furmark 2 (linux version) and memtest_vulkan (stresses the VRAM, and I am on integrated graphics). I was not running both the benchmarks for performance points (the points would pretty much be the same at such low fps on Furmark, and not much difference in memtest_vulkan), but rather the latency and how the display servers would function in a heavy load. On Sway, when running Furmark and getting like 6 fps, not only Furmark and other windows are laggy, but my cursor also experiences huge latency. I already had experienced this when playing a game and when getting less fps, my cursor lags. And when running memtest_vulkan on Sway, there were some stutters for the cursor but the whole display server didn't lag (note that memory bandwidth for both CPU and GPU is maxed out).
On Xorg though, the cursor does not lag at all in Furmark even when getting 6 fps. And the cursor also doesn't stutter in memtest_vulkan. If somebody knows, I would like to know the specific Xorg vs Wayland differences that play here. Does Xorg use a completely separate render thread or something?
Now my memory is very weak, but I vaguely think that this was the opposite on Ubuntu. It lagged on Xorg, and didn't on Wayland. If I believe myself, then it should be correct, or else why would I still use Wayland? But this makes no sense. And I also thought that the higher memory bandwidth usage was just a Wayland thing, but Sway does not have it, and it actually might not be a good thing (heavier but efficient software is better than lighter but in-efficient)?
With that said, i3wm has its own problems which keep me on Sway. Switching between workspaces creates a flashy and jumbled screen for a few frames. I can't even tell if Vsync is on or off, because I kind of see some tearing but I am on a 120Hz screen so that is why I am being confused. But these are the things which might be fixed if I install picom or other Xorg compositors, so maybe no worries. And I remember that when prior when I was on Debian (not Ubuntu), it used the older Intel Xorg driver by default rather than the modesetting driver, and vsync was definitely not there without picom, and the modesetting driver itself did not include tear-free option, but the older Xorg driver did, and hence picom was needed for compositor level vsync.
But I forgot to ask the main question. What benchmarks can I use to more deeply and accurately benchmark Xorg vs Wayland, and additionally, if there is a fix for the latency issue on Sway.