Bug 380800 - High CPU usage with 'Desktop Effects' enabled
Summary: High CPU usage with 'Desktop Effects' enabled
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-kitemviews
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-04 03:51 UTC by Steven Haigh
Modified: 2023-09-04 03:45 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Haigh 2017-06-04 03:51:10 UTC
This output of 'top' is grabbed from just moving the mouse around over the top of the system settings dialog.

top - 12:28:24 up 2 min,  2 users,  load average: 0.67, 0.28, 0.10
Tasks: 287 total,   2 running, 284 sleeping,   0 stopped,   1 zombie
%Cpu(s):  9.7 us,  3.0 sy,  0.0 ni, 87.0 id,  0.0 wa,  0.2 hi,  0.2 si,  0.0 st
KiB Mem : 10228404 total,  8320700 free,  1099032 used,   808672 buff/cache
KiB Swap:  5181436 total,  5181436 free,        0 used.  8807936 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 1861 netwiz    20   0  988516 154128  92760 R  49.2  1.5   0:16.39 systemsettings5
  988 root      20   0  291872  70384  44240 S  23.3  0.7   0:15.02 Xorg
 1318 netwiz    20   0 3365896 141000  87728 S  10.0  1.4   0:15.30 kwin_x11
 1333 netwiz    20   0 4571460 420064 159660 S   4.3  4.1   0:12.64 plasmashell
 1024 root     -51   0       0      0      0 S   1.0  0.0   0:00.64 irq/40-nvidia
    8 root      20   0       0      0      0 S   0.3  0.0   0:00.05 rcu_sched
  492 root      20   0       0      0      0 S   0.3  0.0   0:00.05 btrfs-transacti
  887 root      20   0  789412  18016  15060 S   0.3  0.2   0:00.19 NetworkManager
 1885 netwiz    20   0  756992  68836  58156 S   0.3  0.7   0:00.49 konsole

Disabling the desktop effects via "Alt-Shift-F12" will cause this behaviour to stop immediately.

# rpm -qa | grep kwin | sort
kf5-kwindowsystem-5.34.0-1.fc26.x86_64
kwin-5.9.5-2.fc26.x86_64
kwin-common-5.9.5-2.fc26.x86_64
kwin-libs-5.9.5-2.fc26.x86_64

# rpm -qa | grep nvidia | sort
akmod-nvidia-381.22-2.fc26.x86_64
kmod-nvidia-4.11.3-300.fc26.x86_64-381.22-2.fc26.x86_64
nvidia-driver-381.22-6.fc26.x86_64
nvidia-driver-cuda-libs-381.22-6.fc26.x86_64
nvidia-driver-libs-381.22-6.fc26.x86_64
nvidia-libXNVCtrl-381.22-1.fc26.x86_64
nvidia-settings-381.22-1.fc26.x86_64

Am more than happy to do more debug as required.
Comment 1 Steven Haigh 2017-06-05 02:11:31 UTC
For the record, I have managed to get systemsettings5 to show the same level of CPU usage on a laptop with an intel GPU.

Another point - on the first system with the nvidia card, if I have the compositor enabled, I have observed kwin_x11 use up to 160% CPU (average of 140%) while playing a DVB-T stream within VLC. Disabling the compositor or using Alt-Shift-F12 causes the problem to disappear completely.
Comment 2 Steven Haigh 2017-06-05 02:13:44 UTC
The following output is from an i7 laptop with only an intel GPU. I was doing nothing but moving the mouse around in circles over the 'systemsettings5' window.

top - 12:12:45 up  1:24,  3 users,  load average: 0.74, 0.33, 0.20
Tasks: 223 total,   1 running, 222 sleeping,   0 stopped,   0 zombie
%Cpu(s): 13.8 us,  2.7 sy,  0.0 ni, 82.5 id,  0.3 wa,  0.4 hi,  0.3 si,  0.0 st
KiB Mem :  8077024 total,  5125184 free,  1464352 used,  1487488 buff/cache
KiB Swap:  8125436 total,  8125436 free,        0 used.  5987760 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 3748 shaigh    20   0  744544  67684  56812 S  46.5  0.8   0:07.06 systemsettings5
 1076 root      20   0  368044 101532  69928 S  11.6  1.3   1:23.75 Xorg
 1271 shaigh    20   0 3239840  85740  61076 S   7.6  1.1   2:01.79 kwin_x11
 1281 shaigh    20   0 3932612 280104 110536 S   0.7  3.5   0:51.55 plasmashell
 2035 shaigh    20   0 1431656 267336 135888 S   0.7  3.3   2:41.00 chrome
  125 root      20   0       0      0      0 S   0.3  0.0   0:03.57 kworker/u8:4
  812 root     -51   0       0      0      0 S   0.3  0.0   0:21.02 irq/30-iwlwifi
 2218 shaigh    20   0 1048804 118212  68972 S   0.3  1.5   0:08.65 chrome
 3298 root      20   0       0      0      0 S   0.3  0.0   0:01.18 kworker/u8:2
 3709 shaigh    20   0 1002728 122836  68264 S   0.3  1.5   0:17.03 chrome
 3747 shaigh    20   0  157036   4252   3680 R   0.3  0.1   0:00.11 top
Comment 3 thePanz 2017-06-13 10:12:09 UTC
I can confirm the same behavior: kwin_x11 is always at 10%, while disabling the accelleration (Ctrl+Alt-F12) it goes back to 1%/2%

System: ArchLinux
KDE Plasma: 5.10.1
KDE Frameworks: 5.35.0
Qt: 5.9
Kernel: 4.11.3-1-ARCH
OS Type: 64 Bit

Processor: i7-7500
Comment 4 Martin Flöser 2017-06-17 12:38:32 UTC
The high cpu load of systemsettings it the root problem here. It seems to trigger repaints which explains the high cpu load in X and KWin.
Comment 5 Christoph Feck 2017-06-26 16:22:11 UTC
I remember we already had a ticket about this, but cannot find it right now.
Comment 6 Christoph Feck 2017-06-26 16:25:21 UTC
(And don't add back Martin, he refuses to acknowledge that compositing causes higher load. Just fix constant repaints on mouse move.)
Comment 7 thenujan 2023-08-05 07:19:14 UTC
Thank you for the bug report. Unfortunately we were not able to get to it yet. Can we ask you to please check if this is still an issue with Plasma 5.27 (the current LTS version)
Comment 8 Bug Janitor Service 2023-08-20 03:45:17 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 9 Bug Janitor Service 2023-09-04 03:45:19 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now 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

Thank you for helping us make KDE software even better for everyone!