41

When debugging UI programs, I see frequently the "Wait or force quit" Dialog.

This is super annoying, since this dialog blocks basically everything. The whole graphical system is not usable anymore until I select one of the options.

I would like to disable this completely or at least have an option to ignore this window.

kerner1000
  • 4,230

5 Answers5

34

In versions of mutter ≥ 3.35.92, you can set the timeout used to check if a window is still alive. This is also useful for X-forwarding over ssh with high latency. For example, you can set the timeout to 60 s (60000 ms) using:

gsettings set org.gnome.mutter check-alive-timeout 60000
Vaelus
  • 693
  • I am not able to make changes to this setting. Probably due to version 3.28.4. But my computer says it has latest version installed. Any ideas? –  Mar 12 '20 at 15:01
  • @AniketSahrawat it looks like this change was introduced just 2 weeks ago at the time of writing, unless you're on a bleeding edge distro, it will probably take a while for the right version to trickle down to you. It looks like version 3.35.92 was the first with the change. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1080 – Vaelus Mar 12 '20 at 15:49
6

This is a known issue. See "Program" is not responding when debugging in gdb.

Judging from the other bug report <something> is not responding window is constantly showing when debugging a program, which appears to be related, the problem seems to be fixed in gnome-shell version 3.28.4.

Run apt-cache policy gnome-shell to know your installed version.

If you are using an old version, try to upgrade your Ubuntu18 by running:

sudo apt update
sudo apt dist-upgrade

However, this issue remains opened for gdb debugging.

As an alternative, delay "Window not responding" Dialog could be a good solution. How to increase waiting time for non responding programs? relates to this, but I couldn't find details on how to do it.

Eliah Kagan
  • 117,780
pymym213
  • 521
  • 4
  • 11
3

A simpler workaround if update and patch not possible or inconvenient.

  • Create a wrapper script in HOME folder with same name zenity. (Check $PATH, for exact ~/.../bin location).
  • Filter out calls with mutter-dialog or specific argument by checking parameters.
  • Pass all other calls to original zenity (/usr/bin/zenity $@)

Reference: RH bug: Annoying zenity "forced quit" or "wait" pop up for everything while prelink/compiling/loaded

user.dz
  • 48,105
1

One way to achieve this is to change how long time a window is allowed to be "not responding" before the dialog is shown. The code that handles this is in the libmutter-4-0 library, where the time is hard-coded to 5 seconds. Beware that the following is kind of a hack, not very elegant, but it does work. (And I had some fun doing it!)

We can get the source code for the libmutter-4-0 package like this:

apt-get source libmutter-4-0

which gives a directory called mutter-3.32.2+git20190711. Go inside that directory:

cd mutter-3.32.2+git20190711

Then make a change in the file src/core/display.c on the line that looks like this:

#define PING_TIMEOUT_DELAY 5000

That means it will wait 5000 milliseconds before showing the "not responding" dialog. Change it to something much larger, I used 5000000 which corresponds to 5000 seconds:

#define PING_TIMEOUT_DELAY 5000000

Having made that change, we want to build the modified library. To do that, first configure like this:

meson _build

(at that point there may be errors due to missing dependencies, just install what is missing using sudo apt install and try meson _build again)

Then build:

ninja -C _build

After that, the new library file is in ./_build/src/libmutter-4.so.0.0.0 -- now all we need to do is to install it:

sudo install ./_build/src/libmutter-4.so.0.0.0 /usr/lib/x86_64-linux-gnu/

and then reboot to make sure the window manager is restarted using the new library file. After reboot, the "not responding" dialog should be effectively disabled (strictly speaking it may still show up eventually, depending on what PING_TIMEOUT_DELAY value you used).

If you want to revert this change and reinstall the original library file, that can be done using sudo apt reinstall libmutter-4-0.

Elias
  • 2,039
0

I tried to run gsettings set org.gnome.mutter check-alive-timeout 60000 as in Vaelus' answer. It didn't work. I used dconf to check the check-alive-timeout value and it's still the default 5000.

So I manually changed this value in dconf to 60000. This time it works.

Therefore:

  • Open dconf (you can open it with command dconf-editor)
  • Select org menu, and inside it select gnome, then select mutter
  • Change the check-time-out value to 60000, which denotes waiting 60000 milliseconds until popping up the force-quit or wait window.
  • Thanks for suggesting this! The check-time-out description states that "Using 0 will disable the alive check completely." Therefore, maybe setting check-time-out to 0 would solve the original poster's problem? I haven't checked this myself but it may be worth a try. – KBurchfiel Feb 28 '24 at 13:55