You are not logged in.

#1 2018-07-26 19:19:54

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 290
Website

[Solved] X server randomly stops accepting new connections

I'm running Plasma/KDE on X. (Wayland does not have this problem; it has other problems so it's not an alternative at this time).

After running the session just fine for some hours, new applications / windows suddenly fail to open. For example, right now:

% firefox
No protocol specified
Unable to init server: Could not connect: Connection refused
Error: cannot open display: :0

Other apps produce basically the same error message.

What's going on here?

P.S. Just before hitting Submit, I came across this surprising twist: The machine is connected via Ethernet. The built-in WiFi does not connect for some reason (about to post a separate issue on that) but an additional USB-WiFi dongle connects just fine (separate IP address). The twist: the X error message changes depending on whether the dongle is inserted or not:

With dongle: the above error message.

Without dongle (yes, this is the formatting of the error):

Invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Could not connect: Connection refused
Error: cannot open display: :0

Ideas?

The X server is indirectly started by sddm.service. ps says its command-line is "/usr/lib/Xorg -nolisten tcp -auth /var/run/sddm/{xxx} -backgroud none -noreset -displayfd 18 -seat seat0 vt1". If I interpret "-nolisten tcp" as it sounds, how does IP networking aka the dongle even play a role in this?

Last edited by jernst (2018-08-04 04:17:45)

Offline

#2 2018-07-26 19:23:20

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: [Solved] X server randomly stops accepting new connections

What is the output of `hostnamectl` and `cat /etc/hostname`?  Are you using NetworkManager?  Do you make networking changes around the time programs stop launching?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2018-07-26 19:28:29

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 290
Website

Re: [Solved] X server randomly stops accepting new connections

I'm not making any network changes, my network should be behaved as well, except for the dongle experiment. However, it turns out I don't have an /etc/hostname! (no idea why)

hostname produces "archlinux".

hostnamectl says I have a transient hostname "archlinux" but not a static hostname.

Ok, I will set /etc/hostname and see what happens.

Offline

#4 2018-07-26 20:28:36

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: [Solved] X server randomly stops accepting new connections


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2018-08-04 04:17:33

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 290
Website

Re: [Solved] X server randomly stops accepting new connections

It hasn't re-occurred, so I assume setting the hostname fixed it. I'm unclear why a non-network windowing system would depend on the hostname, but then, in the great scheme of things, this does not matter very much.

Offline

#6 2018-08-04 13:33:25

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: [Solved] X server randomly stops accepting new connections

X11 is designed from the start as a client-server system.  The fact that you run the clients and the server on the same machine is - essentially - coincidence.  The hostname is still used in the communication between them so they know which machine to send messages to.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB