Telegram-desktop crashes "The X11 connection broke (error 2). Did the X11 server die?"

Suddenly telegram-desktop won’t start and crashes giving me this errors and warning:

(process:2961): Telegram-WARNING **: 16:48:10.605: Unfortunately, GTK integration conflicts with qgtk2 platformtheme and style. Therefore, QT_QPA_PLATFORMTHEME and QT_STYLE_OVERRIDE will be unset.
Telegram-Message: 16:48:10.606: This can be ignored by setting TDESKTOP_I_KNOW_ABOUT_GTK_INCOMPATIBILITY environment variable to any value, however, if qgtk2 theme or style is used, this will lead to a crash.
Telegram-Message: 16:48:10.606: GTK integration can be disabled by setting TDESKTOP_DISABLE_GTK_INTEGRATION to any value. Keep in mind that this will lead to clipboard issues and tdesktop will be unable to get settings from GTK (such as decoration layout, dark mode & more).

(process:2961): Telegram-WARNING **: 16:48:10.606: Application was built without embedded fonts, this may lead to font issues.
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Telegram-Message: 16:48:10.665: You can disable tray icon counter with TDESKTOP_DISABLE_TRAY_COUNTER and make it look better if it is monochrome.
error: : cannot open
error: : cannot open
error: : cannot open
The X11 connection broke (error 2). Did the X11 server die?

I tried reinstalling it and I’ve also tried the AUR telegram-desktop-bin package but with no success. What could be the problem?

Are you running with Wayland or X?

wayland

https://wiki.archlinux.org/index.php/Telegram#Wayland_support

https://wiki.archlinux.org/index.php/Wayland#Qt_5

1 Like

I have the same issue and error. I’m running Gnome, it worked up until the last update, I do have qt5-wayland installed as suggested, no joy. Seems to be tied to that last update somehow… The X11 server was part of it.

1 Like

Known bug, reported upstream:

tried to install qt5-wayland but didn’t work, just like @mlayland

OK, great. How about the things from the above post, or the other items in the linked wiki page which I quoted?

1 Like

Tried downgrading xorg-server-wayland and also tried to disable Telegram advanced/settings - Use System Window Frame, unfortunately problem still exists, I think I’ll wait for it to be sorted out upstream…

1 Like

Thank you for your thorough answer. I undestand it’s still an open bug and that there’s no permanent solution yet. For me $ QT_QPA_PLATFORM=wayland XCURSOR_SIZE=24 telegram-desktop does the trick, it launches telegram and then it works fine.
Do you suggest I revert to this commit?

1 Like

If setting those environment variables works for now then that’s all that is needed until it is fixed properly upstream.

I wouldn’t start recompiling X/Wayland just yet. :wink:

1 Like

I think I’ll wait for it to be sorted out upstream…

Do you have any updates on this matter? I’m still stuck with the same problem :frowning: