Possible Yast issue affecting slow applications startup, hostname configuration

Hi, I just want to post this thread in the event this helps somebody else when they google for the same issue.
I also wanted to report it in the OpenSuse bugzilla, but I found it impossible to create an account (I only find a login option, not register?), so perhaps somebody else can verify this and eventually open a bug.
**
Background**:
a few days ago I installed OpenSuse for the first time (coming from other distros), so I had my first discovery of Yast.
Not being an expert on all those configurations, one of the things I disliked was that my PC hostname is localhost.localdomain, so I wanted to change it if it was easy. I opened the Hostnames configuration in Yast, I probably opened the Edit window of 127.0.0.1, had the feeling that I didn’t really know what I was doing, so I believe I closed it without changing anything (perhaps clicking OK?). I am not 100% sure of the actions I performed in the last sentence, but going by memory that’s what I did. Anyway, I didn’t think much of this since I believed that nothing was changed.

Environment:
OpenSuse Tumbleweed
KDE Plasma 5.19.5
Kernel 5.8.7-1-default
GPU: Intel UHD 620

Issue:
since yesterday I noticed that suddenly opening any application was taking 5-10 seconds. For example Konsole, Kcalc, Dolphin, or Kate. Restarting or updating the system did not help. This issue was not there the day before (when the distro was installed).

Analysis:
Checking the journald log I noticed that this error was recurring when launching any application:
Qt: Session management error: Could not open network socket
I googled for a while and I couldn’t find much, until I came on the following reddit thread: https://www.reddit.com/r/openSUSE/comments/hxgort/programs_slow_to_launch_on_fresh_install_of/
Then I remembered that I had checked the Hostnames menu in Yast, so I looked whether something was wrong there.
Previously I had also launched the command hostnamectl and saw this line in the output: Transient hostname: localhost.localdomain
In Yast I found that for address 127.0.0.1 the hostname was just: localhost
So I tried changing it to: localhost.localdomain
As soon as that was saved, opening any applications was back to normal and the issue was solved.
**
Possible Yast issue
:
Is it possible that Yast changed the configured hostname without any actual change from me, apart from clicking the OK button in the edit window?
I have seen similar issues in other software: just opening an edit window loads some preconfigured string which is different from the actual value, and if you click OK it gets saved.
Can somebody try this on a fresh installation or any installation where the Hostnames menu in Yast was never opened?

I hope this helps somebody.

The account and password that you used to login to this forum should work.

Issue:
since yesterday I noticed that suddenly opening any application was taking 5-10 seconds. For example Konsole, Kcalc, Dolphin, or Kate. Restarting or updating the system did not help. This issue was not there the day before (when the distro was installed).

When that happens, try running “top” at a terminal (konsole). There might be a looping process that is eating up much of the processor time.

Before:

localhost:~ # hostname
localhost.localdomain
localhost:~ # 

After invoking “yast2 host”, selecting entry 127.0.0.1 and clicking “No” and then clicking “Quit”:

localhost:~ # hostname
linux.fritz.box
localhost:~ # 
localhost:~ # hostnamectl
**   Static hostname: n/a
Transient hostname: linux.fritz.box**
         Icon name: computer-desktop
           Chassis: desktop
        Machine ID: b650d066970b487eaffea649babf596a
           Boot ID: 5ba336e74f9941b98f66cf1e333cb3a2
  Operating System: openSUSE Tumbleweed
       CPE OS Name: cpe:/o:opensuse:tumbleweed:20200908
            Kernel: Linux 5.8.4-1-default
      Architecture: x86-64
localhost:~ # 

I made it a habit to always click “Cancel” instead of “Quit”.:wink:

After rebooting:

localhost:~ # hostname
localhost.localdomain
localhost:~ # 

Actually no changes have been made to /etc/hosts:

localhost:~ # ll /etc/hosts
** -rw-r--r-- 1 root root 684 Aug  6 08:06 /etc/hosts**
localhost:~ # cat /etc/hosts
#
# hosts         This file describes a number of hostname-to-address
#               mappings for the TCP/IP subsystem.  It is mostly
#               used at boot time, when no name servers are running.
#               On small systems, this file can be used instead of a
#               "named" name server.
# Syntax:
#    
# IP-Address  Full-Qualified-Hostname  Short-Hostname
#

127.0.0.1       localhost

# special IPv6 addresses
::1             localhost ipv6-localhost ipv6-loopback

fe00::0         ipv6-localnet

ff00::0         ipv6-mcastprefix
ff02::1         ipv6-allnodes
ff02::2         ipv6-allrouters
ff02::3         ipv6-allhosts

192.168.178.2 erlangen.fritz.box erlangen
localhost:~ # 

All applications startup without noticeable delay.

Even if you change your hostname like I did, it should not have any influence on startup times of applications.

Well, I can replicate the delayed application startup anytime by changing the hostname back.

Post your /etc/hosts. Open a root shell and watch journal:

erlangen:~ # journalctl -f
-- Logs begin at Fri 2020-07-24 22:15:05 CEST. --
Sep 13 07:56:59 erlangen akonadiserver[1699]: org.kde.pim.akonadiserver.search: Search  "searchUpdate-1599976619" done (without remote search)
Sep 13 07:56:59 erlangen akonadiserver[1699]: org.kde.pim.akonadiserver.search: Search update for collection "DeclinedInvitations" ( 57 ) finished: all results:  0 , removed results: 0
Sep 13 07:56:59 erlangen akonadiserver[1699]: org.kde.pim.akonadiserver.search: Executing search "searchUpdate-1599976619"
Sep 13 07:56:59 erlangen akonadiserver[1699]: org.kde.pim.akonadiserver.search: Search  "searchUpdate-1599976619" done (without remote search)
Sep 13 07:56:59 erlangen akonadiserver[1699]: org.kde.pim.akonadiserver.search: Search update for collection "Letzte Suche" ( 856 ) finished: all results:  32 , removed results: 0
Sep 13 07:56:59 erlangen akonadiserver[1699]: org.kde.pim.akonadiserver.search: Executing search "searchUpdate-1599976619"
Sep 13 07:56:59 erlangen akonadiserver[1699]: org.kde.pim.akonadiserver.search: Search  "searchUpdate-1599976619" done (without remote search)
Sep 13 07:56:59 erlangen akonadiserver[1699]: org.kde.pim.akonadiserver.search: Search update for collection "OpenInvitations" ( 56 ) finished: all results:  0 , removed results: 0
Sep 13 07:57:04 erlangen rtkit-daemon[1706]: Supervising 8 threads of 6 processes of 2 users.
Sep 13 07:57:04 erlangen rtkit-daemon[1706]: Supervising 8 threads of 6 processes of 2 users.
....
Sep 13 07:59:42 erlangen plasmashell[1641]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/main.qml:454: TypeError: Cannot read property 'length' of undefined
Sep 13 07:59:42 erlangen plasmashell[1641]: file:///usr/lib64/qt5/qml/QtQuick/Controls/Styles/Plasma/BusyIndicatorStyle.qml:39:9: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
Sep 13 07:59:42 erlangen plasmashell[1641]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:285:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
Sep 13 07:59:42 erlangen plasmashell[1641]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:375: Unable to assign [undefined] to QString
Sep 13 07:59:42 erlangen kwin_x11[1588]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 40246, resource id: 35652030, major code: 18 (ChangeProperty), minor code: 0
Sep 13 07:59:42 erlangen systemd[1464]: Started apps-org.opensuse.yast-afe069095a57408186737389dc7f0ec9.scope.
Sep 13 07:59:42 erlangen plasmashell[1641]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:375: Unable to assign [undefined] to QString
Sep 13 07:59:43 erlangen plasmashell[1641]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:285:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
Sep 13 07:59:43 erlangen plasmashell[1641]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/main.qml:454: TypeError: Cannot read property 'length' of undefined
Sep 13 07:59:43 erlangen plasmashell[1641]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:285:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }

Invoke an application and post the lines from journal.