Skip to content

Commit

Permalink
Merge pull request #133 from ZLLentz/fix_more_mesa
Browse files Browse the repository at this point in the history
FIX: pcds_conda, dev_conda: only set mesa if renderer is failing
  • Loading branch information
ZLLentz authored Oct 28, 2022
2 parents 13508fe + e29bbc4 commit b4036ec
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
13 changes: 8 additions & 5 deletions scripts/dev_conda
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,14 @@ source "${TOKEN_DIR}/typhos.sh"
# Revert to Software Raster when SSH to avoid issues with QtQuick.
# The same was done with PyDM and this fixes Designer and friends.
if [ -n "${SSH_CONNECTION}" ]; then
export QT_QUICK_BACKEND="software"
# On operator consoles over ssh for most users, opengl crashes unless this is set.
# This tells the GLX extension to use software rendering by way of the mesa library.
if [ -z "${__GLX_VENDOR_LIBRARY_NAME}" ]; then
export __GLX_VENDOR_LIBRARY_NAME="mesa"
export QT_QUICK_BACKEND="software"
# Check for errors in the opengl rendering
# Manually fall back to mesa library if we know there is a problem
if [ -x "$(command -v glxinfo)" ] && [ -z "${__GLX_VENDOR_LIBRARY_NAME}" ]; then
# Expecting either a segfault or exit code 1 if there is a problem
if ! { glxinfo -B; } > /dev/null 2>&1; then
export __GLX_VENDOR_LIBRARY_NAME="mesa"
fi
fi
fi

14 changes: 9 additions & 5 deletions scripts/pcds_conda
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,14 @@ source "${TOKEN_DIR}/typhos.sh"
# Revert to Software Raster when SSH to avoid issues with QtQuick.
# The same was done with PyDM and this fixes Designer and friends.
if [ -n "${SSH_CONNECTION}" ]; then
export QT_QUICK_BACKEND="software"
# On operator consoles over ssh for most users, opengl crashes unless this is set.
# This tells the GLX extension to use software rendering by way of the mesa library.
if [ -z "${__GLX_VENDOR_LIBRARY_NAME}" ]; then
export __GLX_VENDOR_LIBRARY_NAME="mesa"
export QT_QUICK_BACKEND="software"
# Check for errors in the opengl rendering
# Manually fall back to mesa library if we know there is a problem
if [ -x "$(command -v glxinfo)" ] && [ -z "${__GLX_VENDOR_LIBRARY_NAME}" ]; then
# Expecting either a segfault or exit code 1 if there is a problem
if ! { glxinfo -B; } > /dev/null 2>&1; then
export __GLX_VENDOR_LIBRARY_NAME="mesa"
fi
fi
fi

0 comments on commit b4036ec

Please sign in to comment.