diff --git a/helpers/DATA/mate-session-manager/mate-wm b/helpers/DATA/mate-session-manager/mate-wm
index 3acb6e8a586af953522b10f716256deabd36da9e..7f8c5cb5160fbcb785c4d59b50555a68868c1d01 100755
--- a/helpers/DATA/mate-session-manager/mate-wm
+++ b/helpers/DATA/mate-session-manager/mate-wm
@@ -4,8 +4,15 @@ WINDOW_MANAGER=xterm
 [ -f /usr/bin/marco ] && WINDOW_MANAGER=marco
 [ -f /usr/bin/marco-no-composite ] && WINDOW_MANAGER=marco-no-composite
 
-if glxinfo | grep -q Accelerated.*yes  && [ -f /usr/bin/picom ] && [ -f /usr/bin/marco-xrender ] ; then
-    WINDOW_MANAGER=marco-xrender
+# Check for hardware acceleration
+if glxinfo -B | grep "OpenGL renderer string" | grep -qv llvmpipe ; then
+  WINDOW_MANAGER=marco
+  # Use marco-glx (picom) on non-intel gpu, if available
+  if glxinfo -B | grep -qiv vendor.*intel; then
+    if [ -f /usr/bin/picom ] && [ -f /usr/bin/marco-glx ] ; then
+      WINDOW_MANAGER=marco-glx
+    fi
+  fi
 fi
 
 gsettings set org.mate.session.required-components windowmanager $WINDOW_MANAGER
diff --git a/helpers/make-mate-session-manager b/helpers/make-mate-session-manager
index 84f0229b85bd2a715b72c5f465e3aaa625a03bf0..8e474a85225a9364356d56f02cec9da35432fd02 100644
--- a/helpers/make-mate-session-manager
+++ b/helpers/make-mate-session-manager
@@ -17,7 +17,7 @@
 #    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 #
 
-VERSION=6
+VERSION=7
 
 . ./config