psifidotos / kwin-script-workflow

This is an effort to create a KDE KWin script that integrates the main Activities, Virtual Desktops and Tasks Functionalities from Plasma Desktop in just one component.
http://workflow.opentoolsandspace.org/
GNU General Public License v2.0
5 stars 2 forks source link

KWin script extends login by ~10 seconds #4

Open ff2000 opened 11 years ago

ff2000 commented 11 years ago

Activating the KWin script and the next login takes longer. I watched with top() and nothing obvious happens, feels like a "sleep()"... I would like to use this instead of the plasmoid, find the popup not so pleasing...

psifidotos commented 11 years ago

Well this is important... I dont know what top() is...

I need the following information:

ff2000 commented 11 years ago

Should have been top not top() - hope you know that ;) "Nothing obvious" == "no process with with unexpected high CPU load"

Version: the most recent releases available when I reported this: WorkFlow-0.4.1 kde-4.10.1 Gentoo

Graphics card: Intel HD3000 (i7 2600K) xorg-server-1.13.1, xf86-video-intel-2.21.4

Only disabling the kwin script and using the plasmoid works fine (no delay) (thought my last sentence was clear enough ;))

psifidotos commented 11 years ago

Στις 26/03/2013 06:48 μμ, ο/η ff2000 έγραψε:

Should have been top not top() - hope you know that ;) "Nothing obvious" == "no process with with unexpected high CPU load"

Version: the most recent releases available when I reported this: WorkFlow-0.4.1 kde-4.10.1 Gentoo

Graphics card: Intel HD3000 (i7 2600K) xorg-server-1.13.1, xf86-video-intel-2.21.4

Only disabling the kwin script and using the plasmoid works fine (no delay) (thought my last sentence was clear enough ;))

Ok...

is that the first kwin script you are using or running in your system?

ff2000 commented 11 years ago

is that the first kwin script you are using or running in your system?

No. Also running "Opacity menu".

psifidotos commented 11 years ago

No. Also running "Opacity menu".

  1. Ok, just to be sure try using only the WorkFlow script and nothing else from kwin scripts
  2. Try using the: www.opentoolsandspace.org/Art/tests/kwin-script-samegame.kwinscript and disable anything else. It is just the samegame in a KWin Script it can be triggered with BottomRight corner. It crashes on logging out the kwin but you can uninstall it afterwards. What we need to know if it creates the same issue in logging in.
ff2000 commented 11 years ago
  1. Ok, just to be sure try using only the WorkFlow script and nothing else from kwin scripts Enabling/Disabling Opacity Menu does not have any influence on startup time when WorkFlow is running.
  2. Try using the: www.opentoolsandspace.org/Art/tests/kwin-script-samegame.kwinscript samegame does not delay Login time. (But Quit-Button does not work, need to kwin --replace)

(btw: already had that sometimes before. Your krinscript was a gz-compressed tarball and my kde can't import those; have to uncompress and rezip... Any idea what I am missing?)

But I have some additional information: Can trigger this by simply running kwin --replace. tail -f .xsession-errors gave me this before the hang: kwin(5370) KActivities::InfoPrivate::initializeCachedData: Locking mutex for name kwin(5370) KActivities::InfoPrivate::initializeCachedData: Locking mutex for icon

and that after: kwin(5370) KActivities::InfoPrivate::nameCallFinished: Unlocked mutex kwin(5370) waitForCallFinished: Trying to lock mutex kwin(5370) KActivities::Info::name: Returning name "Desktop" kwin(5370) KActivities::InfoPrivate::iconCallFinished: Unlocked mutex kwin(5370) waitForCallFinished: Trying to lock mutex kwin(5370) KActivities::Info::icon: Returning icon ""

psifidotos commented 11 years ago

Ok.. :) I wouldnt have debugged that one.... It appears that because activitymanager is not ready to provide information for the activities. KWin was waiting for these information because of my script. Try to install the workflow plasmoid from branch "0.4.x-loginissue" . I have made asynchronous calls for accessing activities in initialization, that should probably fix that issue... If it fixes it it will also be merged to version 0.4.2


(btw: already had that sometimes before. Your krinscript was a gz-compressed tarball and my kde can't import those; have to uncompress and rezip... Any idea what I am missing?) well, sometimes the way I am creating the tar.gz files from dolphin it creates that issue. I dont know what's wrong but I forgot to check it out before publishing in order to create again... :)

In general I am not that good with CLI, so your command:

kwin --replace. tail -f .xsession-errors

is it correct? the dot after replace confuses me... :)

ff2000 commented 11 years ago

On Wednesday 27 March 2013 05:59:05 Michail Vourlakos wrote:

Try to install the workflow plasmoid from branch "0.4.x-loginissue" Installed from that branch, but did not reduce login time. I also got a nasty crash:

Application: WorkFlow Workarea Manager (workareamanagerd), signal: Segmentation fault Using host libthread_db library "/lib64/libthread_db.so.1". [Current thread is 1 (Thread 0x7f975e145780 (LWP 16868))]

Thread 2 (Thread 0x7f975ba64700 (LWP 16871)): [KCrash Handler]

6 dbus_pending_call_get_completed (pending=0x0) at /var/tmp/paludis/sys-

apps-dbus-1.6.8-r1/work/dbus-1.6.8/dbus/dbus-pending-call.c:692

7 0x00007f9760759c4d in _dbus_connection_block_pending_call (pending=0x0) at

/var/tmp/paludis/sys-apps-dbus-1.6.8-r1/work/dbus-1.6.8/dbus/dbus- connection.c:2374

8 0x00007f9763fd3bf7 in q_dbus_pending_call_block (pending=)

at qdbus_symbols_p.h:309

9 QDBusConnectionPrivate::waitForFinished (this=0x2186ee0, pcall=0x2315a60)

at qdbusintegrator.cpp:1781

10 0x00007f9764013c67 in QDBusPendingCallPrivate::waitForFinished

(this=0x2315a60) at qdbuspendingcall.cpp:245

11 0x00007f9764014422 in QDBusPendingCallWatcher::waitForFinished

(this=) at qdbuspendingcall.cpp:531

12 0x00007f9765cececc in waitForCallFinished (mutex=0x231ca18,

watcher=) at /var/tmp/paludis/kde-base- kactivities-4.10.1/work/kactivities-4.10.1/src/lib/core/utils_p.h:96

13 KActivities::Consumer::listActivities (this=0x22465a0) at

/var/tmp/paludis/kde-base- kactivities-4.10.1/work/kactivities-4.10.1/src/lib/core/consumer.cpp:162

14 0x00000000004073f9 in fetchActivityList (controller=) at

/home/franz/src/kde/plasmoids/workflow/workflow- project/qdbus/WorkareaManager.cpp:83

15 0x000000000040be43 in QtConcurrent::StoredFunctorCall1<QStringList,

QStringList ()(KActivities::Controller), KActivities::Controller*>::runFunctor (this=0x23153b0) at /usr/include/qt4/QtCore/qtconcurrentstoredfunctioncall.h:267

16 0x000000000040befb in run (this=0x23153b0) at

/usr/include/qt4/QtCore/qtconcurrentrunbase.h:106

17 QtConcurrent::RunFunctionTask::run (this=0x23153b0) at

/usr/include/qt4/QtCore/qtconcurrentrunbase.h:97

18 0x00007f9763d51dda in QThreadPoolThread::run (this=0x2330ef0) at

concurrent/qthreadpool.cpp:107

19 0x00007f9763d5dbbc in QThreadPrivate::start (arg=0x2330ef0) at

thread/qthread_unix.cpp:338

20 0x00007f9763accec6 in start_thread () from /lib64/libpthread.so.0

21 0x00007f9762ffd6ed in clone () at

../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 1 (Thread 0x7f975e145780 (LWP 16868)):

0 0x00007f9763ad0dcc in pthread_cond_wait@@GLIBC_2.3.2 () from

/lib64/libpthread.so.0

1 0x00007f9763d5e13b in wait (time=18446744073709551615, this=0x2330e80) at

thread/qwaitcondition_unix.cpp:86

