Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI freezes after grid maximum #47

Closed
BasNottrot opened this issue Oct 21, 2019 · 20 comments
Closed

UI freezes after grid maximum #47

BasNottrot opened this issue Oct 21, 2019 · 20 comments
Labels

Comments

@BasNottrot
Copy link

BasNottrot commented Oct 21, 2019

I am using Ubuntu 19.04 with KDE Plasma and my UI freezes after opening an application when the grid is full. Mouse is still working, but everything else is frozen, causing me to reboot.

Steps to reproduce:

  1. Open Kwin Grid Tiling settings
  2. Set rows to 2
  3. Set columns to 2
  4. Relog
  5. Open 4 Konsole's
  6. Open a 5th one
  7. Freeze

Expected behaviour:
The 5th application either open as a floating window so the grid will stay the same or the grid expands and 5th application opens in the grid.

Workaround:
Increase the rows and columns to a size where I am sure I won't reach the maximum.

@lingtjien lingtjien added the bug label Oct 21, 2019
@lingtjien
Copy link
Owner

lingtjien commented Oct 21, 2019

It seems to only happen when I use exactly 1 virtual desktop interesting... Do you use 1 virtual desktop?

I'll get to it :)

@BasNottrot
Copy link
Author

Yes, I use only 1 desktop :)

@lingtjien
Copy link
Owner

Give the dev branch a try

@BasNottrot
Copy link
Author

BasNottrot commented Oct 21, 2019

I switched to develop branch and tried again, still freezes unfortunately. Did I have to do anything else apart from switching branches?

I also upgraded to Ubuntu 19.10 and KDE Plasma 5.17, not sure if that makes any difference?

@lingtjien
Copy link
Owner

maybe a stupid question but... you did pull the latest changes, right? line 552 in contents/code/main.js should read if (++i >= Converter.size()) {i = 0;}

@BasNottrot
Copy link
Author

You made me doubt there for a second, but yes, I pulled the changes and that line is present on 552 ;P

@lingtjien
Copy link
Owner

lingtjien commented Oct 21, 2019

just making sure :)

did you only pull and change to dev branch or also a reboot? (The script is only loaded at startup by KWin by default) Oh and depending on the install method you used you may have to reinstall it.

@BasNottrot
Copy link
Author

I also rebooted, but the issue still persists.

@lingtjien
Copy link
Owner

Hmm interesting, if ./local/share/kwin/scripts/grid-tiling/contents/code/main.js contains the correct code (on 552) and you rebooted then you should have the right code so I guess that means there's a bug somewhere else that I haven't been able to reproduce...

What settings are you using for the script and could you try with the default settings?

If I execute these steps now:

  1. set default settings and amount of virtual desktops to 1
  2. reboot
  3. start 4 konsole windows
  4. start 5th konsole

result

it doesn't freeze anymore but floats the 5th window as expected

If these steps still give you the freeze then could you try this for me:

  1. open krunner type wm console and Open KWin interactive console
  2. click open and find the main.js file and open it in this console
  3. insert these lines:
  • 542 under var i = start; add this line var counter = 0;
  • 552 under if (++i >= Converter.Size()) {i = 0;} add this line if (counter > 100) {print('should not get here'); return -1;}
  1. click Plasma and then click KWin and then click Execute
  2. open 4 instances of konsole
  3. open the 5th instance of konsole

@BasNottrot
Copy link
Author

You talk about setting the amount of desktops, but I can't figure out where in the settings I can specify this? Maybe that causes my issue, because I only have 1 screen?

@lingtjien
Copy link
Owner

virtual desktops allow you to have multiple desktops even though you only have 1 physical screen. KWin provides a bunch of global shortcuts to switch between these virtual desktops which you can find in the global shortcuts section KWin there is a global shortcut in there called Show Desktop Grid which will show you all your virtual desktops at once.

Nevertheless, the script should not freeze regardless of how many virtual desktops you have and I could only reproduce your case when I had a single virtual desktop, so that I fixed and tested on my system and worked...

If the problem still persists I'll have to reproduce your issue first and in order to single out the problem, I'd like us to have the same configuration file to eliminate this as a variable. So there is a small button in the left bottom corner of the UI of this script which resets the configuration to default values, click that and then ok then a reboot and see if the problem persists.

@BasNottrot
Copy link
Author

BasNottrot commented Oct 23, 2019

  1. I tried with default settings and 1 desktop, my screen still freezes.

  2. I tried with Kwin Console and I got an notification that KWin had crashed, details:

Application: KWin (kwin_x11), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f856576f880 (LWP 1851))]

Thread 6 (Thread 0x7f84c7655700 (LWP 2416)):
#0  0x00007f856a47a2c6 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x557748dd6630) at ../sysdeps/unix/sysv/linux/futex-internal.h:80
#1  0x00007f856a47a2c6 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x557748dd65e0, cond=0x557748dd6608) at pthread_cond_wait.c:508
#2  0x00007f856a47a2c6 in __pthread_cond_wait (cond=0x557748dd6608, mutex=0x557748dd65e0) at pthread_cond_wait.c:638
#3  0x00007f856af0adef in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f856af0aee1 in QWaitCondition::wait(QMutex*, unsigned long) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f8569fa27b9 in  () at /lib/x86_64-linux-gnu/libQt5Quick.so.5
#6  0x00007f8569fa2a1a in  () at /lib/x86_64-linux-gnu/libQt5Quick.so.5
#7  0x00007f856af04cc2 in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f856a473669 in start_thread (arg=<optimized out>) at pthread_create.c:479
#9  0x00007f856c668323 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 5 (Thread 0x7f855d66d700 (LWP 2415)):
#0  0x00007f856c65bd26 in __GI_ppoll (fds=0x7f855002a018, nfds=1, timeout=<optimized out>, sigmask=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:39
#1  0x00007f856b11f5f9 in qt_safe_poll(pollfd*, unsigned long, timespec const*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007f856b120b64 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007f856b0ca63b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f856af03a75 in QThread::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f8569c14319 in  () at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#6  0x00007f856af04cc2 in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f856a473669 in start_thread (arg=<optimized out>) at pthread_create.c:479
#8  0x00007f856c668323 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7f854f9ff700 (LWP 1961)):
#0  0x00007f856a47a2c6 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7f856aaccfb8) at ../sysdeps/unix/sysv/linux/futex-internal.h:80
#1  0x00007f856a47a2c6 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7f856aaccf68, cond=0x7f856aaccf90) at pthread_cond_wait.c:508
#2  0x00007f856a47a2c6 in __pthread_cond_wait (cond=0x7f856aaccf90, mutex=0x7f856aaccf68) at pthread_cond_wait.c:638
#3  0x00007f856a9d608a in  () at /lib/x86_64-linux-gnu/libQt5Script.so.5
#4  0x00007f856a9d60af in  () at /lib/x86_64-linux-gnu/libQt5Script.so.5
#5  0x00007f856a473669 in start_thread (arg=<optimized out>) at pthread_create.c:479
#6  0x00007f856c668323 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7f855cc99700 (LWP 1953)):
#0  0x00007f856c65bd26 in __GI_ppoll (fds=0x7f8554000d68, nfds=1, timeout=<optimized out>, sigmask=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:39
#1  0x00007f856b11f5f9 in qt_safe_poll(pollfd*, unsigned long, timespec const*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007f856b120b64 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007f856b0ca63b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f856af03a75 in QThread::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f8569c14319 in  () at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#6  0x00007f856af04cc2 in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f856a473669 in start_thread (arg=<optimized out>) at pthread_create.c:479
#8  0x00007f856c668323 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f855e87e700 (LWP 1914)):
#0  0x00007f856c65bd26 in __GI_ppoll (fds=0x7f855800a878, nfds=1, timeout=<optimized out>, sigmask=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:39
#1  0x00007f856b11f5f9 in qt_safe_poll(pollfd*, unsigned long, timespec const*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007f856b120b64 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007f856b0ca63b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f856af03a75 in QThread::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f856959fefa in  () at /lib/x86_64-linux-gnu/libQt5DBus.so.5
#6  0x00007f856af04cc2 in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f856a473669 in start_thread (arg=<optimized out>) at pthread_create.c:479
#8  0x00007f856c668323 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f856576f880 (LWP 1851)):
[KCrash Handler]
#6  0x00007f856c3346a3 in KWin::Workspace::clientArea(KWin::clientAreaOption, int, int) const () at /lib/x86_64-linux-gnu/libkwin.so.5
#7  0x00007f856c4822a8 in  () at /lib/x86_64-linux-gnu/libkwin.so.5
#8  0x00007f856c48a353 in  () at /lib/x86_64-linux-gnu/libkwin.so.5
#9  0x00007f856c48a379 in  () at /lib/x86_64-linux-gnu/libkwin.so.5
#10 0x00007f856aa4a1d3 in  () at /lib/x86_64-linux-gnu/libQt5Script.so.5
#11 0x00007f856aa43fad in  () at /lib/x86_64-linux-gnu/libQt5Script.so.5
#12 0x00007f856aa448a3 in  () at /lib/x86_64-linux-gnu/libQt5Script.so.5
#13 0x00007f856aa44a92 in  () at /lib/x86_64-linux-gnu/libQt5Script.so.5
#14 0x00007f856a94821d in  () at /lib/x86_64-linux-gnu/libQt5Script.so.5
#15 0x00007f856a91af9d in  () at /lib/x86_64-linux-gnu/libQt5Script.so.5
#16 0x00007f84cf16226f in  ()
#17 0x0000000000000028 in  ()
#18 0x00007f84cec8d800 in  ()
#19 0x00007f8400000018 in  ()
#20 0x00007f8400000004 in  ()
#21 0x00007f8400000003 in  ()
#22 0x00007f8500000010 in  ()
#23 0x0000000000000009 in  ()
#24 0x00007f856b0de8da in QMetaType::type(QByteArray const&) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00005577488cfc98 in  ()
#26 0x00007f854f102738 in  ()
#27 0x00007f856a8d0616 in  () at /lib/x86_64-linux-gnu/libQt5Script.so.5
#28 0x00007f856a972e21 in  () at /lib/x86_64-linux-gnu/libQt5Script.so.5
#29 0x00007f856aa41548 in  () at /lib/x86_64-linux-gnu/libQt5Script.so.5
#30 0x00007f856aa49b89 in  () at /lib/x86_64-linux-gnu/libQt5Script.so.5
#31 0x00007f856b0f752c in QMetaObject::activate(QObject*, int, int, void**) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#32 0x00007f856c472b86 in  () at /lib/x86_64-linux-gnu/libkwin.so.5
#33 0x00007f856b0f75c8 in QMetaObject::activate(QObject*, int, int, void**) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#34 0x00007f856c4767e6 in KWin::Workspace::clientActivated(KWin::AbstractClient*) () at /lib/x86_64-linux-gnu/libkwin.so.5
#35 0x00007f856c2bdbad in KWin::Workspace::setActiveClient(KWin::AbstractClient*) () at /lib/x86_64-linux-gnu/libkwin.so.5
#36 0x00007f856c2b20f0 in KWin::AbstractClient::setActive(bool) () at /lib/x86_64-linux-gnu/libkwin.so.5
#37 0x00007f856c32e187 in KWin::Client::focusInEvent(xcb_focus_in_event_t*) () at /lib/x86_64-linux-gnu/libkwin.so.5
#38 0x00007f856c32fa8b in KWin::Client::windowEvent(xcb_generic_event_t*) () at /lib/x86_64-linux-gnu/libkwin.so.5
#39 0x00007f856c3303c6 in KWin::Workspace::workspaceEvent(xcb_generic_event_t*) () at /lib/x86_64-linux-gnu/libkwin.so.5
#40 0x00007f856b0c8eef in QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#41 0x00007f8565089855 in QXcbConnection::handleXcbEvent(xcb_generic_event_t*) () at /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#42 0x00007f856508a82a in QXcbConnection::processXcbEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#43 0x00007f85650b5650 in  () at /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#44 0x00007f856b0ca63b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#45 0x00007f856b0d23a6 in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#46 0x00007f856c741528 in kdemain () at /lib/x86_64-linux-gnu/libkdeinit5_kwin_x11.so
#47 0x00007f856c56d1e3 in __libc_start_main (main=0x557746d66060, argc=3, argv=0x7ffe48e398a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe48e39898) at ../csu/libc-start.c:308
#48 0x0000557746d6609e in _start ()
[Inferior 1 (process 1851) detached]
  1. I tried with 2 virtual desktops, when I started adding konsole's from the first (I guess main) desktop, after 4 tiles it switches to the 2nd desktop and starts adding tiles there. Then when the second screen is full, it open the new tiles on top in the second screen. So this works as expected.

  2. I tried with 2 virtual desktops, when I started adding konsole's from the second (I guess not the main) desktop, after 4 tiles it switches to the 1st desktop and starts adding tiles there. Then when this sreen is full and I try to open a new one, my laptop freezes again. So the issue only happens on the main screen.

@lingtjien
Copy link
Owner

I tried with Kwin Console and I got an notification that KWin had crashed, details:
Executable: kwin_x11 PID: 1.851 Signal: Segmentation fault (11) Time: 23-10-2019 11:08:21

I've never been able to crash KWin using the scripting interface...

@BasNottrot
Copy link
Author

Seems like an issue with KWin, maybe it has something to do with my NVidia GPU, that thing always causes issues with Linux

@lingtjien
Copy link
Owner

I also did notice a few weird bugs lately since one of the latest updates, that sometimes KWin resets itself or something and reloads the entire script... that never caused a crash though

I also just tried your 4th case and it works fine for me...

@BasNottrot
Copy link
Author

I am currently filing an bug report with KWin

@lingtjien
Copy link
Owner

lingtjien commented Oct 23, 2019

maybe you could try with an integrated graphics processor, see if that works? I'm just shooting in the dark at this point :)

@BasNottrot
Copy link
Author

I am not sure what an integrated graphics processor is?

@lingtjien
Copy link
Owner

oh some CPU have an integrated graphics unit, like most intel processors (intel UHD630 for example) I believe or the AMD G series such as Ryzen 3200G or 3400G

@BasNottrot
Copy link
Author

BasNottrot commented Oct 23, 2019

I will close the issue, because the issue is not related to the script, thanks for the help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants