VirtualBox

Changeset 75428 in vbox


Ignore:
Timestamp:
Nov 13, 2018 5:03:46 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
126579
Message:

Additions/linux/installer: only enable 3D for X.Org Server 1.19 or earlier.
bugref:9281: 3D acceleration reported broken on Ubuntu 18.10...
We previously tried to fix this by disabling 3D if Xwayland was found, except
for Ubuntu 18.04 where we wanted to keep 3D enabled. This was a bad idea
because EL7.6 has X.Org Server 1.20 without Wayland. So just do the simple
thing and enable 3D if an X server older than 1.20 is found, and only then.

Location:
trunk/src/VBox/Additions/linux/installer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/installer/vboxadd-x11.sh

    r70937 r75428  
    149149    stop && start
    150150    return 0
     151}
     152
     153setup_opengl()
     154{
     155    # Install the guest OpenGL drivers.  For now we don't support
     156    # multi-architecture installations
     157    rm -f /etc/ld.so.conf.d/00vboxvideo.conf
     158    rm -Rf /var/lib/VBoxGuestAdditions/lib
     159    if /usr/bin/VBoxClient --check3d 2>/dev/null; then
     160        mkdir -p /var/lib/VBoxGuestAdditions/lib
     161        ln -sf "${INSTALL_DIR}/lib/VBoxOGL.so" /var/lib/VBoxGuestAdditions/lib/libGL.so.1
     162        # SELinux for the OpenGL libraries, so that gdm can load them during the
     163        # acceleration support check.  This prevents an "Oh no, something has gone
     164        # wrong!" error when starting EL7 guests.
     165        if test -e /etc/selinux/config; then
     166            if command -v semanage > /dev/null; then
     167                semanage fcontext -a -t lib_t "/var/lib/VBoxGuestAdditions/lib/libGL.so.1"
     168            fi
     169            chcon -h  -t lib_t "/var/lib/VBoxGuestAdditions/lib/libGL.so.1"
     170        fi
     171        echo "/var/lib/VBoxGuestAdditions/lib" > /etc/ld.so.conf.d/00vboxvideo.conf
     172    fi
     173    ldconfig
    151174}
    152175
     
    456479        fail "Failed to set up VBoxClient to start automatically."
    457480    ln -s "${lib_dir}/98vboxadd-xclient" /usr/bin/VBoxClient-all 2>/dev/null
     481    case "${x_version}" in 4.* | 6.* | 7.* | 1.?.* | 1.1* )
     482        setup_opengl
     483    esac
    458484}
    459485
  • trunk/src/VBox/Additions/linux/installer/vboxadd.sh

    r75323 r75428  
    263263
    264264    # Put the X.Org driver in place.  This is harmless if it is not needed.
     265    # Also set up the OpenGL library.
    265266    myerr=`"${INSTALL_DIR}/init/vboxadd-x11" setup 2>&1`
    266267    test -z "${myerr}" || log "${myerr}"
    267     # Install the guest OpenGL drivers.  For now we don't support
    268     # multi-architecture installations
    269     rm -f /etc/ld.so.conf.d/00vboxvideo.conf
    270     rm -Rf /var/lib/VBoxGuestAdditions/lib
    271     if /usr/bin/VBoxClient --check3d 2>/dev/null; then
    272         setup_gl=true;
    273     else
    274         unset setup_gl
    275     fi
    276     # Disable 3D if Xwayland is found, except on Ubuntu 18.04.
    277     if type Xwayland >/dev/null 2>&1; then
    278         unset PRETTY_NAME
    279         . /etc/os-release 2>/dev/null
    280         case "${PRETTY_NAME}" in
    281             "Ubuntu 18.04"*) ;;
    282             *) unset setup_gl ;;
    283         esac
    284     fi
    285     if test -n "${setup_gl}"; then
    286         mkdir -p /var/lib/VBoxGuestAdditions/lib
    287         ln -sf "${INSTALL_DIR}/lib/VBoxOGL.so" /var/lib/VBoxGuestAdditions/lib/libGL.so.1
    288         # SELinux for the OpenGL libraries, so that gdm can load them during the
    289         # acceleration support check.  This prevents an "Oh no, something has gone
    290         # wrong!" error when starting EL7 guests.
    291         if test -e /etc/selinux/config; then
    292             if command -v semanage > /dev/null; then
    293                 semanage fcontext -a -t lib_t "/var/lib/VBoxGuestAdditions/lib/libGL.so.1"
    294             fi
    295             chcon -h  -t lib_t "/var/lib/VBoxGuestAdditions/lib/libGL.so.1"
    296         fi
    297         echo "/var/lib/VBoxGuestAdditions/lib" > /etc/ld.so.conf.d/00vboxvideo.conf
    298     fi
    299     ldconfig
    300268
    301269    # Mount all shared folders from /etc/fstab. Normally this is done by some
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette