How To Disable the "Window not responding" Dialog

6,362

Solution 1

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

Solution 2

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.

Solution 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

Solution 4

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.

Share:
6,362

Related videos on Youtube

kerner1000
Author by

kerner1000

Updated on September 18, 2022

Comments

  • kerner1000
    kerner1000 almost 2 years

    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.

  • Admin
    Admin over 4 years
    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?
  • Vaelus
    Vaelus over 4 years
    @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. gitlab.gnome.org/GNOME/mutter/-/merge_requests/1080
  • Sridhar Sarnobat
    Sridhar Sarnobat over 3 years
    I'm using Ubuntu 20 LTS and it's still an issue. (Installed: 3.36.4-1ubuntu1~20.04.2)