You are not logged in.

#1 2021-06-03 20:01:28

zash1958
Member
Registered: 2019-10-23
Posts: 11

qt.qpa.xcb: could not connect to display :0 - KDE - SOLVED

Hi,

after succesfully login to the KDE environment I cannot start any app. The app symbol shortly flashes but could not be started. No difference in starting QT or GTK apps.

Journalctl throws the following error(s). Any ideas for me? Or should I post another log?


Jun 03 21:41:56 hugin.phoenix-datentechnik.de kded5[1150]: org.kde.kcm_keyboard: Failed to run "/usr/bin/setxkbmap -layout de,ru,us" return code: 255
Jun 03 21:41:56 hugin.phoenix-datentechnik.de audit[1776]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=2 subj==unconfined pid=1776 comm="kcminit" exe="/usr/bin/kcminit" sig=6 res=1
Jun 03 21:41:56 hugin.phoenix-datentechnik.de kcminit[1776]: qt.qpa.xcb: could not connect to display :0
Jun 03 21:41:56 hugin.phoenix-datentechnik.de kcminit[1776]: qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
Jun 03 21:41:56 hugin.phoenix-datentechnik.de kcminit[1776]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
                                                             
                                                             Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
Jun 03 21:41:56 hugin.phoenix-datentechnik.de kded5[1150]: org.kde.kcm_keyboard: Failed to run "/usr/bin/setxkbmap -layout de,ru,us" return code: 255
Jun 03 21:41:56 hugin.phoenix-datentechnik.de audit: BPF prog-id=41 op=LOAD
Jun 03 21:41:56 hugin.phoenix-datentechnik.de audit: BPF prog-id=42 op=LOAD
Jun 03 21:41:56 hugin.phoenix-datentechnik.de audit: BPF prog-id=43 op=LOAD
Jun 03 21:41:56 hugin.phoenix-datentechnik.de audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-coredump@4-1777-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 03 21:41:56 hugin.phoenix-datentechnik.de systemd[1]: Started Process Core Dump (PID 1777/UID 0).
Jun 03 21:41:56 hugin.phoenix-datentechnik.de kded5[1150]: org.kde.kcm_keyboard: Failed to run "/usr/bin/setxkbmap -layout de,ru,us" return code: 255
Jun 03 21:41:56 hugin.phoenix-datentechnik.de systemd-coredump[1768]: Process 1763 (kcminit) of user 1000 dumped core.
                                                                      
                                                                      Stack trace of thread 1763:
                                                                      #0  0x00007f2777ae4d22 raise (libc.so.6 + 0x3cd22)
                                                                      #1  0x00007f2777ace862 abort (libc.so.6 + 0x26862)
                                                                      #2  0x00007f2776cba910 _ZNK14QMessageLogger5fatalEPKcz (libQt5Core.so.5 + 0x90910)
                                                                      #3  0x00007f27772b2175 _ZN22QGuiApplicationPrivate25createPlatformIntegrationEv (libQt5Gui.so.5 + 0x130175)
                                                                      #4  0x00007f27772b2681 _ZN22QGuiApplicationPrivate21createEventDispatcherEv (libQt5Gui.so.5 + 0x130681)
                                                                      #5  0x00007f2776ee9d27 _ZN23QCoreApplicationPrivate4initEv (libQt5Core.so.5 + 0x2bfd27)
                                                                      #6  0x00007f27772b5693 _ZN22QGuiApplicationPrivate4initEv (libQt5Gui.so.5 + 0x133693)
                                                                      #7  0x00007f27772b66b8 _ZN15QGuiApplicationC1ERiPPci (libQt5Gui.so.5 + 0x1346b8)
                                                                      #8  0x00007f2777c79898 kdemain (libkdeinit5_kcminit.so + 0x5898)
                                                                      #9  0x00007f2777acfb25 __libc_start_main (libc.so.6 + 0x27b25)
                                                                      #10 0x000055ed267b005e n/a (kcminit + 0x105e)