2 QWaitCondition::wait (this=, mutex=0x2330d88,

time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158

3 0x00007f9763d50e5e in QThreadPoolPrivate::waitForDone (this=0x2330d00,

msecs=-1) at concurrent/qthreadpool.cpp:298

4 0x00007f9763d51784 in QThreadPool::~QThreadPool (this=,

__in_chrg=) at concurrent/qthreadpool.cpp:440

5 0x00007f9763d517c9 in QThreadPool::~QThreadPool (this=0x2330ce0,

__in_chrg=) at concurrent/qthreadpool.cpp:442

6 0x00007f9763d52a05 in

QGlobalStaticDeleter::~QGlobalStaticDeleter (this=<optimized out>, __in_chrg=) at ../../include/QtCore/../../src/corelib/global/qglobal.h:1948

7 0x00007f9762f4d689 in __run_exit_handlers (status=1, listp=0x7f97632b55c8

<__exit_funcs>, run_list_atexit=true) at exit.c:78 #8 0x00007f9762f4d715 in __GI_exit (status=) at exit.c:100 #9 0x00007f97649b7f38 in qt_xio_errhandler () at kernel/qapplication_x11.cpp:772 #10 0x00007f97658d1438 in KApplication::xioErrhandler (this=0x217f9e0, dpy=0x21aeda0) at /var/tmp/paludis/kde-base-kdelibs-4.10.1- r1/work/kdelibs-4.10.1/kdeui/kernel/kapplication.cpp:419 #11 0x00007f9762e1d7ce in _XIOError (dpy=0x21aeda0) at /var/tmp/paludis/x11- libs-libX11-1.5.0-r1/work/libX11-1.5.0/src/XlibInt.c:1618 #12 0x00007f9762e1b25d in _XEventsQueued (dpy=0x21aeda0, mode=) at /var/tmp/paludis/x11-libs-libX11-1.5.0- r1/work/libX11-1.5.0/src/xcb_io.c:365 #13 0x00007f9762e0c86f in XEventsQueued (dpy=0x21aeda0, mode=2) at /var/tmp/paludis/x11-libs-libX11-1.5.0-r1/work/libX11-1.5.0/src/Pending.c:43 #14 0x00007f97649eecbc in x11EventSourceCheck (s=0x219bd70) at kernel/qguieventdispatcher_glib.cpp:85 #15 0x00007f97615661ac in g_main_context_check (context=0x219c100, max_priority=2147483647, fds=, n_fds=) at gmain.c:3169 #16 0x00007f9761566636 in g_main_context_iterate (dispatch=1, block=, context=0x219c100, self=) at gmain.c:3287 #17 g_main_context_iterate (context=0x219c100, block=, dispatch=1, self=) at gmain.c:3227 #18 0x00007f97615667c4 in g_main_context_iteration (context=0x219c100, may_block=1) at gmain.c:3351 #19 0x00007f9763e8a1ef in QEventDispatcherGlib::processEvents (this=0x2167490, flags=...) at kernel/qeventdispatcher_glib.cpp:424 #20 0x00007f97649eee7e in QGuiEventDispatcherGlib::processEvents (this=, flags=...) at kernel/qguieventdispatcher_glib.cpp:204 #21 0x00007f9763e5a6b2 in QEventLoop::processEvents (this=, flags=...) at kernel/qeventloop.cpp:149 #22 0x00007f9763e5a907 in QEventLoop::exec (this=0x7fffd9da7e30, flags=...) at kernel/qeventloop.cpp:204 #23 0x00007f9763e5f5f5 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1218 #24 0x0000000000406c90 in main (argc=1, argv=0x7fffd9da8068) at /home/franz/src/kde/plasmoids/workflow/workflow- project/qdbus/Application.cpp:107 > > kwin --replace. tail -f .xsession-errors > > is it correct? the dot after replace confuses me... :) > The dot simply marks the end of that sentence :P > I ran "kwin --replace" and it took quite some time to finish. So I opened a > terminal and watched .xsession-errors with "tail -f ~/.xsession-errors" - and > ran "kwin --replace" to see if something special happens ;)
psifidotos commented 11 years ago

Ok a new commit then...

I disabled asychronous call for workareamanagerd. It shouldnt crash now even though in my system doesnt crash at all...

Tell me what will happen with the messages you mentioned before about:

kwin(5370) KActivities::InfoPrivate::initializeCachedData: Locking mutex for name kwin(5370) KActivities::InfoPrivate::initializeCachedData: Locking mutex for icon

psifidotos commented 11 years ago

Oh... and please make a restart in order to activate the new workareamanagerd