After my last system upgrade (debian sid) I've noticed a large increase in cpu activity by kwin. It seems to be related to the number of windows open. With, let's say, 30 windows open with kwin 5.12 I would see a steady 6 to 8 % cpu activity. Under the same exact conditions (not only the same number of windows but the very same set of windows) with kwin 5.13.2 I see a steady 36 to over 40 % cpu activity. To isolate the problem, I've re-upgraded my system but this time I've kept plasma 5.12 (and all the rest of kde stack: kf 5.46 etc). And the cpu activity is the usual 6 to 8%. So it does seem to be a problem related with kde and not with other software involved in the system upgrade (say, some part of x.org). Is there maybe some new effect or something in plasma 5.13 that wasn't there in 5.12 and that I can try to disable to see if it's the culprit? I'm using the opengl 2 backend. With opengl 3 it doesn't get any better. With Xrender it goes back to 6% cpu usage but of course it's not really smooth...
Please provide the output of qdbus org.kde.KWin /KWin supportInformation
Created attachment 113852 [details] support info Here it is.
Please try disabling the blue effect
Disabling the blu effect brings down the cpu usage by about 7%, which leaves it still above 30. And, btw, the only things that the blur effects blurs are the plasma decorations. Windows are not blurred, not even when they become semi-transparent when I drag them around. Another possible clue: 30 dolphin windows do not cause kwin to use much cpu, 30 firefox windows (and all pretty much static, that is without any change of the content like in ads, animation etc) cause the 40% cpu activity. Right now we are at 80% cpu activity for kwin! Also firefox seems to have higher cpu activity (higher than it has under 5.12).
I see, so the problem is probably with firefox, not with KWin. KWin is just a victim of the stupid things firefox does. You can use xev -id <firefox window id> to monitor which events it creates. I assume it's constantly updating e.g. window title.
If that's the reason, why doesn't firefox "victimize" kwin 5.12? I have now two root filesystems (I use btrfs). Both of them have the same packages and at the same versions. Except one root has plasma 5.12 and the other has plasma 5.13. And the problem is only with plasma 5.13...
If we know which property causes the issue, then we can look into what changed in KWin.
I wrote the following before reading your new comment (and I got a "mid air collision" from the bugtracker when I tried to post it :) ): ----------------------------------------------------------------- Anyways, I went ahead and tried xev. So, I did the following: 1) wmctrl -lp to get all the winids of firefox's windows 2) xev -id on each and everyone of them (just to be sure) When I do "xev -id <somewindid>" xev just stand there without reporting anything which I guess means the window <somewinid> isn't generating any event, right? Anything else I can try?
And, if I move the pointer on and off any firefox window when I'm xev'ing one of them, then xev says ColormapNotify event, serial 18, synthetic NO, window 0x600007b, colormap 0x6000002, new NO, state ColormapInstalled ColormapNotify event, serial 18, synthetic NO, window 0x600007b, colormap 0x6000002, new NO, state ColormapUninstalled Don't know if it's relevant.
try to activate a firefox window. I get significantly more events when doing that.
Created attachment 113888 [details] events for the activation of one firefox window You can find the events in the attachment. I have that wm setting that give focus to the window under the pointer and the events that you see in the file have been generated by 1) moving the cursor on the window 2) clicking on the window 3) moving the cursor on another window
It changes WM_HINTS property. I need to check, but my feeling is that this is not allowed.
Isn't that something that an application can set/change to give a suggestion to the wm (the hint part...)? Anyways, let me know if there's something else I can try. I sync'ed the two roots with another system, a desktop one (and more recent, a 4770k I think). I see the same behavior, it's about triple the cpu usage by kwin 5.13 wrt to 5.12.
Can you compare the wm_hints property?
Created attachment 113894 [details] events 5.12
Created attachment 113895 [details] events 5.13
I assumed you wanted the events for both 5.12 and 5.13. You can find them in the attachments above. They have been generated by the same firefox window.
Created attachment 113896 [details] props 5.12
Created attachment 113897 [details] props 5.13
Sorry, you probably wanted the props of one firefox window. I used xprop. You can find the props, ver 5.12 and 5.13, for the same window in the attachments above.
Actually I wanted the props of same window before and after activating it.
Created attachment 113902 [details] props before
Created attachment 113903 [details] props after
I have the same issue after updating from 5.12 to 5.13. I found that switching to Xrender lowers my CPU usage to 2%-3%.
Marking as worksforme because there wasn't any activity for a while and also because cpu usage is normal on my machine.