Bug 444420 - XWayland server started by nested KWin Wayland reports incorrect refresh rate
Summary: XWayland server started by nested KWin Wayland reports incorrect refresh rate
Status: RESOLVED DUPLICATE of bug 444303
Alias: None
Product: kwin
Classification: Plasma
Component: platform-wayland-nested (show other bugs)
Version: 5.23.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-26 10:12 UTC by sattaxt
Modified: 2021-10-26 10:39 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
output from kscreen-doctor-o (828 bytes, text/plain)
2021-10-26 10:13 UTC, sattaxt
Details
output from qdbus (6.67 KB, text/plain)
2021-10-26 10:13 UTC, sattaxt
Details
output from xrandr (861 bytes, text/plain)
2021-10-26 10:13 UTC, sattaxt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sattaxt 2021-10-26 10:12:45 UTC
SUMMARY
When using KWin Wayland, the XWayland server started by it will have the wrong refresh rate set. In my case it is 144Hz for a 240Hz monitor. For wayland itself, the refresh rate is correct. 

This bug can be seen when running XWayland apps as well, for example: Chromium and mpv (with xwayland) will report the display refresh rate as 143Hz. This can (and does) result in laggy, juddery experience.

STEPS TO REPRODUCE
1. Start KWin Wayland
2. run xrandr or check X apps

OBSERVED RESULT
XWayland is set to the wrong refresh rate (144Hz in my case)

EXPECTED RESULT
XWayland refresh rate should be in sync with the Wayland one (240Hz)

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux 5.23.1
KDE Plasma Version: 5.23.1
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2
GPU: NVIDIA Turing

ADDITIONAL INFORMATION
Comment 1 sattaxt 2021-10-26 10:13:18 UTC
Created attachment 142901 [details]
output from kscreen-doctor-o
Comment 2 sattaxt 2021-10-26 10:13:36 UTC
Created attachment 142902 [details]
output from qdbus
Comment 3 sattaxt 2021-10-26 10:13:53 UTC
Created attachment 142903 [details]
output from xrandr
Comment 4 Vlad Zahorodnii 2021-10-26 10:17:38 UTC
The refresh rate of nested kwin_wayland is hardcoded to 60Hz. Did you mean host kwin_wayland or nested kwin_wayland?
Comment 5 Vlad Zahorodnii 2021-10-26 10:18:33 UTC
host kwin_wayland => kwin_wayland running on top of DRM
nested kwin_wayland => windowed kwin_wayland
Comment 6 sattaxt 2021-10-26 10:20:00 UTC
(In reply to Vlad Zahorodnii from comment #4)
> The refresh rate of nested kwin_wayland is hardcoded to 60Hz. Did you mean
> host kwin_wayland or nested kwin_wayland?

I mean kwin_wayland started with "kwin_wayland ... --xwayland ..". This is usually referred to as a "nested session" in KDE documentation I've read, am I using the wrong terminology?
Comment 7 sattaxt 2021-10-26 10:24:46 UTC
(In reply to Vlad Zahorodnii from comment #5)
> host kwin_wayland => kwin_wayland running on top of DRM
> nested kwin_wayland => windowed kwin_wayland

Host.
Comment 8 Vlad Zahorodnii 2021-10-26 10:39:48 UTC

*** This bug has been marked as a duplicate of bug 444303 ***