Bug#884192: libqt5gui5: X startup hang due to glxinfo in Xsession.d/90qt5-opengl
Package: libqt5gui5
Version: 5.7.1+dfsg-3+b1
Severity: normal
Hello,
There is some sort of race condition in glxinfo (package mesa-utils)
which sometimes causes it to hang during X startup. Consequently
sometimes /etc/X11/Xsession.d/90qt5-opengl hangs. And so X sometimes
hangs on startup after login.
When X does hang, killing the glxinfo process solves the problem. The
X session hang resolves and X starts.
(At bottom is a 90qt5-opengl with some commented out code which
disables the glxinfo call and prevents the problem from occurring.)
Because the purpose of the problem code is to detect the OpenGL
version, and the older versions are no longer used (OpenGL version <
2), an easy fix would be to delete the offending code. In this case
this means removing the entire 90qt5-opengl file since it is no longer
necessary.
Note that my configuration is an X terminal; the glxinfo call is on
the X client. This may have somethig to do with why glxinfo hangs.
-- System Information:
Debian Release: 9.3
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.9.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages libqt5gui5 depends on:
ii fontconfig 2.11.0-6.7+b1
ii libc6 2.24-11+deb9u1
ii libdrm2 2.4.74-1
ii libegl1-mesa [libegl1-x11] 13.0.6-1+b2
ii libfontconfig1 2.11.0-6.7+b1
ii libfreetype6 2.6.3-3.2
ii libgbm1 13.0.6-1+b2
ii libgcc1 1:6.3.0-18
ii libgl1-mesa-glx [libgl1] 13.0.6-1+b2
ii libglib2.0-0 2.50.3-2
ii libharfbuzz0b 1.4.2-1
ii libice6 2:1.0.9-2
ii libinput10 1.6.3-1
ii libjpeg62-turbo 1:1.5.1-2
ii libmtdev1 1.1.5-1+b1
ii libpng16-16 1.6.28-1
ii libqt5core5a [qtbase-abi-5-7-1] 5.7.1+dfsg-3+b1
ii libqt5dbus5 5.7.1+dfsg-3+b1
ii libqt5network5 5.7.1+dfsg-3+b1
ii libsm6 2:1.2.2-1+b3
ii libstdc++6 6.3.0-18
ii libudev1 232-25+deb9u1
ii libx11-6 2:1.6.4-3
ii libx11-xcb1 2:1.6.4-3
ii libxcb-glx0 1.12-1
ii libxcb-icccm4 0.4.1-1
ii libxcb-image0 0.4.0-1+b2
ii libxcb-keysyms1 0.4.0-1+b2
ii libxcb-randr0 1.12-1
ii libxcb-render-util0 0.3.9-1
ii libxcb-render0 1.12-1
ii libxcb-shape0 1.12-1
ii libxcb-shm0 1.12-1
ii libxcb-sync1 1.12-1
ii libxcb-xfixes0 1.12-1
ii libxcb-xinerama0 1.12-1
ii libxcb-xkb1 1.12-1
ii libxcb1 1.12-1
ii libxi6 2:1.7.9-1
ii libxkbcommon-x11-0 0.7.1-2~deb9u1
ii libxkbcommon0 0.7.1-2~deb9u1
ii zlib1g 1:1.2.8.dfsg-5
Versions of packages libqt5gui5 recommends:
ii libqt5svg5 5.7.1~20161021-2+b2
ii mesa-utils 8.3.0-3
ii qt5-gtk-platformtheme 5.7.1+dfsg-3+b1
Versions of packages libqt5gui5 suggests:
pn qt5-image-formats-plugins <none>
pn qtwayland5 <none>
-- Configuration Files:
/etc/X11/Xsession.d/90qt5-opengl changed:
if [ "$(which glxinfo)" = "" ] ; then
echo "To detect whether software based rendering is needed for Qt 5 the glxinfo program is a requirement but it was not found on this system."
echo "On Debian (based) systems, install the mesa-utils package."
#echo "On RedHat (based) systems, install the glx-utils package."
else
# Temporary hack to make X terminal work.
OPENGL_VERSION=`LANG=C glxinfo | grep '^OpenGL version string: ' | head -n 1 | sed -e 's/^OpenGL version string: \([0-9]\).*$/\1/g'`
if [ -n "$OPENGL_VERSION" ] && [ "$OPENGL_VERSION" -lt 2 ]; then
QT_XCB_FORCE_SOFTWARE_OPENGL=1
export QT_XCB_FORCE_SOFTWARE_OPENGL
elif [ -n "$OPENGL_VERSION" ] ; then
echo "OpenGL version: $OPENGL_VERSION."
else
echo "OpenGL version not found."
fi
fi
-- no debconf information
Reply to: