Ubuntu – How to increase waiting time for non responding programs

configurationenvironment-variablesgnome

I have installed a Ubuntu GNOME and found that I am getting lots of PROGRAM is not responding messages.

I have either to "Force Quit" the program or "Wait" for it a little more.

I've noticed that each time I wait for the program, the program eventually continues without issues.

So, I think there might be a "timeout" configuration for programs to be considered non-responding and I want to increase this timeout.

Best Answer

It could not be configured, because the timeout value is defined as constant value in the mutter source. gnome-shell refers mutter library. I found the timeout value at the mutter source, mutter-3.10.4/src/core/display.c.

...
#define PING_TIMEOUT_DELAY 5000

And it's used by a below function named as meta_display_ping_window

ping_data->ping_timeout_id = g_timeout_add (PING_TIMEOUT_DELAY, meta_display_ping_timeout, ping_data);

It's referred from the function when the window is activated:

window_activate(mutter-3.10.4/src/core/window.c) -> meta_window_check_alive(mutter-3.10.4/src/core/delete.c) -> meta_display_ping_window(mutter-3.10.4/src/core/display.c)

As you can see at above, the timeout is 5 seconds.

You can modify the value just for you because mutter is open source project.

And the timeout value is referred another case when the window is closed. Window delete flow is as

meta_window_delete(mutter-3.10.4/src/core/delete.c) -> meta_window_check_alive(mutter-3.10.4/src/core/delete.c) -> meta_display_ping_window(mutter-3.10.4/src/core/display.c)

However, I think that you need to modify the source for your delayed window. Or I think that you can discuss about it with the mutter developers/maintainers.

You can prepare the build environment and get the source with following commands.

$ sudo apt-get build-dep mutter
$ sudo apt-get source mutter

To build it, Refer

https://www.debian.org/doc/manuals/apt-howto/ch-sourcehandling.en.html https://wiki.debian.org/BuildingTutorial