Closed Kodehawa closed 3 years ago
Seems like 0.9.0 makes KWin (lowlatency, and KWinFT) run really laggy after installation. It's noticeably choppy, and stuff like Yet Another Magic Lamp's animation get funky.
Does this happen with classic KWin or only with lowlatency and KWinFT versions?
Is there something that runs on the background while the viewport is not active?
No, this seems more like some kind of conflict on gpu access.
If you need anything just tell me. Thanks!
Since this doesn't happen on my pc, I'll depend a lot on your help to find out what's happening. What is your distribution, cpu and gpu models?
Can you delete (or comment) a line in the file ~/.local/share/kwin/scripts/Parachute/contents/ui/ClientComponent.qml with the content "renderTarget: KWinComponents.ThumbnailItem.FramebufferObject" and see if that solves the problem?
EDIT: run kwin_x11 --replace &
after editing the file.
Does this happen with classic KWin or only with lowlatency and KWinFT versions?
I only really tested it with lowlatency and KWinFT. KWin uses a timer for VSync while KWinFT and KWin lowlatency try to use the GPU itself. Might be why?
Since this doesn't happen on my pc, I'll depend a lot on your help to find out what's happening. What is your distribution, cpu and gpu models?
Arch, Ryzen 5 2600, RX 480
Can you delete (or comment) a line in the file ~/.local/share/kwin/scripts/Parachute/contents/ui/ClientComponent.qml with the > content "renderTarget: KWinComponents.ThumbnailItem.FramebufferObject" and see if that solves the problem?
EDIT: run kwin_x11 --replace & after editing the file.
Nope :(
qdbus org.kde.KWin /KWin supportInformation
It's honestly not that noticeable in a video, but you can tell the cursor is lagging way behind the window with the script enabled, and with it disabled it works fine. For what I can tell, VSync on both KWinFT and lowlatency break, which makes it look way laggier.
Yes, I can see the difference.
I saw that you use two monitors with different refresh rates, maybe that is the cause of the problem? I also use two monitors, but both at 60Hz.
I saw that you use two monitors with different refresh rates, maybe that is the cause of the problem?
Could be. Yeah, it's 144Hz + 60Hz, that's why I use KWin lowlatency or KWinFT usually, since those actually render better with this kinda combination :)
A test that could be done is to run the script in classic KWin, to see if the problem is related to the lowlatency or KWinFT changes.
Maybe. The VSync mechanism on both lowlatency and KWinFT is different. I'll give it a test in a little :)
You could test lowlatency aswell to see if it breaks for you, maybe I'm not the only one.
EDIT: Vanilla KWin itself is quite laggy for me, but the script definitely makes it laggier and choppier, but I can't notice it as much.
I installed lowlatency and although it didn't make much sense I found the animations a little more laggy.
KWin lowlatency really only changes how VSync works, among other minor rendering stuff (like latency controls). I wonder if something breaks GPU VSync? not sure what could break it
Though, for me it's also a little laggier on normal KWin, but not as noticeable. The thing is that at 60Hz it's just about barely noticeable, but at 144Hz it feels really bad.
Ok, can you try one more thing? Insert a line with the following content just below the line with "id: screenItem" in the file ~/.local/share/kwin/scripts/Parachute/contents/ui/ScreenComponent.qml:
enabled: mainWindow.activated
This will disable almost everything from Parachute when offscreen.
Huh. Still very, very laggy.
I did it like this and ran kwin_x11 --replace
. Seems like #72, #71 and #77 are related. I can reproduce all of them.
I installed a game and I can see the fps drop now. At least it's a step to solve the problem. As soon as I fix it I should release a new version 0.9.1.
Well, it seems that if you use visible: mainWindow.activated
instead of enabled: mainWindow.activated
the problem is solved. At least in case of fps drop in games (#72). As for the other issues reporting lag in KWin (this one, #71 and #77) I need feedback from you guys because they don't happen on my pc.
That works. Yep :)
Did this solve all the mentioned issues for you?
I already used this line in the code and it had some side effect that I don't remember now. So I'll perform some tests before releasing the new version.
It did solve it to me, I haven't found any issues really, but who knows.
It's weird that something harms performance that much though. As in, the script uses quite a lot of resources when running. Well, and before it also did when it wasn't running :P
With Parachute open, KWin's CPU usage goes from 1% to 50~100% (out of 1200%). Not too much, but it's still sizable. I guess it's because of thumbnail gen?
It also uses a single core but I guess that's just how scripts work.
Thumbnails, transparencies, blur, shadows of desktops and other visual effects. All this comes at a cost.
Compared to KWin Present Window and Desktop Grid effects (written in C++) for example, the fps drop when they are activated is minimal. Parachute is definitely not for old machines.
It wasn't like this on 0.8 and it blurred, generated thumbnails, transparency and all for sure :P
0.9 is way slower, and uses way (by way I mean 100% of one core) more resources than 0.8. It's nicer, though, and with the stuff you told me to use at least it only does it when opened, so that's fine for me.
Whenever I try this script, it is not laggy at first, but only after using it for a while, the lag comes. So there could be some memory leak or something like that.
Whenever I try this script, it is not laggy at first, but only after using it for a while, the lag comes. So there could be some memory leak or something like that.
I have the same problem and I had it also on version 0.8 0.9. The lags usually start after a while and if I deactivate the parachute kwin script they stop immediately. Strange thing is that system monitor doesn't show any high CPU/RAM usage..
Edit: I had written the wrong version, sorry
Seems like 0.9.0 makes KWin (lowlatency, and KWinFT) run really laggy after installation. It's noticeably choppy, and stuff like Yet Another Magic Lamp's animation get funky. This is not noticeable at 60Hz, but at 144Hz it's horrible as it makes the fps constantly jump around.
Disabling the script fixes it all for me, so it's definitely something to do with the script. 0.8 is fine.
Is there something that runs on the background while the viewport is not active?
If you need anything just tell me. Thanks!
P.S: Great script :D