With Vsync disabled, Weston almost halves *visible* frame update rate, compared to X desktop
Submitted by Eero Tamminen
Assigned to Wayland bug list
- Intel Skylake or BXT HW
- Git versions of:
- kernel (supports atomic modesetting)
- X server / Xwayland
- Weston (latest releases may be enough, but hasn't been tested)
- New enough dependencies for above, so that modifiers are supported
- X Benchmarks running with Vsync turned off, e.g. GpuTest v0.7
- Start Weston with --xwayland
- Start windowed Benchmark that runs on given HW at approximately 1.5x speed compared to monitor refresh rate (e.g. ~90FPS benchmark on 60Hz monitor) 
- Monitor at which frequency Weston composites the application frames 
- Do similar test also on X, e.g. under Ubuntu Unity
- Both X and Weston compositors update application frames to screen at monitor frequency (60Hz)
- Benchmark itself runs at about same speed under both windowing systems
- X compositor does app frame updates at expected rate (60)
- Xwayland causes Weston to do updates at half the rate (30)
- Benchmark itself can even run a bit faster on Weston than on X, e.g. because compositor memory bandwidth overhead is smaller when it does less updates. It's just that users sees only every 3rd frame of them...
- Xwayland should forward the frames immediately, but it's almost like frames were Vsynched to display refresh twice (with some extra delay added in-between to guarantee that FPS drops from expected 60 to 30 FPS)
- I've seen similar issue with benchmarks running at 5-120FPS, 90 FPS is just where it's easiest to see. After benchmark goes >120 FPS, both X and Weston do compositor updates at 60 FPS.
- The same issue could be there also when application is Vsynched, I haven't investigated that (Vsync makes it harder to notice / investigate)
Most of the games (e.g. in Steam) don't support Wayland natively, so they get run through Xwayland. Games are often run with Vsync disabled, for higher FPS. This bug really ruins their performance, which hinders Wayland adoption.
 First select GpuTest benchmark that is close enough, and then change window size to fine-tune the perf to your HW  I'm monitoring whole system updates by tracing user-space kprobes set to buffer swap functions in all 3D libraries. Simpler method could be starting Weston with Mesa LIBGL_SHOW_FPS=true option and redirecting its output to a file monitored with "tail -f".