[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [kscreenlocker] [Bug 347772] kscreenlocker_greet using 100% cpu on plasma 5
From:       Jakub Krajewski <bugzilla_noreply () kde ! org>
Date:       2017-10-24 23:53:27
Message-ID: bug-347772-17878-Nu4x1ISLve () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=347772

Jakub Krajewski <jakub@krajewski.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub@krajewski.org

--- Comment #22 from Jakub Krajewski <jakub@krajewski.org> ---
I've also was hit by the same issue - it's definitely linked to NVIDIA drivers.
I've been using 384.90 drivers on Debian 9. When I start more than one session,
kscreenlocker_greet (5.8.6 as in Debian 9) starts to hog CPU to 100%, using two
processes.

Backtrace of one of them looks like this, second one locks inside NVIDIA libs
(no debug symbols unfortunately):

#0  pthread_cond_wait@@GLIBC_2.3.2 () at
../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f7b1312fc6b in QWaitCondition::wait(QMutex*, unsigned long) () from
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007f7b13ff5758 in QSGThreadedRenderLoop::polishAndSync
(this=this@entry=0x55f3e7423e00, w=<optimized out>,
inExpose=inExpose@entry=false) at scenegraph/qsgthreadedrenderloop.cpp:1183
#3  0x00007f7b13ff6087 in QSGThreadedRenderLoop::handleUpdateRequest
(this=0x55f3e7423e00, window=0x55f3e7428980) at
scenegraph/qsgthreadedrenderloop.cpp:1010
#4  0x00007f7b1402e216 in QQuickWindow::event (this=0x55f3e7428980,
e=0x7ffca8e8a0b0) at items/qquickwindow.cpp:1527
#5  0x00007f7b132fe87a in QCoreApplication::notify(QObject*, QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f7b132fe9e0 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f7b1365260e in QWindowPrivate::deliverUpdateRequest() () from
/usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#8  0x00007f7b13652b59 in QWindow::event(QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#9  0x00007f7b1402e1b5 in QQuickWindow::event (this=0x55f3e7428980,
e=0x7ffca8e8a270) at items/qquickwindow.cpp:1546
#10 0x00007f7b132fe87a in QCoreApplication::notify(QObject*, QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007f7b132fe9e0 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007f7b13351fee in QTimerInfoList::activateTimers() () from
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007f7b13352549 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007f7b0f2387f7 in g_main_context_dispatch () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#15 0x00007f7b0f238a60 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#16 0x00007f7b0f238b0c in g_main_context_iteration () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#17 0x00007f7b1335304f in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007f7b132fc9ca in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007f7b1330513c in QCoreApplication::exec() () from
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x000055f3e539ab5a in main (argc=<optimized out>, argv=<optimized out>) at
./greeter/main.cpp:181

I have found some workaround (until NVIDIA fixes their drivers... or Qt will do
something):
1) Rename kscreenlocker_greet binary to something like kscreenlocker_greet.bin
(on Debian 9 it's located in
/usr/lib/x86_64-linux-gnu/libexec/kscreenlocker_greet - it's in package
libkscreenlocker5)
2) Create wrapper script named kscreenlocker_greet that runs the
kscreenlocker_greet binary but with enforced basic render loop (which does not
use threads, thus NVIDIA doesn't lock), make it executable:

#!/bin/bash
QSG_RENDER_LOOP=basic /usr/lib/x86_64-linux-gnu/libexec/kscreenlocker_greet.bin
$@

Close all sessions, and check then again. Works for me. :)

-- 
You are receiving this mail because:
You are watching all bug changes.=
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic