Bug 476712 - Compositing sometimes locks to 30 FPS instead of 60, with no clear pattern
Summary: Compositing sometimes locks to 30 FPS instead of 60, with no clear pattern
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 5.27.9
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-08 16:45 UTC by Tinolm
Modified: 2024-02-12 13:29 UTC (History)
6 users (show)

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


Attachments
screen (2.96 MB, image/jpeg)
2023-11-11 14:38 UTC, garwol
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tinolm 2023-11-08 16:45:06 UTC
SUMMARY
***
(I am not entirely sure what exactly if kwin is causing it but, ) 
As long as my compositor is running, I get strange behavior.
My frame-rate sometimes seems to get locked at 30/31FPS, with no clear indication why.
It does not happen by itself, sometimes maximizing or minimizing a windows fixes it, until the next window change.
But not always, so the cause seems very hard to figure out. While my cursor doesn't seem to be affected by it, all my applications are, Browser, Media-Player, (non-full-screen) Games etc. 
Moreover my Applications cannot notice the difference, they claim to run at 60FPS but using the "Show FPS" effect from the settings, I was able to make sure my frame-rate is actually jumping between 30 and 60FPS.
My browser (Brave flatpak) seems to affect it even more, right now, while typing I see my frame-rate jumping between 30 and 60. I have tried many different settings, disabling effects, trying all smoothness/responsiveness settings for the compositor.
***


STEPS TO REPRODUCE
1. Login
2. Doing any kind of window Transformation
3. Notice FPS change

OBSERVED RESULT
Seemingly random 30FPS lock

EXPECTED RESULT
Smooth 60FPS with Vsync. (Like it used to be)


SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Arch linux, 
Kernel: 6.5.9-arch2-1 (64-bit)
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.111.0
Qt Version: 5.15.11
Using X11


ADDITIONAL INFORMATION
GPU is : GTX 1650 SUPER 
CPU: AMD RYZEN 5 3600
I am having this issue with 2 monitors right now, 
however I started using the second one not long after the the problem first occurd.
Having this issue since my last system update, so nvidia driver might be related/cause.
Comment 1 Nate Graham 2023-11-09 20:26:16 UTC
Does it happen in the Wayland session?
Comment 2 Tinolm 2023-11-09 21:01:58 UTC
A little context:
I have a laptop (AMD GPU/CPU) and a Desktop PC (AMD+NVIDIA), I use wayland pretty-much only on my laptop, 
however I use only x11 on my main PC. I tried wayland on it a long time ago, it didn't even seem to start, black screen, sddm didn't seem to "handover". 

I have just tried plasma in wayland, and it's much worse, looking at the FPS, when not moving anything, it goes up to 200-300.
As soon as a start moving my cursor it seems, heavy drops, to 25FPS, 
with the difference to x11 beeing: 
1: FPS is 5 frames lower when moving mouse
2: Cursor and whole system is a little unresponsive, with sluggish/laggy cursor. 
3: framrate never seems to stay at 60
Changing compositor settings does not change anything, while x11 still somewhat works, wayland session is pretty much unusable for me right now.
Comment 3 Nate Graham 2023-11-09 21:35:43 UTC
Thanks for the info.
Comment 4 Tinolm 2023-11-10 18:23:30 UTC
(In reply to Nate Graham from comment #3)
> Thanks for the info.


Please (if possible) let me know if I can give more info or logs etc.
Comment 5 garwol 2023-11-11 14:38:50 UTC
Created attachment 163051 [details]
screen
Comment 6 garwol 2023-11-11 14:39:31 UTC
I noticed the same kwin behaviour few days ago, probably after last Nvidia update (545.29.02). Everything seems to work fine but sometimes windows maximizing/moving seems choppy, i added kwin framerate counter effect and it shows 30fps

Operating System: Arch Linux 
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.111.0
Qt Version: 5.15.11
Kernel Version: 6.5.11-lqx1-1-lqx (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 3600X 6-Core Processor
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 2070 SUPER/PCIe/SSE2
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B450M DS3H
Comment 7 Andrew 2023-11-12 00:12:31 UTC
Can confirm the behavior on my install as well. KWin seems to randomly lock to 30 FPS with no clear indicator or reasons why, and this is verifiable with the KWin framerate counter. Tried Picom just for a few minutes, and it seems to work fine, so this definitely seems like a KWin issue itself, somehow. Started to notice the issue after the most recent NVIDIA driver update (545.29.02), could be the culprit but I'm not sure.

Arch Linux
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.111.0
Qt Version: 5.15.11
Kernel: 6.6.1-arch1-1 (64Bit)
Graphics Platform: X11

Processor: AMD Ryzen 5 1600 Six-Core
Memory: 15.6 GiB
Graphics Processor: NVIDIA GeForce GTX 1060
Comment 9 Bug Janitor Service 2023-11-27 03:45:49 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 10 fanzhuyifan 2023-11-27 07:17:52 UTC
Info seems already provided.
Comment 11 Zamundaaa 2024-02-12 13:29:55 UTC
This is a NVidia driver bug, closing. If you're still experiencing this with the latest drivers, please report it to NVidia.