Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#43818 - [linux] [kwin] Switching to virtual terminal, kwin uses 100% CPU, usually.

Attached to Project: Arch Linux
Opened by James (thx1138) - Saturday, 14 February 2015, 19:45 GMT
Last edited by Doug Newgard (Scimmia) - Wednesday, 04 October 2017, 19:05 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Tobias Powalowski (tpowa)
Felix Yan (felixonmars)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

kdebase-workspace 4.11.16-1

While switched from an X Windows KDE session to an alternate Virtual Terminal, whether or not logged in on that terminal, often, but not always, kwin will take 100% CPU on one core. Switching back to the X KDE session seems to always return kwin CPU usage to normal.

Sorry - I have not found where to submit reports through the Upstream URL.
This task depends upon

Closed by  Doug Newgard (Scimmia)
Wednesday, 04 October 2017, 19:05 GMT
Reason for closing:  Fixed
Comment by James (thx1138) - Saturday, 14 February 2015, 20:17 GMT
Ok, I've reported this upstream.
Comment by James (thx1138) - Sunday, 15 February 2015, 04:12 GMT
KDE Bugtracking System
Bug 330954 - ~100% CPU usage when switching to text console
https://bugs.kde.org/show_bug.cgi?id=330954
Comment by James (thx1138) - Sunday, 15 February 2015, 04:54 GMT
It has been suggested that this is likely due to vertical sync, where the driver will perform a busy wait for
a retrace that never occurs.

As a workaround, I have set "Tearing Prevention (VSync) None", in "System Settings/Desktop Effects", under the "Advanced" tab. I am no longer seeing the 100% CPU usage.
Comment by Doug Newgard (Scimmia) - Monday, 16 February 2015, 05:41 GMT
They're saying this is a driver problem. Let me know where to assign it.
Comment by Doug Newgard (Scimmia) - Friday, 20 February 2015, 03:11 GMT
So are you going to tell me what driver you use, or ...?
Comment by James (thx1138) - Friday, 20 February 2015, 07:23 GMT
Sorry - I'm running the Radeon driver from linux 3.18.6-1 on a AMD/ATI Redwood PRO Radeon HD 5570.

The KDE/kwin developers are a little resigned about this issue and say that it is a video device driver problem. There are people seeing the same problem on Nvidia cards, and they are not expecting to see much of a response from Nvidia on their closed-source driver.

Still, it is not clear to me that kwin does not have some role in this, switching back and forth between KDE/X and a Virtual Terminal, since obviously configuring kwin "Tearing Prevention (VSync)" seems to make this problem appear and disappear. For instance, regardless of the actual "Tearing Prevention (VSync)" setting, before switching to a Virtual Terminal, kwin could turn off the VSync waiting, and turn it back on when kwin is re-activated.

So, do you complain to the kernel driver people about using busy waits? Or to the kwin people about not providing adaptive configuration when kwin is activated and suspended?
Comment by mattia (nTia89) - Monday, 02 October 2017, 17:56 GMT
is this issue still valid?
Comment by James (thx1138) - Wednesday, 04 October 2017, 18:51 GMT
Another 2 1/2 years on, I am no longer seeing this problem on my system.

On Arch Linux, with:
linux 4.13.4-1
kwin 5.10.5-1

running a triple head Radeon 5570, and setting:
System Settings -> Display and Monitor -> Compositor -> Tearing prevention ("vsync"): -> Never

Starting a clean session, starting Firefox, then switching to a text console, CPU usage is normal. Hopefully, this is no longer an issue for anyone.

Loading...