Bug 482742 - [Presentation Time] Limited to 120 Hz syncing!
Summary: [Presentation Time] Limited to 120 Hz syncing!
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: 6.0.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-07 16:21 UTC by David G.
Modified: 2024-06-22 14:16 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David G. 2024-03-07 16:21:21 UTC
SUMMARY
Prior to Plasma 6, there was no support for Presentation Time, so Chromium and other apps relying on the protocolon Wayland outright failed to v-sync, and ran at an arbitrary frame rate around 60 FPS.

Tested with https://vsynctester.com on Chromium Wayland:
Now that Plasma 6 has support for Presentation Time, Chromium succeeds to get v-sync on my 120Hz screen, but not on my 240Hz screen.
On my 240Hz screen, it goes up to about 120 FPS and "searches" for v-sync around that value.

Tested with weston-presentation-shm, p2p is shown as about 8300 us -> dividing 1000 with 8.3 ms gives 120.

STEPS TO REPRODUCE
- Chromium: start with --ozone-platform=wayland, visit https://vsynctester.com.
- weston-presentation-shm: run, then look at p2p value.

OBSERVED RESULT
- Chromium does not go above about 120 FPS on 120+ FPS screens. (I tested with 240Hz)
- weston-presentation-shm only occasionally throws a p2p value around 4170 us (eyeing it, looks like about 10%)

EXPECTED RESULT
- Chromium syncs up to monitor refresh rate, not just up to 120 FPS.
- weston-presentation-shm outputs p2p values corresponding to monitor refresh rate (1000 / 240 should be around 4170 us)

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.8-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 1 David G. 2024-03-07 17:53:19 UTC
Important, the issue is non-reproducible if using a screen with a refresh rate under or equal to 120 Hz.
Comment 2 David G. 2024-03-08 08:38:51 UTC
Testing further (laptop with 120Hz screen): The amount and frequency of 'incorrect' p2p values (double the time it should take to present a frame on a display of a specified refresh rate) that weston-presentation-shm shows increases drastically when actively running Chromium displaying the https://vsynctester.com website.
Comment 3 Zamundaaa 2024-03-12 12:27:36 UTC
Sounds like KWin is dropping frames. What CPU and GPU is this on?
Comment 4 David G. 2024-03-12 13:06:48 UTC
It's a Ryzen 7 4800H laptop with integrated Radeon Graphics and dedicated Nvidia Graphics (1660Ti). Kwin is running on the integrated Radeon Graphics, of course
Comment 5 David G. 2024-03-12 13:07:48 UTC
It's definitely not an underpowered system, so I suggest attempting to reproduce this issue on your end as well
Comment 6 Zamundaaa 2024-03-12 13:19:56 UTC
I didn't mean to imply the problem was on your side, I only needed to know what kind of problem we're talking about. KWin dropping frames on older Intel iGPUs is one thing (and being worked on) but it dropping frames on a Ryzen is new.
Comment 7 David G. 2024-03-12 13:33:54 UTC
Of course, and the issue might still be on my side anyway, who knows :) I only have this laptop to test on.
Comment 8 David G. 2024-03-18 06:53:20 UTC
Hello, this still seems to be an issue as of kwin 6.0.2.
Comment 9 David G. 2024-04-04 09:41:56 UTC
Hello, is there any update on this issue? It is present in 6.0.3 also. Thank you
Comment 10 Zamundaaa 2024-05-24 17:07:57 UTC
Plasma 6.1 contains a bunch of performance and frame timing improvements, which might fix this. Please retest this once 6.1 is out
Comment 11 Nate Graham 2024-05-24 17:09:55 UTC
.
Comment 12 Bug Janitor Service 2024-06-08 03:46:27 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 13 David G. 2024-06-08 16:37:24 UTC
I will test this again once 6.1 is released on Arch. Currently that is not the case
Comment 14 David G. 2024-06-21 19:36:45 UTC
I can confirm this now works perfectly on kwin 6.1.0!!
Both weston-presentation-shm and Chromium now correctly sync up to 240Hz (the highest I can test).
Comment 15 David G. 2024-06-22 14:16:07 UTC
Nope. Nevermind. It's not solved. But I've also figured out what this bug is actually related to.

Here's what I found: seems like just *having the proprietary nvidia driver loaded* breaks Chromium vsync on 240Hz, despite Kwin running on my AMD GPU. The only reason I thought it was fixed was that I forgot that I was in the middle of switching to beta nvidia drivers, and I didn't finish it. So when I loaded up my system, it wasn't loaded, and I just so happened to have installed plasma 6.1 at the same time.

I'll create a new bug report.