Bug 387321 - High CPU/GPU load after switching Display Port connected screen off and on in multi screen setup
Summary: High CPU/GPU load after switching Display Port connected screen off and on in...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 5.11.3
Platform: Gentoo Packages Linux
: NOR major
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-26 14:38 UTC by Jim Jones
Modified: 2018-02-28 17:12 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Jones 2017-11-26 14:38:11 UTC
Hi,

i have two screens connected to my pc: a VGA screen and a Display Port (DP) screen, the DP screen is the primary screen

this are the steps needed to reproduce the bug:

1) both screens VGA,DP are turned on and the DP screen is the primary screen which shows the taskbar
2) turn off the DP screen - the taskbar is moved to the VGA screen
3) turn on the DP screen - taskbar moves back to the DP screen - after that plasmashell has a high cpu load

the only way to reduce the high cpu load is to restart plasmashell with

kquitapp5 plasmashell
plasmashell

this is the output of the plasmashell between DP off and on:

ld primary output: QScreen(0x563be0ba6780, name="DP-2") New primary output: QScreen(0x563be0ba6c10, name="VGA-1")
trying to show an empty dialog
file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Desktop.qml:147:19: QML Loader: Binding loop detected for property "height"
file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Desktop.qml:147:19: QML Loader: Binding loop detected for property "height"
"backend: writing cache, plasmoidId = 16"
"backend: file /home/foo/.cache/plasmashell/plasmoids/org.kde.weatherWidget/plasmoidId-16.json"
backend: writing cache content finished
trying to show an empty dialog
Old primary output: QScreen(0x563be0ba6c10, name="VGA-1") New primary output: QScreen(0x563be3da58c0, name="DP-2")
trying to show an empty dialog
file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Desktop.qml:147:19: QML Loader: Binding loop detected for property "height"
file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Desktop.qml:147:19: QML Loader: Binding loop detected for property "height"
trying to show an empty dialog
file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Desktop.qml:147:19: QML Loader: Binding loop detected for property "height"
file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Desktop.qml:147:19: QML Loader: Binding loop detected for property "height"
DBusMenu disabled for this application
org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_00_1b.0.analog-stereo"
org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor"
trying to show an empty dialog
trying to show an empty dialog
Comment 1 Jim Jones 2017-11-26 14:44:32 UTC
after inspecting the processes it seems kwin is causing the higher cpu load. while running before the DP off/on switch with about 0.6% it runs afterwards with 20% (constant) - a restart of plasmashell fixes the problem
Comment 2 Jim Jones 2017-11-26 16:23:08 UTC
the gpu usage also goes up from ~3% to 75% and stays there until plasmashell is restarted - as it's an intel card i use "intel_gpu_top"
Comment 3 Tim Rees 2018-01-04 09:03:08 UTC
I also have this issue.  Using a Laptop with external display connected, switching the primary display to anything other than the display when was used when KDE started is what causes the issue which results in high CPU load from kwin_x11 and plasmashell.

Steps to reproduce:
1. Start KDE on laptop with lid open & external display plugged in (can be either HDMI or displayport), primary display will be the laptop internal display
2. Open System Settings Displays, change primary display to be external display
 
- Observe CPU load increasing for kwin_x11 and plasmashell, takes up to a minute to be noticeable - after a longer course of time the system will be unusable

3.Revert configuration for the primary display to the be laptop display

 - CPU usage by kwin_x11 and plasmashell will eventually reduce to normal levels


Since I normally use the external display with the laptop closed when docked, my current workaround is to disable the laptop display and then start KDE with the external display being the primary display.

Using KDE Plasma on Fedora KDE Spin; Plasma version 5.11.4
Comment 4 Jim Jones 2018-01-23 20:48:09 UTC
@tim just restart plasma when the load gets high with this cmds :

kquitapp5 plasmashell
plasmashell &

this work around works for me
Comment 5 grouchomarx.fr 2018-02-28 15:39:06 UTC
I had this issue on a similar setup (docked laptop and a monitor on DP->hdmi).

But I can not reproduce it anymore on KDE Neon 5.12.

I have also tested it with an older live image of Neon.
I have the issue with neon-useredition-20180207, but if I upgrade the packages and restart the session, the problem is gone.
Comment 6 Jim Jones 2018-02-28 17:12:15 UTC
i'm now on 5.12.2 and the problem is gone. i will close this bug