I can’t reproduce this error on my Ubuntu 22.04 (nvidia drivers). I have tried both latest stable and preview (are you running on Wayland?). I would think the best candidate for this problem is a dependent package missing :
-
Make sure you have all the dependencies required for Slicer installed (Getting Started — 3D Slicer documentation)
-
If this does not work, I would suggest that you install the packages we normally use for development (this may pull whatever dependency is missing (GNU/Linux systems — 3D Slicer documentation), this is a difference between my Ubuntu 22.04 and a fresh install:
sudo apt update && sudo apt install git subversion build-essential cmake cmake-curses-gui cmake-qt-gui \
qtmultimedia5-dev qttools5-dev libqt5xmlpatterns5-dev libqt5svg5-dev qtwebengine5-dev qtscript5-dev \
qtbase5-private-dev libqt5x11extras5-dev libxt-dev libssl-dev
-
If none of these works. You can scan through (Can't start latest stable on ubuntu 20.04 - #18 by manjula), which was a long discussion around xcb-related problems. Perhaps some of the answer could be useful.
-
If none of this works, I could try to reproduce this in a fresh installation.
Let us know how this goes.