Skip to content

Commit edc00ae

Browse files
committed
Document VGL_CHROMEHACK/Chrome+MATLAB app recipes
Refer to #264, #265, #279
1 parent b0180f7 commit edc00ae

4 files changed

Lines changed: 83 additions & 19 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ else()
1010
project(VirtualGL)
1111
endif()
1212
string(TOLOWER ${CMAKE_PROJECT_NAME} CMAKE_PROJECT_NAME_LC)
13-
set(VERSION 3.1.3)
14-
set(DOCVERSION 3.1.3)
13+
set(VERSION 3.1.4)
14+
set(DOCVERSION 3.1.4)
1515

1616
macro(boolean_number var)
1717
if(${var})

ChangeLog.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
3.1.4
2+
=====
3+
4+
### Significant changes relative to 3.1.3:
5+
6+
1. The VirtualGL Faker now includes an optional workaround for an interaction
7+
issue with the X visual selection mechanism in Chrome/Chromium v129 and later
8+
and MATLAB R2025a and later. Refer to the "Other Application Recipes" chapter
9+
in the VirtualGL User's Guide for more information.
10+
11+
112
3.1.3
213
=====
314

doc/apprecipes.txt

Lines changed: 46 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,35 @@
103103
rather than a separate process for 3D rendering, which prevents it from \
104104
complaining about the X11 function calls that the VirtualGL Faker makes. \
105105
The ''--use-gl=egl'' option forces Chrome/Chromium to use desktop OpenGL \
106-
rather than ANGLE, which works around an issue whereby, when using ANGLE, \
107-
Chrome/Chromium assumes that every X visual has an EGL framebuffer \
108-
configuration associated with it. \
106+
rather than ANGLE, which works around the X visual selection issue \
107+
described below. \
108+
|
109+
| Google Chrome/Chromium | v129 and later | Linux \
110+
| Set the ''VGL_CHROMEHACK'' environment variable to ''1'', then launch the \
111+
application with \
112+
{nl}{nl} \
113+
''vglrun google-chrome --in-process-gpu''{nl} \
114+
or{nl} \
115+
''vglrun chromium --in-process-gpu'' \
116+
| Chrome uses ANGLE, an OpenGL ES emulator that translates OpenGL ES \
117+
function calls into OpenGL, OpenGL ES, or Vulkan function calls. When \
118+
using ANGLE's OpenGL back end, Chrome chooses an X visual by sending raw \
119+
GLX requests to the 2D X server, bypassing VirtualGL. Thus, the X visual \
120+
it chooses has rendering attributes that are only relevant for the 2D X \
121+
server's OpenGL implementation. Chrome then expects to find a GLX or EGL \
122+
framebuffer configuration to which the chosen X visual is assigned. That \
123+
will normally never happen when using VirtualGL. ''VGL_CHROMEHACK'' \
124+
works around this issue by emulating Chrome's X visual selection \
125+
mechanism and assigning the chosen visual to all GLX and EGL framebuffer \
126+
configurations that have an 8-bit alpha channel. \
109127
{nl}{nl} \
110-
As of this writing, there are no known workarounds that allow Chrome v129 \
111-
and later to be used with VirtualGL. |
128+
When using nVidia's proprietary Vulkan driver, which does something \
129+
VirtualGL-like in an X proxy environment, or when using an X proxy that \
130+
implements the DRI3 X extension, you can also enable GPU acceleration by \
131+
passing ''--use-angle=vulkan'' to ''google-chrome'' or ''chromium''. No \
132+
additional arguments or environment variables are necessary in this case, \
133+
nor is it necessary to launch the application with ''vglrun''. \
134+
|
112135
| Compiz | All | Linux \
113136
| Set the ''VGL_WM'' environment variable to ''1'' prior to launching the \
114137
window manager with ''vglrun'', or pass an argument of ''+wm'' to \
@@ -176,9 +199,25 @@
176199
environment. More specifically, it will always enable software OpenGL \
177200
if the X server has an X extension called ''VNC-EXTENSION'', which is \
178201
the case with TurboVNC, TigerVNC, and RealVNC. \
202+
|
203+
| MATLAB | R2025a and later | Linux \
204+
| Set the ''VGL_CHROMEHACK'' environment variable to ''1'', then launch the \
205+
application with \
206+
{nl}{nl} \
207+
{pcode: vglrun /usr/local/MATLAB/__version__/bin/matlab \\}{nl} \
208+
'' -nosoftwareopengl'' \
209+
| MATLAB R2025a and later use the Chromium Embedded Framework (CEF), so \
210+
''VGL_CHROMEHACK'' is necessary to work around Chrome's X visual \
211+
selection mechanism. (Refer to the application recipe for Chrome v129 \
212+
and later.) \
179213
{nl}{nl} \
180-
MATLAB R2025a and later use Vulkan rather than OpenGL, so it is not \
181-
possible to use VirtualGL with these releases. \
214+
When using nVidia's proprietary Vulkan driver, which does something \
215+
VirtualGL-like in an X proxy environment, or when using an X proxy that \
216+
implements the DRI3 X extension, you can also enable GPU acceleration by \
217+
setting the ''MW_CEF_STARTUP_OPTIONS'' environment variable to \
218+
''--use-angle=vulkan'' prior to launching MATLAB. No additional \
219+
arguments or environment variables are necessary in this case, nor is it \
220+
necessary to launch the application with ''vglrun''. \
182221
|
183222
| PyTorch | All | Linux \
184223
| {pcode: vglrun -ld __path-to-PyTorch-libs__ __application__}{nl} \

doc/index.html

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<head>
44
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
55
<meta name="language" content="en">
6-
<meta name="date" content="2025-06-12T11:00:51">
6+
<meta name="date" content="2025-07-01T12:15:57">
77
<meta name="generator" content="deplate.rb 0.8.5">
8-
<title>User&rsquo;s Guide for VirtualGL 3.1.3</title>
8+
<title>User&rsquo;s Guide for VirtualGL 3.1.4</title>
99
<link rel="start" href="index.html" title="Frontpage">
1010
<link rel="chapter" href="index.html#hd001" title="1 Legal Information">
1111
<link rel="chapter" href="index.html#hd002" title="2 Conventions Used in This Document">
@@ -30,7 +30,7 @@
3030
<body >
3131
<a name="#pagetop"></a>
3232
<div class="title">
33-
<p class="title">User&rsquo;s Guide for VirtualGL 3.1.3</p>
33+
<p class="title">User&rsquo;s Guide for VirtualGL 3.1.4</p>
3434
</div>
3535
<a name="file000"></a>
3636
<p><em>Intended audience:</em> System Administrators, Graphics Programmers,
@@ -746,7 +746,7 @@ <h2 id="hd005001">5.1&nbsp;Installing VirtualGL on Linux</h2>
746746
packages are provided for Linux distributions that contain GLIBC 2.17 or
747747
later. <br />
748748
<div class="important"><p class="important">
749-
If you want to run both 32-bit and 64-bit OpenGL applications with VirtualGL on 64-bit x86 Linux systems, then you will need to install both <strong class="filename">VirtualGL-3.1.3.x86_64.rpm</strong> and <strong class="filename">VirtualGL-3.1.3.i386.rpm</strong>, or both <strong class="filename">virtualgl_3.1.3_amd64.deb</strong> and <strong class="filename">virtualgl32_3.1.3_amd64.deb</strong>. (<strong class="filename">virtualgl32_3.1.3_amd64.deb</strong> is a supplementary package that contains only the 32-bit server components.)
749+
If you want to run both 32-bit and 64-bit OpenGL applications with VirtualGL on 64-bit x86 Linux systems, then you will need to install both <strong class="filename">VirtualGL-3.1.4.x86_64.rpm</strong> and <strong class="filename">VirtualGL-3.1.4.i386.rpm</strong>, or both <strong class="filename">virtualgl_3.1.4_amd64.deb</strong> and <strong class="filename">virtualgl32_3.1.4_amd64.deb</strong>. (<strong class="filename">virtualgl32_3.1.4_amd64.deb</strong> is a supplementary package that contains only the 32-bit server components.)
750750
</p></div>
751751
</li>
752752
<li class="Ordered-1 Ordered" value="2">
@@ -804,15 +804,15 @@ <h2 id="hd005002">5.2&nbsp;Installing the VirtualGL Client on OS X/macOS</h2>
804804
<ol class="Ordered numeric">
805805
<li class="Ordered-1 Ordered">
806806
Download the VirtualGL Mac disk image
807-
(<strong class="filename">VirtualGL-3.1.3.dmg</strong>) from the
807+
(<strong class="filename">VirtualGL-3.1.4.dmg</strong>) from the
808808
<span class="remote"><a href="https://github.com/VirtualGL/virtualgl/releases" class="remote">Releases
809809
area</a></span><a name="idx0017"></a> of the
810810
<span class="remote"><a href="https://github.com/VirtualGL/virtualgl" class="remote">VirtualGL
811811
GitHub project page</a></span><a name="idx0018"></a>.
812812
</li>
813813
<li class="Ordered-1 Ordered">
814814
Open the disk image, then open
815-
<strong class="filename">VirtualGL-3.1.3.pkg</strong> inside the disk
815+
<strong class="filename">VirtualGL-3.1.4.pkg</strong> inside the disk
816816
image. Follow the instructions to install the Mac VirtualGL Client.
817817
</li>
818818
</ol>
@@ -829,12 +829,12 @@ <h2 id="hd005004">5.4&nbsp;Installing VirtualGL from Source</h2>
829829

