You are not logged in.

#1 2021-09-03 13:02:39

FPSUsername
Member
Registered: 2021-09-03
Posts: 17

KDE Stutters when opening applications

Hello,

I have a desktop and a laptop which I have Arch with KDE running on. Both setups are nearly identical regarding software, however, on my laptop KDE runs via the intel iGPU (i7-7700HQ) and works flawlessly (also with Nvidia Prime).
On my desktop however, it's a different story. Every time I open an application, everything stutters (most easy way to check is to open the system settings and move my cursor while it's opening). The same issue happens when I move my cursor over the latte dock, where it draws the text popup on top of the application shortcut.

What I've tried was to use dual or tripple buffering, which gave no different result. Compositor is set to OpenGL 3.1 and Tearing prevention to automatic.

I did notice that if I set

export KWIN_USE_BUFFER_AGE=0

in "/etc/profile.d/kwin.sh", everything works smoothly, however some effects are disabled (wobbly windows).

The oddest part is that I noticed this stuttering behavior back on Windows 10 for about half a year. If I'd be in a voice call, be it MS Teams or Discord, opening any application would severely cripple the network communication to the point where I couldn't hear the other side and visa versa.

Specs:
i5-4690k at 4.2GHz
20GB DDR3 at 1333MHz (it can run at 2GHz, but my motherboard replacement from ROG doesn't want to apply the overclock for some reason)
Crucial MX200 256GB SSD (F2FS formatted for Arch)
EVGA GTX 960 4GB SSC (vbios overclocked)

I use the Nvidia DKMS Performace driver and the Linux Xanmod Edge kernel.

What could be the issue that the system stutters when opening an application?

I also noticed considerably more stuttering in Minecraft on Arch compared to running it on Windows.

Offline

#2 2021-09-03 13:30:17

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,740

Re: KDE Stutters when opening applications

Can you reproduce on the normal kernel? I'd see that the RT guarantees Edge tries to provide could lead to situations like these.

FWIW and YMMV I've personally had the best behaviour in these regards with linux-ck of the kernels/scheduler patches I've tested (stock, zen, tkg-pds)

Offline

#3 2021-09-03 13:44:00

FPSUsername
Member
Registered: 2021-09-03
Posts: 17

Re: KDE Stutters when opening applications

Unfortunately it also happens with the normal kernel 5.13.13-arch1-1

Offline

#4 2021-09-04 13:38:37

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,740

Re: KDE Stutters when opening applications

Can you post

glxinfo -B
qdbus org.kde.KWin /KWin org.kde.KWin.supportInformation

Offline

#5 2021-09-05 16:44:59

FPSUsername
Member
Registered: 2021-09-03
Posts: 17

Re: KDE Stutters when opening applications

Here is a pastebin of both commands.

Last edited by FPSUsername (2021-09-05 16:45:08)

Offline

#6 2021-10-16 20:15:51

N3k0-san
Member
From: Elsweyr
Registered: 2021-08-14
Posts: 67

Re: KDE Stutters when opening applications

I've personally had this issue as well but I think this might just be Xorg with the Nvidia driver misbehaving, if I had to guess
I just put up with it hmm

Offline

#7 2021-10-16 20:19:41

FPSUsername
Member
Registered: 2021-09-03
Posts: 17

Re: KDE Stutters when opening applications

Hmm, don't think so. Gnome on Xorg works fine. I noticed that after moving my mouse to a USB 3.0 port (and now having 1kHz polling rate rather than 500Hz), that the mouse movement stutters but also lags towards the position (slower movement). I don't mind it as a before/after, because the fundamental issue isn't fixed. I think it's a KDE thing, possibly with the nvidia drivers (currently at v495 and no difference). Unfortunately I don't own another nvidia machine to compare with, because my XPS15 runs on the iGPU and the nvidia gpu is utilized with prime renderer.

Offline

#8 2021-10-17 06:51:52

seth
Member
Registered: 2012-09-03
Posts: 51,263

Re: KDE Stutters when opening applications

export KWIN_USE_BUFFER_AGE=0

Is this a prime offload situation (ie. you're, according to the glxinfo, rendering on the nvidia chip, but the output is wired to the intel one)?

GL_buffer_age avoids re-rendering the full screen by just re-using a former one and rendering only the diff onto it. I could see how this could lead to a bug failing to copy the buffer over to the intel chip, but quite frankly not how that is related to "starting an application"… that is… "how" do you start it and does it matter?
Do you have a bouncing cursor effect when starting an application?
If you run eg. "kwrite" out of a konsole, does that cause the same effect?

Online

#9 2021-10-19 11:39:09

FPSUsername
Member
Registered: 2021-09-03
Posts: 17

Re: KDE Stutters when opening applications

It's odd because the intel gpu should be disabled (it's also not on Windows), but I noticed that once I tried Wayland, the intel iGPU would be used for 3D applications, even though it's disabled in the bios!
Anyway, yes, I do get the bouncing cursor effect when starting any program.

I tried launching systemsettings5 from a terminal and the cursor still lags (although a bit less because it doesn't have the bouncing animation of the application's icon)

Last edited by FPSUsername (2021-10-19 11:41:00)

Offline

#10 2021-10-19 14:14:42

seth
Member
Registered: 2012-09-03
Posts: 51,263

Re: KDE Stutters when opening applications

Please post your xorg log, https://wiki.archlinux.org/title/Xorg#General
You're certainly running on the nvidia chip, whether the output has to be redirected isn't visible from the kwin support info.

I mostly wondered whether it was maybe the bouncing effect that /caused/ the lags. Doesn't seems so.

Online

#11 2021-10-19 14:24:38

FPSUsername
Member
Registered: 2021-09-03
Posts: 17

Re: KDE Stutters when opening applications

Here's the xorg log

Offline

#12 2021-10-19 14:59:05

seth
Member
Registered: 2012-09-03
Posts: 51,263

Re: KDE Stutters when opening applications

There's only one GPU (nvidia) and the output is wired there.

intel_pstate=disabled cpufreq.default_governor=schedutil usbhid.mousepoll=1

How much of that is mitigation effort?

[    29.516] (EE) event2  - USB GAMING MOUSE : client bug: event processing lagging behind by 12ms, your system is too slow
[    32.955] (EE) event2  - USB GAMING MOUSE : client bug: event processing lagging behind by 15ms, your system is too slow
[    33.431] (EE) event2  - USB GAMING MOUSE : client bug: event processing lagging behind by 15ms, your system is too slow
[    33.772] (II) event2  - USB GAMING MOUSE : SYN_DROPPED event - some input events have been lost.
[    33.789] (EE) event2  - USB GAMING MOUSE : client bug: event processing lagging behind by 16ms, your system is too slow
[    33.925] (EE) event2  - USB GAMING MOUSE : client bug: event processing lagging behind by 31ms, your system is too slow
[    33.925] (EE) event2  - USB GAMING MOUSE : WARNING: log rate limit exceeded (5 msgs per 60min). Discarding future messages.

Are you sure about the KWIN_USE_BUFFER_AGE thing?
This doesn't look like it's visual or the compositor, but the system fails to process the input.
Reaching back to the head of this post: does it also happen if you don't force a poll rate?

Online

#13 2021-10-19 15:05:34

FPSUsername
Member
Registered: 2021-09-03
Posts: 17

Re: KDE Stutters when opening applications

seth wrote:

How much of that is mitigation effort?

Not sure what you exactly mean by that, but I noticed that with pstate and the default performance governor that the cpu wouldn't go in turbo boost after resuming from suspension and it would significantly increase stutters and lags.
Blame Asus for forcing turbo boost on overclocking rather than disabling turbo boost and let the base max clock be whatever you want, as on Gigabyte motherboards.

FYI, specs:
i5-4690k at 4.5GHz
GTX 960 4GB with a +20% overclock (connected with HDMI to a 1080p monitor)
20GB DDR3 at 2GHz
Crucial MX200 250GB SSD

seth wrote:

Are you sure about the KWIN_USE_BUFFER_AGE thing?
This doesn't look like it's visual or the compositor, but the system fails to process the input.
Reaching back to the head of this post: does it also happen if you don't force a poll rate?

I'm currently not using KWIN_USE_BUFFER_AGE as it disables some compositor effects (and then solves the problem).
For the mouse, it's connected on USB 3.0 at 1000Hz polling rate (on 2.0 it would only reach 500Hz). Forcing or not doesn't make a difference as it would go to 1000Hz on USB 3.0.

Last edited by FPSUsername (2021-10-19 15:06:22)

Offline

#14 2021-10-19 15:07:47

seth
Member
Registered: 2012-09-03
Posts: 51,263

Re: KDE Stutters when opening applications

KWIN_USE_BUFFER_AGE as it disables some compositor effects (and then solves the problem)

Which one precisely? Does merely disabling those effects solve the problem as well?

Online

#15 2021-10-19 15:09:57

FPSUsername
Member
Registered: 2021-09-03
Posts: 17

Re: KDE Stutters when opening applications

seth wrote:

KWIN_USE_BUFFER_AGE as it disables some compositor effects (and then solves the problem)

Which one precisely? Does merely disabling those effects solve the problem as well?

I didn't try disabling the effects without using KWIN_USE_BUFFER_AGE=0.
Sorry for the confusion in the last post, I meant that I currently do not use KWIN_USE_BUFFER_AGE=0 (so it's probably set to KWIN_USE_BUFFER_AGE=1 by default)

It only happens with selected apps that take a bit more time to start up (system settings takes a bit while konsole instantly opens)

Offline

Board footer

Powered by FluxBB