<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>381280</bug_id>
          
          <creation_ts>2017-06-16 14:05:33 +0000</creation_ts>
          <short_desc>Increased CPU usage with Qt 5.9</short_desc>
          <delta_ts>2017-09-22 16:40:03 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Plasma</classification>
          <product>plasmashell</product>
          <component>general</component>
          <version>master</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>378010</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jan Kundrát">jkt</reporter>
          <assigned_to name="David Edmundson">kde</assigned_to>
          <cc>alex.ioannou</cc>
    
    <cc>andre.cbarros</cc>
    
    <cc>bberberov+kde</cc>
    
    <cc>bj.cardon</cc>
    
    <cc>bshah</cc>
    
    <cc>cfeck</cc>
    
    <cc>clearmartin</cc>
    
    <cc>ervin</cc>
    
    <cc>jr</cc>
    
    <cc>kurt_seebauer</cc>
    
    <cc>luke-mail</cc>
    
    <cc>plasma-bugs-null</cc>
    
    <cc>radu.margineanu</cc>
    
    <cc>robby.engelmann</cc>
    
    <cc>stefan.loewen</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1682822</commentid>
    <comment_count>0</comment_count>
    <who name="Jan Kundrát">jkt</who>
    <bug_when>2017-06-16 14:05:33 +0000</bug_when>
    <thetext>I&apos;m seeing increased CPU usage from both kwin_x11 and plasmashell after I updated &quot;everything&quot; after several months of no updates. Now both kwin_x11 and plasmashell consume &gt;20% of CPU time according to htop, and the cooling fan spin on an idle system.

I&apos;m on Gentoo Linux with kernel 4.9.31, xorg-server-1.19.3, xorg-x11-7.4-r2, mesa 17.1.1, Qt 5.9 from git (last week&apos;s), kf5 and plasma-* from git master as of last week. I&apos;m using KMS with an integrated Intel Skylake GPU (i5-6300U, Thinkpad T460s).

Initially everything works well. After I dock the machine and kscreen switches to an external screen (which happens to be bigger in resolution), both plasmashell and kwin_x11 put increased load on the CPUs. Stuff gets fixed when I log out and log back in while docked. When I un-dock and re-dock after that (and the screen switches), the increased CPU load is back there.

I tried looking into `perf top` for both kwin_x11 and plasmashell, but I don&apos;t see anything that is suspicious to my untrained eyes.

I&apos;ve heard some rumors on IRC about Qt sending expose events that it should not be sending. I have no clue whether the bug is in Plasma, Qt, Mesa or somewehere else. I know that it is not in the kernel because I see the same behavior on 4.9.18 that I used to run before. However, because I&apos;m seeing this high load in plasma apps, I&apos;m reporting the bug here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1683277</commentid>
    <comment_count>1</comment_count>
    <who name="Lukas">luke-mail</who>
    <bug_when>2017-06-19 08:03:42 +0000</bug_when>
    <thetext>I am experiencing similar issues with kwin_x11 and plasmashell. Both processes constantly eat up about 20% of CPU time. kwin_x11 CPU usage returns back to normal once I kill plasmashell. The issue arises during regular operation without secondary monitor although I have not testet it with a dock. An strace of plasmashell showed that it was pretty busy with various DRM systemcalls to the i915 Intel graphics driver although I have no idea whether this is in any way related to the issue.

The issue first occurred after a system upgrade which comprised the following changes:
Qt 5.8 -&gt; Qt 5.9
kwin 5.10.1 -&gt; 5.10.2
plasma-workspace 5.10.1 -&gt; 5.10.2

I am running an Arch Linux installation on a Thinkpad T470:
Intel Core i5-7200u
Intel HD Graphics 620

A colleague with a Thinkpad X1 (also Intel CPU and Graphics) experiences the same issue. Please let me know if I can provide you with further information.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1683280</commentid>
    <comment_count>2</comment_count>
    <who name="Jan Kundrát">jkt</who>
    <bug_when>2017-06-19 08:17:57 +0000</bug_when>
    <thetext>(In reply to Jan Kundrát from comment #0)
&gt; Initially everything works well. After I dock the machine and kscreen
&gt; switches to an external screen (which happens to be bigger in resolution),
&gt; both plasmashell and kwin_x11 put increased load on the CPUs.

I have one external screen at work (Dell U2711, 2560x1440) and another one (Dell U3014, 2560x1600) at home. This only happens on the work one; I can switch freely at home and there&apos;s no issue there. This is on the exact same laptop with the same model of the dock.

An interesting point about my home screen is that kscreen is configured to switch to it automatically, but it actually doesn&apos;t make that switch when I dock. I have to either run `xrandr` with no options, or to power-cycle that external screen. After doing any of these two options, kscreen switches the output as expected. I&apos;m not sure if it&apos;s related in any way. Either way, plasmashell&apos;s and kwin_x11&apos;s CPU consumption is always fine with this not-auto-switching screen.

Also confirming because there&apos;s more people hitting this than just me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1683369</commentid>
    <comment_count>3</comment_count>
    <who name="Robby Engelmann">robby.engelmann</who>
    <bug_when>2017-06-19 15:41:28 +0000</bug_when>
    <thetext>*** Bug 381394 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1683371</commentid>
    <comment_count>4</comment_count>
    <who name="Robby Engelmann">robby.engelmann</who>
    <bug_when>2017-06-19 15:42:40 +0000</bug_when>
    <thetext>I assume my bug is the same as this one, so please find some more information here: https://bugs.kde.org/show_bug.cgi?id=381394</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1684285</commentid>
    <comment_count>5</comment_count>
    <who name="Kevin Ottens">ervin</who>
    <bug_when>2017-06-23 14:53:07 +0000</bug_when>
    <thetext>I&apos;m seeing this as well, do you happen to use SlideShow for the desktop background? Because I do and I bumped into:
https://bugs.kde.org/show_bug.cgi?id=381000

Trying to see if they&apos;re duplicates.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1684303</commentid>
    <comment_count>6</comment_count>
    <who name="Jan Kundrát">jkt</who>
    <bug_when>2017-06-23 16:45:24 +0000</bug_when>
    <thetext>&gt; I&apos;m seeing this as well, do you happen to use SlideShow for the desktop
&gt; background?

Nope, my background is a static image.

On the other hand, right now I&apos;m not getting that high CPU usage at this moment. I haven&apos;t made any changes to plasma config files; I&apos;m using the same set of applets, the same everything. So it seems that the reproducibility is a bit random :(.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1684311</commentid>
    <comment_count>7</comment_count>
    <who name="Robby Engelmann">robby.engelmann</who>
    <bug_when>2017-06-23 18:14:54 +0000</bug_when>
    <thetext>The most reproducible way to trigger it is for me:
1. install https://github.com/kotelnik/plasma-applet-weather-widget
2. add it to the panel
3. switch to another activity

This way I get a constantly cpu of plasmashell &gt;15-20% in almost every case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1691003</commentid>
    <comment_count>8</comment_count>
    <who name="">bj.cardon</who>
    <bug_when>2017-07-26 01:35:55 +0000</bug_when>
    <thetext>I&apos;m having an issue that seems like it could be related to this. Whenever I connect to an external screen with a Thunderbolt 3 port, the CPU usage of plasmashell gradually climbs and climbs until htop shows it at ~130%, Xorg climbs to ~60%, and another plasmashell process at ~60%. The machine slows to a crawl.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1691869</commentid>
    <comment_count>9</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2017-07-30 22:58:06 +0000</bug_when>
    <thetext>Jan, can you apply my debug patch on https://bugsfiles.kde.org/attachment.cgi?id=106799 and tell me if you see 

&quot;DAVE: We are the last dirty window, syncing&quot; in the output or not. It should be there every frame, and a max of 60 times a second</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1692005</commentid>
    <comment_count>10</comment_count>
    <who name="Kurt Seebauer">kurt_seebauer</who>
    <bug_when>2017-07-31 16:10:21 +0000</bug_when>
    <thetext>I&apos;m having the same isssues and more importantly my computer runs out of memory and freezes after ~24 hours (32 Gig plus swap). I use a few activities in parallel all with their own applets. 
Removing the weather (and other) applets from the screens helped immediately, plasmashell is back from 20% cpu to almost 0.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1692337</commentid>
    <comment_count>11</comment_count>
    <who name="Alex Ioannou">alex.ioannou</who>
    <bug_when>2017-08-02 08:41:01 +0000</bug_when>
    <thetext>Same thing experienced here on KDE Neon.

PID  USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND    
1346 aioannou  20   0 4191172 214716  89412 S  34.4  2.6 347:18.00 plasmashell                                                                                                                                                                                               
970  root      20   0  388696  93744  42068 S  27.5  1.1 365:32.96 Xorg                                                                                                                                                                                                      
1342 aioannou  20   0 3284368 110304  64048 S  27.5  1.4 426:34.52 kwin_x11

My system is barely usable at the moment with most of the CPU being consumed by these processes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1692818</commentid>
    <comment_count>12</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2017-08-04 09:29:14 +0000</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 378010 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1694138</commentid>
    <comment_count>13</comment_count>
    <who name="">andre.cbarros</who>
    <bug_when>2017-08-11 23:35:56 +0000</bug_when>
    <thetext>I have this annoying high CPU usage on all machines I upgraded to latest KDE. As like other have reported, even with no fancy things enabled plasmashell expand to consume whatever it can reach and then I kill and restart it to bring it back to an acceptable state. I love KDE and have been a user of it since 199x, survived many incarnations of it but this bug in particular is really, really almost unbearable. What must I do to help provide an usable report?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1699229</commentid>
    <comment_count>14</comment_count>
    <who name="Martin Kostolný">clearmartin</who>
    <bug_when>2017-09-05 21:35:39 +0000</bug_when>
    <thetext>Hi! I know this is resolved dupl. to another bug but I can see some mentions about weather-widget only here. And that it&apos;s possibly causing these high CPU problems - I was redirected here from github page of that widget.

I was unfortunately unable to replicate this behaviour on my Arch linux with plasma-applet-weather-widget git version. I have Plasma 5.10.5, KF 5.37, Qt 5.9.1, Xorg, Intel graphics with generic modesetting driver.

Is this still an issue? Is it specific for weather-widget for anybody? If it is the case, please let&apos;s talk here: https://github.com/kotelnik/plasma-applet-weather-widget/issues/54</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1701594</commentid>
    <comment_count>15</comment_count>
    <who name="Robby Engelmann">robby.engelmann</who>
    <bug_when>2017-09-17 18:21:45 +0000</bug_when>
    <thetext>Could you please try to add a folderview widget to each of the activities and set them up to show files linked to the current activity.
Then test again the acitivity switching.
I tried to add widget per widget as a new user and after adding these I could reproduce the bug even without the weather-widget under plasma 5.10.95 with frameworks 5.38.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1702420</commentid>
    <comment_count>16</comment_count>
    <who name="revan">radu.margineanu</who>
    <bug_when>2017-09-22 06:30:14 +0000</bug_when>
    <thetext>I really don&apos;t think this bug is a duplicate of 378010 so I&apos;m going to report here. I have a fresh install of KDE Neon on an a dell Latitude 7480 (i7-7600U, HD 620 graphics) with all updates (qt 5.9.1, plasma 5.10.5). I&apos;m using the Dell DA200 USB-C adapter and the laptop&apos;s HDMI port to drive 2 dell monitors. 

If I freshly boot my laptop, close the lid (which deactivates the laptop&apos;s internal display leaving only the external monitors) lock the screen, leave it for 12 hours when I get check top kwin_x11 eats 8 to 12 percent of my CPU constantly without doing anything (no windows open, static background).

If I freshly boot my laptop, close the lid and look at top kwin_x11 eats 0.4 percent of my CPU constantly. Clearly there is a problem over time.

For now kwin_11 --replace seems to solve the problem, at least temporarily (haven&apos;t had the time to leave it over night).

If you need more details contact me. Right now I can reproduce all the steps need for this bug from a fresh KDE Neon install, update, connect monitors, close lid, and voila.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1702436</commentid>
    <comment_count>17</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2017-09-22 09:14:42 +0000</bug_when>
    <thetext>This ticket (as well as bug 378010) is for the plasmashell process. If you get constant high CPU usage in kwin, and there is no constant painting (check the Show Paint effect) from plasmashell, please report this issue to kwin developers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1702457</commentid>
    <comment_count>18</comment_count>
    <who name="Alex Ioannou">alex.ioannou</who>
    <bug_when>2017-09-22 12:17:23 +0000</bug_when>
    <thetext>@Christoph When mine spikes kwin does too.   Does this mean that if I switch to Wayland then the problem might go away?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1702460</commentid>
    <comment_count>19</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2017-09-22 12:27:41 +0000</bug_when>
    <thetext>If there is no constant repainting, but kwin still uses idle CPU, it is a bug that must be reported, even for the X11 version. It is most likely a driver bug, though.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>