830830
<p>If you are using a platform for which there is not a pre-built VirtualGL
831831
binary package available, then download the VirtualGL source tarball
832-
(<strong class="filename">VirtualGL-3.1.3.tar.gz</strong>) from the
832+
(<strong class="filename">VirtualGL-3.1.4.tar.gz</strong>) from the
833833
<span class="remote"><a href="https://github.com/VirtualGL/virtualgl/releases" class="remote">Releases
834834
area</a></span><a name="idx0019"></a> of the
835835
<span class="remote"><a href="https://github.com/VirtualGL/virtualgl" class="remote">VirtualGL
836836
GitHub project page</a></span><a name="idx0020"></a>, uncompress it,
837-
<code>cd VirtualGL-3.1.3</code>, and read the contents of
837+
<code>cd VirtualGL-3.1.4</code>, and read the contents of
838838
<strong class="filename">BUILDING.md</strong> for further instructions
839839
on how to build and install VirtualGL from source.</p>
840840

@@ -2131,7 +2131,14 @@ <h1 id="hd0014"><a name="file014"></a>14&nbsp;Other Application Recipes</h1>
21312131
<td class="standard">v85 through v128</td>
21322132
<td class="standard">Linux</td>
21332133
<td class="standard"><code>vglrun&nbsp;google-chrome&nbsp;--in-process-gpu&nbsp;--use-gl=egl</code><br /> or<br /> <code>vglrun&nbsp;chromium&nbsp;--in-process-gpu&nbsp;--use-gl=egl</code></td>
2134-
<td class="standard">The <code>--in-process-gpu</code> option causes Chrome/Chromium to use a thread rather than a separate process for 3D rendering, which prevents it from complaining about the X11 function calls that the VirtualGL Faker makes. The <code>--use-gl=egl</code> option forces Chrome/Chromium to use desktop OpenGL rather than ANGLE, which works around an issue whereby, when using ANGLE, Chrome/Chromium assumes that every X visual has an EGL framebuffer configuration associated with it. <br /><br /> As of this writing, there are no known workarounds that allow Chrome v129 and later to be used with VirtualGL.</td>
2134+
<td class="standard">The <code>--in-process-gpu</code> option causes Chrome/Chromium to use a thread rather than a separate process for 3D rendering, which prevents it from complaining about the X11 function calls that the VirtualGL Faker makes. The <code>--use-gl=egl</code> option forces Chrome/Chromium to use desktop OpenGL rather than ANGLE, which works around the X visual selection issue described below.</td>
2135+
</tr>
2136+
<tr class="standard">
2137+
<td class="standard">Google Chrome/Chromium</td>
2138+
<td class="standard">v129 and later</td>
2139+
<td class="standard">Linux</td>
2140+
<td class="standard">Set the <code>VGL_CHROMEHACK</code> environment variable to <code>1</code>, then launch the application with <br /><br /> <code>vglrun&nbsp;google-chrome&nbsp;--in-process-gpu</code><br /> or<br /> <code>vglrun&nbsp;chromium&nbsp;--in-process-gpu</code></td>
2141+
<td class="standard">Chrome uses ANGLE, an OpenGL ES emulator that translates OpenGL ES function calls into OpenGL, OpenGL ES, or Vulkan function calls. When using ANGLE&rsquo;s OpenGL back end, Chrome chooses an X visual by sending raw GLX requests to the 2D X server, bypassing VirtualGL. Thus, the X visual it chooses has rendering attributes that are only relevant for the 2D X server&rsquo;s OpenGL implementation. Chrome then expects to find a GLX or EGL framebuffer configuration to which the chosen X visual is assigned. That will normally never happen when using VirtualGL. <code>VGL_CHROMEHACK</code> works around this issue by emulating Chrome&rsquo;s X visual selection mechanism and assigning the chosen visual to all GLX and EGL framebuffer configurations that have an 8-bit alpha channel. <br /><br /> When using nVidia&rsquo;s proprietary Vulkan driver, which does something VirtualGL-like in an X proxy environment, or when using an X proxy that implements the DRI3 X extension, you can also enable GPU acceleration by passing <code>--use-angle=vulkan</code> to <code>google-chrome</code> or <code>chromium</code>. No additional arguments or environment variables are necessary in this case, nor is it necessary to launch the application with <code>vglrun</code>.</td>
21352142
</tr>
21362143
<tr class="standard">
21372144
<td class="standard">Compiz</td>
@@ -2187,7 +2194,14 @@ <h1 id="hd0014"><a name="file014"></a>14&nbsp;Other Application Recipes</h1>
21872194
<td class="standard">R2024b and earlier</td>
21882195
<td class="standard">Linux</td>
21892196
<td class="standard"><code>vglrun /usr/local/MATLAB/<em>version</em>/bin/matlab \</code><br /> <code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-nosoftwareopengl</code></td>
2190-
<td class="standard">MATLAB will automatically use its built-in (unaccelerated) OpenGL implementation if it detects that it is running in a remote display environment. More specifically, it will always enable software OpenGL if the X server has an X extension called <code>VNC-EXTENSION</code>, which is the case with TurboVNC, TigerVNC, and RealVNC. <br /><br /> MATLAB R2025a and later use Vulkan rather than OpenGL, so it is not possible to use VirtualGL with these releases.</td>
2197+
<td class="standard">MATLAB will automatically use its built-in (unaccelerated) OpenGL implementation if it detects that it is running in a remote display environment. More specifically, it will always enable software OpenGL if the X server has an X extension called <code>VNC-EXTENSION</code>, which is the case with TurboVNC, TigerVNC, and RealVNC.</td>
2198+
</tr>
2199+
<tr class="standard">
2200+
<td class="standard">MATLAB</td>
2201+
<td class="standard">R2025a and later</td>
2202+
<td class="standard">Linux</td>
2203+
<td class="standard">Set the <code>VGL_CHROMEHACK</code> environment variable to <code>1</code>, then launch the application with <br /><br /> <code>vglrun /usr/local/MATLAB/<em>version</em>/bin/matlab \</code><br /> <code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-nosoftwareopengl</code></td>
2204+
<td class="standard">MATLAB R2025a and later use the Chromium Embedded Framework (CEF), so <code>VGL_CHROMEHACK</code> is necessary to work around Chrome&rsquo;s X visual selection mechanism. (Refer to the application recipe for Chrome v129 and later.) <br /><br /> When using nVidia&rsquo;s proprietary Vulkan driver, which does something VirtualGL-like in an X proxy environment, or when using an X proxy that implements the DRI3 X extension, you can also enable GPU acceleration by setting the <code>MW_CEF_STARTUP_OPTIONS</code> environment variable to <code>--use-angle=vulkan</code> prior to launching MATLAB. No additional arguments or environment variables are necessary in this case, nor is it necessary to launch the application with <code>vglrun</code>.</td>
21912205
</tr>
21922206
<tr class="standard">
21932207
<td class="standard">PyTorch</td>

0 commit comments

Comments
 (0)