You are not logged in.

#1 2018-05-05 17:28:27

Grifon
Member
Registered: 2018-05-05
Posts: 2

[SOLVED]KDE *Could not connect to display :0* after any net disconnect

Good evening, gentlemen.
I have encountered a problem I don't seem to be able to get around. Perhaps some of you might have a solution.

<TL;DR>
I use KDE/Plasma on vanilla Arch and every time I disconnect my LAN cable OR disconnect my WIFI, I get into this error state:
https://i.imgur.com/uKJTrN2.png

Trying to launch apps from terminal results in error: "qt.qpa.screen: QXcbConnection: Could not connect to display :0 Could not connect to any X display."

Trying to launch terminal from desktop results in error " KDEInit could not launch '/usr/bin/konsole' "

Temporary fix is to launch terminal before any net disconnect happens and as root write "hostname localhost". No other hostname string works (even localhost.localdomain, plz ignore I am seemingly incapable of typing, I retested this one many times :/), and after next internet disconnection, I get into that error state again.
</TL;DR>

More info:
Connecting to network (via RJ45 or WIFI) is completely fine. Also pulling out RJ45 without the other end being connected and shutting down my WIFI in WIFI-less area is completely fine. It is just INCREDIBLY irritating, when you are in low-wifi signal area, lose connection for few seconds now and then and then have to "hostname localhost" again to be able even to properly shutdown the computer.

This problem does not seem to occur on different environments, Plasma is just so pleasant to use (besides this issue).
This problem does not occur even on Wayland version of Plasma, but there is completely different problem, where 3 "random" keys on my keyboard launch Konqueror on each push instead of actually typing the character. I did not change any settings, no key bindings, Plasma (wayland) just presented itself to me that way.

This problem cannot be solved by reinstalling the system, because I had this setup installed before with exactly these problems on both versions of Plasma. Harddisk in this laptop was painfully slow, so i upgraded to some cheap SSD (brand new, problems prevail)

HOWEVER, I did not encounter these problems the first day or so after the installation of a system, which I guess means it was triggered by something. I have no idea by what tho.

I spent quite a lot of time trying to figure it out myself, but I am no Linux expert, so all I was capable of doing was to read through forums of people having similar problems. First thing I found was that "hostname localhost" trick, but it fixes it just temporary.

After that I tried removed all widgets from desktop, as someone pointed out, some of them have its own connection port open, which might have caused the problem, however it did not help.

Enabling or disabling netctl has no impact.
Disabling SDDM and enabling different Display Manager has no impact.

If any of you had any idea, i would be insanely grateful, thanks for any help :)

Last edited by Grifon (2018-05-05 18:02:25)

Offline

#2 2018-05-05 17:32:40

loqs
Member
Registered: 2014-03-06
Posts: 18,859

Re: [SOLVED]KDE *Could not connect to display :0* after any net disconnect

Welcome to the arch linux forums Grifon.  Installation_guide#Hostname.  localhost is not considered a valid hostname.

Offline

#3 2018-05-05 17:45:14

Grifon
Member
Registered: 2018-05-05
Posts: 2

Re: [SOLVED]KDE *Could not connect to display :0* after any net disconnect

Following the guide has solved my problems, thanks a lot for your time, you saved me smile

Offline

#4 2018-05-05 17:59:33

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,104

Re: [SOLVED]KDE *Could not connect to display :0* after any net disconnect

Please mark the topic as [SOLVED] by editing the subject in your initial post.

Offline

Board footer

Powered by FluxBB