Jun 03 21:41:56 hugin.phoenix-datentechnik.de systemd[1]: systemd-coredump@2-1765-0.service: Deactivated successfully.
Jun 03 21:41:56 hugin.phoenix-datentechnik.de audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-coredump@2-1765-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 03 21:41:56 hugin.phoenix-datentechnik.de systemd-coredump[1772]: Process 1767 (kcminit) of user 1000 dumped core.
                                                                      
                                                                      Stack trace of thread 1767:
                                                                      #0  0x00007f418cfa9d22 raise (libc.so.6 + 0x3cd22)
                                                                      #1  0x00007f418cf93862 abort (libc.so.6 + 0x26862)
                                                                      #2  0x00007f418c17f910 _ZNK14QMessageLogger5fatalEPKcz (libQt5Core.so.5 + 0x90910)
                                                                      #3  0x00007f418c777175 _ZN22QGuiApplicationPrivate25createPlatformIntegrationEv (libQt5Gui.so.5 + 0x130175)
                                                                      #4  0x00007f418c777681 _ZN22QGuiApplicationPrivate21createEventDispatcherEv (libQt5Gui.so.5 + 0x130681)
                                                                      #5  0x00007f418c3aed27 _ZN23QCoreApplicationPrivate4initEv (libQt5Core.so.5 + 0x2bfd27)
                                                                      #6  0x00007f418c77a693 _ZN22QGuiApplicationPrivate4initEv (libQt5Gui.so.5 + 0x133693)
                                                                      #7  0x00007f418c77b6b8 _ZN15QGuiApplicationC1ERiPPci (libQt5Gui.so.5 + 0x1346b8)
                                                                      #8  0x00007f418d13e898 kdemain (libkdeinit5_kcminit.so + 0x5898)
                                                                      #9  0x00007f418cf94b25 __libc_start_main (libc.so.6 + 0x27b25)
                                                                      #10 0x00005560c687605e n/a (kcminit + 0x105e)
Jun 03 21:41:56 hugin.phoenix-datentechnik.de systemd[1]: systemd-coredump@3-1770-0.service: Deactivated successfully.
Jun 03 21:41:56 hugin.phoenix-datentechnik.de audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-coredump@3-1770-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 03 21:41:56 hugin.phoenix-datentechnik.de systemd-coredump[1779]: Process 1776 (kcminit) of user 1000 dumped core.
                                                                      
                                                                      Stack trace of thread 1776:
                                                                      #0  0x00007fc239f3ad22 raise (libc.so.6 + 0x3cd22)
                                                                      #1  0x00007fc239f24862 abort (libc.so.6 + 0x26862)
                                                                      #2  0x00007fc239110910 _ZNK14QMessageLogger5fatalEPKcz (libQt5Core.so.5 + 0x90910)
                                                                      #3  0x00007fc239708175 _ZN22QGuiApplicationPrivate25createPlatformIntegrationEv (libQt5Gui.so.5 + 0x130175)
                                                                      #4  0x00007fc239708681 _ZN22QGuiApplicationPrivate21createEventDispatcherEv (libQt5Gui.so.5 + 0x130681)
                                                                      #5  0x00007fc23933fd27 _ZN23QCoreApplicationPrivate4initEv (libQt5Core.so.5 + 0x2bfd27)
                                                                      #6  0x00007fc23970b693 _ZN22QGuiApplicationPrivate4initEv (libQt5Gui.so.5 + 0x133693)
                                                                      #7  0x00007fc23970c6b8 _ZN15QGuiApplicationC1ERiPPci (libQt5Gui.so.5 + 0x1346b8)
                                                                      #8  0x00007fc23a0cf898 kdemain (libkdeinit5_kcminit.so + 0x5898)
                                                                      #9  0x00007fc239f25b25 __libc_start_main (libc.so.6 + 0x27b25)
                                                                      #10 0x00005613b126105e n/a (kcminit + 0x105e)
Jun 03 21:41:56 hugin.phoenix-datentechnik.de systemd[1]: systemd-coredump@4-1777-0.service: Deactivated successfully.
Jun 03 21:41:56 hugin.phoenix-datentechnik.de audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-coredump@4-1777-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 03 21:41:56 hugin.phoenix-datentechnik.de audit: BPF prog-id=37 op=UNLOAD
Jun 03 21:41:56 hugin.phoenix-datentechnik.de audit: BPF prog-id=36 op=UNLOAD
Jun 03 21:41:56 hugin.phoenix-datentechnik.de audit: BPF prog-id=35 op=UNLOAD
Jun 03 21:41:56 hugin.phoenix-datentechnik.de audit: BPF prog-id=43 op=UNLOAD
Jun 03 21:41:56 hugin.phoenix-datentechnik.de audit: BPF prog-id=42 op=UNLOAD
Jun 03 21:41:56 hugin.phoenix-datentechnik.de audit: BPF prog-id=41 op=UNLOAD
Jun 03 21:41:56 hugin.phoenix-datentechnik.de audit: BPF prog-id=40 op=UNLOAD
Jun 03 21:41:56 hugin.phoenix-datentechnik.de audit: BPF prog-id=39 op=UNLOAD
Jun 03 21:41:56 hugin.phoenix-datentechnik.de audit: BPF prog-id=38 op=UNLOAD
Jun 03 21:42:00 hugin.phoenix-datentechnik.de systemd[1081]: Started Konsole - Terminal.
Jun 03 21:42:00 hugin.phoenix-datentechnik.de konsole[1790]: qt.qpa.xcb: could not connect to display :0
Jun 03 21:42:00 hugin.phoenix-datentechnik.de audit[1790]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=2 subj==unconfined pid=1790 comm="konsole" exe="/usr/bin/konsole" sig=6 res=1
Jun 03 21:42:00 hugin.phoenix-datentechnik.de konsole[1790]: qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
Jun 03 21:42:00 hugin.phoenix-datentechnik.de konsole[1790]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
                                                             
                                                             Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
Jun 03 21:42:00 hugin.phoenix-datentechnik.de audit: BPF prog-id=44 op=LOAD
Jun 03 21:42:00 hugin.phoenix-datentechnik.de audit: BPF prog-id=45 op=LOAD
Jun 03 21:42:00 hugin.phoenix-datentechnik.de audit: BPF prog-id=46 op=LOAD
Jun 03 21:42:00 hugin.phoenix-datentechnik.de systemd[1]: Started Process Core Dump (PID 1791/UID 0).
Jun 03 21:42:00 hugin.phoenix-datentechnik.de audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-coredump@5-1791-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 03 21:42:00 hugin.phoenix-datentechnik.de systemd-coredump[1792]: Process 1790 (konsole) of user 1000 dumped core.
                                                                      
                                                                      Stack trace of thread 1790:
                                                                      #0  0x00007f722a6b8d22 raise (libc.so.6 + 0x3cd22)
                                                                      #1  0x00007f722a6a2862 abort (libc.so.6 + 0x26862)
                                                                      #2  0x00007f722a8d8910 _ZNK14QMessageLogger5fatalEPKcz (libQt5Core.so.5 + 0x90910)
                                                                      #3  0x00007f722935c175 _ZN22QGuiApplicationPrivate25createPlatformIntegrationEv (libQt5Gui.so.5 + 0x130175)
                                                                      #4  0x00007f722935c681 _ZN22QGuiApplicationPrivate21createEventDispatcherEv (libQt5Gui.so.5 + 0x130681)
                                                                      #5  0x00007f722ab07d27 _ZN23QCoreApplicationPrivate4initEv (libQt5Core.so.5 + 0x2bfd27)
                                                                      #6  0x00007f722935f693 _ZN22QGuiApplicationPrivate4initEv (libQt5Gui.so.5 + 0x133693)
                                                                      #7  0x00007f7229a683ca _ZN19QApplicationPrivate4initEv (libQt5Widgets.so.5 + 0x1603ca)
                                                                      #8  0x00007f722ae6192b kdemain (libkdeinit5_konsole.so + 0x2692b)
                                                                      #9  0x00007f722a6a3b25 __libc_start_main (libc.so.6 + 0x27b25)
                                                                      #10 0x0000558b205ba05e n/a (konsole + 0x205e)
Jun 03 21:42:00 hugin.phoenix-datentechnik.de systemd[1]: systemd-coredump@5-1791-0.service: Deactivated successfully.
Jun 03 21:42:00 hugin.phoenix-datentechnik.de audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-coredump@5-1791-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 03 21:42:00 hugin.phoenix-datentechnik.de systemd[1081]: app-org.kde.konsole\x20\x282\x29-b332761868c84162a5bb28813e3151b4.scope: Deactivated successfully.
Jun 03 21:42:00 hugin.phoenix-datentechnik.de kwin_x11[1154]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 4846, resource id: 46137528, major code: 18 (ChangeProperty), minor code: 0
Jun 03 21:42:01 hugin.phoenix-datentechnik.de audit: BPF prog-id=46 op=UNLOAD
Jun 03 21:42:01 hugin.phoenix-datentechnik.de audit: BPF prog-id=45 op=UNLOAD
Jun 03 21:42:01 hugin.phoenix-datentechnik.de audit: BPF prog-id=44 op=UNLOAD
Jun 03 21:45:10 hugin.phoenix-datentechnik.de audit[1838]: USER_AUTH pid=1838 uid=1000 auid=1000 ses=4 subj==unconfined msg='op=PAM:authentication grantors=pam_unix acct="root" exe="/usr/bin/su" hostname=hugin.phoenix-datentechnik.de addr=? terminal=/dev/tty2 res=success'
Jun 03 21:45:10 hugin.phoenix-datentechnik.de audit[1838]: USER_ACCT pid=1838 uid=1000 auid=1000 ses=4 subj==unconfined msg='op=PAM:accounting grantors=pam_unix acct="root" exe="/usr/bin/su" hostname=hugin.phoenix-datentechnik.de addr=? terminal=/dev/tty2 res=success'
Jun 03 21:45:10 hugin.phoenix-datentechnik.de su[1838]: (to root) uherczeg on tty2
Jun 03 21:45:10 hugin.phoenix-datentechnik.de audit[1838]: CRED_ACQ pid=1838 uid=1000 auid=1000 ses=4 subj==unconfined msg='op=PAM:setcred grantors=pam_unix acct="root" exe="/usr/bin/su" hostname=hugin.phoenix-datentechnik.de addr=? terminal=/dev/tty2 res=success'
Jun 03 21:45:10 hugin.phoenix-datentechnik.de su[1838]: pam_unix(su:session): session opened for user root(uid=0) by uherczeg(uid=1000)
Jun 03 21:45:10 hugin.phoenix-datentechnik.de kernel: kauditd_printk_skb: 26 callbacks suppressed
Jun 03 21:45:10 hugin.phoenix-datentechnik.de kernel: audit: type=1100 audit(1622749510.701:226): pid=1838 uid=1000 auid=1000 ses=4 subj==unconfined msg='op=PAM:authentication grantors=pam_unix acct="root" exe="/usr/bin/su" hostname=hugin.phoenix-datentechnik.de addr=? terminal=/dev/tty2 res=success'
Jun 03 21:45:10 hugin.phoenix-datentechnik.de kernel: audit: type=1101 audit(1622749510.701:227): pid=1838 uid=1000 auid=1000 ses=4 subj==unconfined msg='op=PAM:accounting grantors=pam_unix acct="root" exe="/usr/bin/su" hostname=hugin.phoenix-datentechnik.de addr=? terminal=/dev/tty2 res=success'
Jun 03 21:45:10 hugin.phoenix-datentechnik.de kernel: audit: type=1103 audit(1622749510.701:228): pid=1838 uid=1000 auid=1000 ses=4 subj==unconfined msg='op=PAM:setcred grantors=pam_unix acct="root" exe="/usr/bin/su" hostname=hugin.phoenix-datentechnik.de addr=? terminal=/dev/tty2 res=success'
Jun 03 21:45:10 hugin.phoenix-datentechnik.de kernel: audit: type=1105 audit(1622749510.701:229): pid=1838 uid=1000 auid=1000 ses=4 subj==unconfined msg='op=PAM:session_open grantors=pam_unix acct="root" exe="/usr/bin/su" hostname=hugin.phoenix-datentechnik.de addr=? terminal=/dev/tty2 res=success'
Jun 03 21:45:10 hugin.phoenix-datentechnik.de audit[1838]: USER_START pid=1838 uid=1000 auid=1000 ses=4 subj==unconfined msg='op=PAM:session_open grantors=pam_unix acct="root" exe="/usr/bin/su" hostname=hugin.phoenix-datentechnik.de addr=? terminal=/dev/tty2 res=success'

Last edited by zash1958 (2021-06-04 10:11:50)

Offline

#2 2021-06-04 01:09:18

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,743

Re: qt.qpa.xcb: could not connect to display :0 - KDE - SOLVED

Is that actually a real hostname you've set or something that got automatically set on getting a network connection? What does your /etc/hosts and /etc/hostname look like? Have you seen https://wiki.archlinux.org/title/Networ … e_hostname ?

Other than that this log is only of your user session, post a full

sudo journalctl -b

so we get kernel/system service context.

Offline

#3 2021-06-04 09:16:38

zash1958
Member
Registered: 2019-10-23
Posts: 11

Re: qt.qpa.xcb: could not connect to display :0 - KDE - SOLVED

Hi,

looking on the "hostname" file lead me to the real cause of the problem:

Some more config files like "vconsole.conf / locale.conf  / hostname" were missing completely! No idea why. All was running proper until the update done on 2.6.2021 ???

Of course I have a daily backintime backup of all and so I restored /etc from the evening before and all is running without any prob again

If have absolutely no idea what can be happened on 2.6.2021

Problem solved

Last edited by zash1958 (2021-06-04 09:17:03)

Offline

#4 2021-06-04 09:35:49

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,743

Re: qt.qpa.xcb: could not connect to display :0 - KDE - SOLVED

All of these files are config files to be created by you that are not handled by any package from the repos, so this must've been something that ran there or that you did, Accidental rm with a space or so?

In any case glad to hear, please mark it as such by editing the title in the first post and prepending [SOLVED] (you might hit the title character limit in which case you might shorten it a bit)

Offline

#5 2021-07-26 06:22:41

aksh1618
Member
Registered: 2021-07-26
Posts: 2

Re: qt.qpa.xcb: could not connect to display :0 - KDE - SOLVED

I faced the same issue, after a system upgrade on my work machine.
TL;DR: /etc/hostname was missing/ got deleted. Fixed using

hostnamectl set-hostname myhostname
Background

(Posting all symptoms to make it easier for searches to pick this topic.)

- Launching any application

  No protocol specified
  No protocol specified
  qt.qpa.xcb: could not connect to display :0
  [1]  264207 segmentation fault (core dumped)  qterminal

- KDE screenlocker is broken

The screen locker is broken and unlocking is not possible anymore. In order to unlock switch to a virtual terminal (e.g. Ctrl+Alt+F2), log in and execute the command:

loginctl unlock-session 2

Afterwards switch back to the running session (Ctrl+Alt+F1).

- Hostname changing automatically (Noticed on switching to virtual terminal)

- sudoedit something

  _IceTransSocketUNIXConnect: Cannot connect to non-local host
  No protocol specified

- VPN not working

In the journal logs, I noticed the hostname service changing the hostname:

Jul 22 20:48:30 archlinux systemd[1]: Starting Hostname Service...
Jul 22 20:48:30 archlinux dbus-daemon[548]: [system] Successfully activated service 'org.freedesktop.hostname1'
Jul 22 20:48:30 archlinux systemd[1]: Started Hostname Service.
Jul 22 20:48:30 fa056004.companydomain.com audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-hostnamed comm="systemd" exe="/usr/lib/system>
Jul 22 20:48:30 fa056004.companydomain.com systemd-hostnamed[250334]: Hostname set to <fa056004.companydomain.com> (transient)
Jul 22 20:48:30 fa056004.companydomain.com kernel: audit: type=1130 audit(1626967110.660:407): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-hostnamed comm="s>

And luckily stumbled upon zash1958's comment on another topic and searched the forum by their username to land here.

Problem

I confirmed that /etc/hostname was missing. This happened after a system upgrade, I did not delete this manually. And I'm fairly sure that it existed, but unfortunately I can't confirm that because I did not have etckeeper setup on this machine.

Solution

Using any of the ways described in the wiki, set the hostname. I used:

# hostnamectl set-hostname myhostname

Offline

Board footer

Powered by FluxBB