Discussion:
Stale image on X11 server after lost connection
José Tomás Tocino García
2021-04-06 12:05:26 UTC
Permalink
I'm sorry for the late reply. I've realized I made a mistake in the initial
post, the server is actually running motif windows manager.

The output of xlsclients is:

# xlsclients -al
Window 0x60005b:
Machine: localhost.localdomain
Name: mwm
Icon Name: mwm
Command: /usr/bin/mwm
Instance/Class: mwm/Mwm

The output of xwininfo is:

# xwininfo -root -tree

xwininfo: Window id: 0xde (the root window) (has no name)

Root window id: 0xde (the root window) (has no name)
Parent window id: 0x0 (none)
13 children:
0x600088 (has no name): () 800x600+0+0 +0+0
1 child:
0x600089 (has no name): () 800x600+0+0 +0+0
1 child:
0x800005 "CTM - tc3": (" CTM " " CTM ") 800x600+0+0 +0+0
0x60008a (has no name): () 62x79+0+0 +0+0
0x800007 (has no name): () 1x1+0+0 +0+0
0x800003 (has no name): () 3x3+0+0 +0+0
0x60005e (has no name): () 5x5+0+0 +0+0
1 child:
0x60005f (has no name): () 117x153+0+0 +0+0
0xa00001 (has no name): () 10x10+-20+-20 +-20+-20
0x60005b "mwm": ("mwm" "Mwm") 10x10+10000+0 +10000+0
0x600055 (has no name): () 5x5+0+0 +0+0
1 child:
0x600056 (has no name): () 84x175+0+0 +0+0
0x600054 (has no name): () 1x1+0+0 +0+0
0x600023 (has no name): () 10x10+-100+-100 +-100+-100
0x600015 (has no name): () 10x10+10000+10000 +10000+10000
1 child:
0x600016 (has no name): () 10x10+0+0 +10000+10000
0x600007 (has no name): () 1x1+0+0 +0+0
0x600006 "mwm": ("mwm" "Mwm") 1x1+0+0 +0+0

Where " CTM " is an executable running in a separate computer on the same
network, showing its content on the local X server using "export
DISPLAY=...". When that machine dies, the screen does not go black, instead
the last image of the CTM executable stays on screen.

Then if I try to do a netstat, I can see that the TCP connections from the
machine (that is now powered off) are still ESTABLISHED.

I guess there should be a way of activating a KEEPALIVE mechanism on the
connection to the Xorg, but I'm not quite sure how to do that. The
application is using Qt by the way, if it matters.

Regards.
On Wed, Feb 17, 2021 at 05:13:45PM +0100, Jos?? Tom??s Tocino Garc??a
Hello.
I have an xorg server running in a Linux box with no wm, and a
separate
machine running an application exporting to the X server in the first
machine.
The problem arises when the connection is lost between the two
machines or
the application exporting the display fails. The X111 server keeps a
stale
image on screen that is obviously unresponsive. I'd rather it turn
black
the moment the connection is lost.
Is there a way of forcing the X server to stop showing that stale
image
when the connection is lost? Not sure if it has something to do with
it
not having a wm.
Thanks!
Regards.
This looks rather strange. Usually connection failures
closes tcp socket, then windows, created by the
app should be destroyed be the server.
What does xlsclients -al and xwininfo -root -tree show
before and after failure?
Does the client still connected? Does it's window(s) still exists?
--
Jose Tomas Tocino
http://josetomastocino.com
http://cadizenmoto.com
_______________________________________________
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s
_______________________________________________
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s
--
José Tomás Tocino
http://josetomastocino.com
http://cadizenmoto.com
Chris Sorenson
2021-04-08 03:45:51 UTC
Permalink
Re: Stale image on X11 server after lost connection
Message: 1
Date: Tue, 6 Apr 2021 14:05:26 +0200
From: Jos? Tom?s Tocino Garc?a
Subject: Re: Stale image on X11 server after lost connection
I'm sorry for the late reply. I've realized I made a mistake in the initial
post, the server is actually running motif windows manager.
# xlsclients -al
Machine: localhost.localdomain
Name: mwm
Icon Name: mwm
Command: /usr/bin/mwm
Instance/Class: mwm/Mwm
Give this a try: Right click the desktop, the root menu should popup, select "Restart..."


_______________________________________________
***@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s
José Tomás Tocino García
2021-04-08 08:37:55 UTC
Permalink
I'm afraid the machine with the X11 server has no mouse or keyboard
attached to it, so I cannot "right click" it. It's something like a kiosk.
Post by José Tomás Tocino García
Re: Stale image on X11 server after lost connection
Message: 1
Date: Tue, 6 Apr 2021 14:05:26 +0200
From: Jos? Tom?s Tocino Garc?a
Subject: Re: Stale image on X11 server after lost connection
I'm sorry for the late reply. I've realized I made a mistake in the
initial
post, the server is actually running motif windows manager.
# xlsclients -al
Machine: localhost.localdomain
Name: mwm
Icon Name: mwm
Command: /usr/bin/mwm
Instance/Class: mwm/Mwm
Give this a try: Right click the desktop, the root menu should popup, select "Restart..."
_______________________________________________
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s
--
José Tomás Tocino
http://josetomastocino.com
http://cadizenmoto.com
Ilya Anfimov
2021-04-08 08:49:48 UTC
Permalink
Post by José Tomás Tocino García
I'm afraid the machine with the X11 server has no mouse or keyboard
attached to it, so I cannot "right click" it. It's something like a kiosk.
Anyway: usually the server is launched by some display manager,
or sometimes by the xinit command invocation from some script.

In either case it launches something like Xsession script with
clients run from it, and waits until that script finishes, then
stops or restarts the server.

Probably, there are mwm window manager invocation as the last
command of that Xsession script, that runs mwm and the mwm runs
forever.
You can change it to run mwm in background, and make the last
command some kind of a watchdog, that checks the server for your
application and exits when cannot find it -- making the server
to exit when your app exits.

In any case, extensive scripting could solve many problems.
Post by José Tomás Tocino García
Re: Stale image on X11 server after lost connection
Message: 1
Date: Tue, 6 Apr 2021 14:05:26 +0200
From: Jos? Tom?s Tocino Garc?a
Subject: Re: Stale image on X11 server after lost connection
I'm sorry for the late reply. I've realized I made a mistake in the
initial
post, the server is actually running motif windows manager.
# xlsclients -al
Machine: localhost.localdomain
Name: mwm
Icon Name: mwm
Command: /usr/bin/mwm
Instance/Class: mwm/Mwm
Give this a try: Right click the desktop, the root menu should popup,
select "Restart..."
_______________________________________________
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s
--
Jose Tomas Tocino
http://josetomastocino.com
http://cadizenmoto.com
_______________________________________________
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s
_______________________________________________
***@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

Loading...