@@ -33,26 +33,27 @@ outputs (internal flat panel and external video connectors like
3333controlled and allows selection of which gpu is driving the
3434displays, the other gpu is powered down for maximum power saving.
3535
36- # macOS, Linux on Apple hardware and on other muxed Laptops
36+ # macOS, Linux on Apple hardware, and on other muxed Laptops
3737
38- As of 2021 , all past and current dual-gpu laptops from Apple (Intel
38+ As of the year 2026 , all past Intel dual-graphics laptops from Apple (Intel
3939[ MacBookPro] ( MacBookPro ) line with [ NVidia] ( NVidia ) or AMD gpu) are muxed. When using macOS, the
4040operating system controls the mux to select an appropriate gpu. For light
4141desktop and 2D use, the iGPU is active. Whenever a 3D application starts
4242up, e.g., Psychtoolbox, the iGPU gets disconnected and powered down and
4343the dGPU gets powered up and connected. From the perspective of
4444Psychtoolbox there essentially is only one GPU, which is the dGPU, either
45- a [ NVidia] ( NVidia ) or AMD graphics card. Apart from a couple of rather horrible
46- bugs, e.g., for the 2010 [ MacBookPro] ( MacBookPro ) with some recent versions of macOS,
47- this means that hybrid graphics under macOS usually "just works".
45+ a [ NVidia] ( NVidia ) or AMD graphics card. This means that hybrid graphics under macOS
46+ usually "just works".
4847
49- If one uses an Apple [ MacBookPro] ( MacBookPro ) under Linux then the machine will run
48+ If one uses an Apple Intel [ MacBookPro] ( MacBookPro ) under Linux then the machine will run
5049with either the dGPU active and the Laptop behaves like a machine with
5150one gpu, or the active gpu can be switched via the Linux "vgaswitcheroo"
5251mechanism. The same applies for other PC laptops which are equipped with
5352a mux. Iow. one can manually select the performance vs. power consumption
5453tradeoff.
5554
55+ # Muxless laptops
56+
5657Most modern common PC laptops are muxless though. The iGPU is hard-wired
5758to the video outputs, both to the laptop flat panel and the external
5859outputs. The iGPU is always active and drives the displays and takes care
@@ -64,9 +65,9 @@ the iGPU and the iGPU then displays the images on behalf of the dGPU.
6465This involves some significant overhead: Multiple milliseconds of time
6566are needed for each [ Screen] ( Screen ) ('[ Flip] ( Flip ) ') to copy image data from the dGPU to
6667the iGPU, and converting the data into a format the iGPU can display. For
67- this reason, display latency on a muxless laptop will always be longer
68- and absolute graphics performance lower than on a laptop which only has a
69- dGPU of the same model, or on a muxless laptop. A big problem is the need
68+ this reason, display latency on a muxless laptop will always be longer,
69+ and absolute graphics performance lower, than on a laptop which only has a
70+ dGPU of the same model, or on a laptop with mux . A big problem is the need
7071to properly synchronize the rendering of the dGPU with the display of the
7172iGPU. Depending on how this synchronization or handshake is implemented,
7273visual stimulus onset timing and timestamping can be highly unreliable
@@ -77,7 +78,7 @@ and inaccurate.
7778On Microsoft Windows a handshake method is used which maintains good
7879framerates for video games and similar applications, but causes visual
7980stimulus onset timing and timestamping to be almost always completely
80- wrong, with observed errors in the range of +/- 33 msecs on a 60 Hz
81+ wrong, e.g., with observed errors in the range of +/- 33 msecs on a 60 Hz
8182panel. That means that the dGPU is unusable if visual timing matters in
8283any way. The best you can do on a muxless laptop under Microsoft Windows
8384is to configure the driver to disable the dGPU and only use the iGPU for
@@ -88,29 +89,21 @@ MS-Windows, even on regular single gpu laptops.
8889
8990# LINUX
9091
91- On Linux, as of December 2021 , good progress has been made in
92+ On Linux, as of the year 2026 , good progress has been made in
9293implementing methods which provide both good performance \* and\* reliable,
9394trustworthy, accurate visual timing and timestamping. Some - but not all!
9495- types of Laptop hardware should work well, but for all of them some
9596special configuration or software upgrades are needed.
9697
97- We recommend [ XServer] ( XServer ) version 1.20.11 or later, and Mesa version 21.0.3 or
98- later, and Linux 5.11 or later, as this combination provides best
99- performance and ease of setup for all supported types of hybrid graphics
100- laptops. Users of Ubuntu Linux can simply install Ubuntu 20.04.3 LTS from
101- fresh installation media, or upgrade to 20.04.3 LTS from earlier Ubuntu
102- releases and then install the new hardware enablement stack (HWE) via ...
103-
104- sudo apt install --install-recommends linux-lowlatency-hwe-20.04
98+ The minimum required software to make this work well under the native X11
99+ X-Server is [ XServer] ( XServer ) version 1.20.11, Mesa version 21.0.3, and Linux 5.11.
105100
106- ... if it isn't already automatically installed after an upgrade to 20.04.3 LTS.
101+ Any Linux distribution at least as recent and modern as Ubuntu 22.04 LTS
102+ will provide all that is needed for good hybrid graphics support.
107103
108104The following sections describe the current level and quality of support
109- for different types of hybrid graphics laptops, and required
110- configuration steps, assuming you have sufficiently up to date kernel,
111- X-Server and Mesa as explained in the previous paragraph. Psychtoolbox
112- would tell you if you need to upgrade your kernel, if you'd run it on a
113- muxless hybrid graphics Laptop.
105+ for different types of hybrid graphics laptops, and required configuration
106+ steps.
114107
115108
116109### \* Laptops with an Intel iGPU combined with a [ NVidia] ( NVidia ) dGPU ("[ NVidia] ( NVidia ) Optimus" models):
@@ -126,28 +119,27 @@ muxless hybrid graphics Laptop.
126119 gpu family [ (GeForce] ((GeForce) 800 series) or later, so you would need the
127120 proprietary driver to take advantage of those later models.
128121
129- For using such gpu's with the [ NVidia] ( NVidia ) proprietary driver, choose a
122+ For using such gpu's with the [ NVidia] ( NVidia ) proprietary driver, you need a
130123 driver of version 495.44 or later. It may work with earlier drivers,
131124 e.g., maybe even from the 450 series, but was only "tested" with the
132- 495.44 driver. Linux 5.11 and X-Server 1.20.11 or later is strongly
133- recommended. Iow. Ubuntu 20.04.3-LTS will HWE stack and all updates
134- applied.
125+ 495.44 driver. Ubuntu 22.04-LTS and later do have all needed software
126+ and modern enough [ NVidia] ( NVidia ) proprietary drivers for this to work well.
135127
136128 On Ubuntu, the "nvidia-settings" GUI tool allows you - in the PRIME
137129 profiles section - to switch between "high performance" [ NVidia] ( NVidia )
138- graphics, standard "power efficient" Intel graphics. and "on demand"
139- Optimus mode. You should select "On demand" and reboot. The command
140- line tool "prime-select ondemand" does the same selection . This may
141- also work with the other selections, but may require custom xorg.conf
142- files in that case.
130+ graphics, standard "power efficient" Intel graphics, and "on demand"
131+ Optimus mode. You should select "On demand" and then reboot. The command
132+ line command "prime-select ondemand" will do the same. This may also
133+ work with the other selections, but may require custom xorg.conf files
134+ in that case.
143135
144136 Now you should be able to choose if you want to use the Intel iGPU or
145137 the [ NVidia] ( NVidia ) dGPU for rendering:
146138
147139 Starting "octave" or "matlab" you would get to use the Intel iGPU, low
148140 power consumption, full PTB feature set, but lower performance.
149141
150- Starting "octave' or "matlab" with the following prefix...
142+ Starting "octave' or "matlab" from a terminal with the following prefix...
151143
152144 \_\_ NV\_ PRIME\_ RENDER\_ OFFLOAD=1 \_\_ GLX\_ VENDOR\_ LIBRARY\_ NAME=nvidia octave
153145 or
@@ -172,13 +164,9 @@ muxless hybrid graphics Laptop.
172164
173165### \* Laptops with an Intel iGPU combined with an AMD dGPU ("AMD Enduro" models):
174166
175- These should work very well out of the box on Ubuntu 20 .04.3 LTS and
167+ These should work very well out of the box on Ubuntu 22 .04 LTS and
176168 later, as explained above.
177169
178- On other Linux distributions, make sure to install Linux 4.8.11 or
179- later versions of the Linux kernel, together with X-Server 1.18 or
180- later, and Mesa version 17.0 or later.
181-
182170### AMD Enduro hybrid graphics was tested with three PC setups:
183171
184172 - Intel HD "Haswell desktop" graphics chip + AMD Radeon R9 380 Tonga Pro.
@@ -192,36 +180,37 @@ muxless hybrid graphics Laptop.
192180### \* Laptops with dual [ NVidia] ( NVidia ) gpus [ NVidia] ( NVidia ) iGPU + [ NVidia] ( NVidia ) dGPU:
193181
194182 Muxless would not work with any current official solution [ 1] . However,
195- i am not aware of any recent muxless laptops - or any such muxless
196- laptops actually - which use dual-[ NVidia] ( NVidia ) gpus. All known dual-[ NVidia] ( NVidia )
197- laptops are rather old (around year 2010 or earlier) and use a hardware
198- mux, so Linux "vgaswitcheroo" mechanism can be used to switch between
199- gpus for perfect results.
183+ i am not aware of any muxless laptops which use dual-[ NVidia] ( NVidia ) gpus. All
184+ known to us dual-[ NVidia] ( NVidia ) laptops are very old (around the year 2010 or
185+ earlier) and use a hardware mux, so Linux "vgaswitcheroo" mechanism can
186+ be used to switch between gpus for perfect results.
200187
201188
202189### \* Laptops with dual AMD gpus AMD iGPU + AMD dGPU ("AMD Enduro" models):
203190
204191 Muxless is untested due to lack of suitable AMD dual-gpu hardware, but
205- according to code review should work on the recommended Linux 5.11 and
206- later for AMD iGPU's of type "Stoney", "Carrizo", "Raven2", "Renoir",
207- "Picasso", " [ VanGogh] ( VanGogh ) " and later. Essentially most integrated graphics
208- chips (APU's) in laptops or PC's with modern AMD Ryzen processors,
209- except for early models which use [ RavenRidge] ( RavenRidge ) 1st generation iGPU's.
210- Check product specs, but in general Ryzen 5 2000/3000 series machines
211- may have the problematic [ RavenRidge] ( RavenRidge ) iGPU's, whereas recent Ryzen 7 4000
212- series may have more modern and suitablg iGPU's
192+ according to code review should work under Linux 5.11 and later for
193+ AMD iGPU's of type "Stoney", "Carrizo", "Raven2", "Renoir", "Picasso ",
194+ "[ VanGogh] ( VanGogh ) " and later. Essentially most integrated graphics chips (APU's)
195+ in laptops or PC's with modern AMD Ryzen processors, except for early
196+ models which use [ RavenRidge] ( RavenRidge ) 1st generation iGPU's. Check product specs,
197+ but in general Ryzen 5 2000/3000 series machines may have such
198+ problematic [ RavenRidge] ( RavenRidge ) iGPU's, whereas recent Ryzen 7 4000 series may
199+ have more modern and suitablg iGPU's.
213200
214201 Stimuli should display without any artifacts and timing and timestamping
215202 should be accurate and trustworthy. Performance should be good.
216203
217204
218205### \* Laptops with AMD iGPU + [ NVidia] ( NVidia ) dGPU ("[ NVidia] ( NVidia ) Optimus" models):
219206
220- Psychtoolbox 3.0.18.2 and later has some support for this. Setup is the
207+ Psychtoolbox since version 3.0.18.2 has some support for this. Setup is the
221208 same as in the section above for Intel iGPU + [ NVidia] ( NVidia ) dGPU. However, due
222- to current limitations in the AMD Linux display driver amdgpu-kms as of
223- at least Linux 5.16, proper pageflipping and scanout is not yet
224- supported. Psychtoolbox will need to use (and force-enable) the desktop
209+ to limitations in the AMD Linux display driver amdgpu-kms as of at least
210+ Linux 5.16, proper pageflipping and scanout was not supported. The
211+ following info has not been reevaluated and updated in the last years,
212+ so the current state of support as of the year 2026 is unknown to us.
213+ Psychtoolbox will need to use (and force-enable) the desktop
225214 compositor of your Ubuntu/Gnome/KDE desktop GUI to get proper high
226215 quality pictures on the display. It will try some hackery to try to get
227216 proper visual stimulus onset timing and timestamping, but the
@@ -239,26 +228,17 @@ muxless hybrid graphics Laptop.
239228 "Mutter" X11 compositor and window manager), you can try the following
240229 command setenv('PSYCH\_ EXPERIMENTAL\_ NETWMTS', '1') to opt-in into some highly
241230 experimental mode which makes timing reliable and trustworthy, however while
242- potentially reducing framerate. Additional downsides are that currently only
243- single-window use with [ Screen] ( Screen ) ('[ Flip] ( Flip ) ') will work, also no more fancy things like
244- flip events, async flips, frame-sequential stereo or VRR. This is a construction site!
245-
246- I also have developed experimental patches to the Linux amdgpu driver to
247- lift all these limitations on AMD to get the same excellent performance and
248- reliability as with Intel iGPU's, but the current patches are hacky and
249- unlikely to get accepted into official Linux kernels in their current
250- state. Time permitting i will try to get those integrated properly.
251- Meanwhile, these only exist on my development machine and i haven't
252- decided on the conditions under which these may be made available to
253- Psychtoolbox users. The only sure thing is that it won't happen free of
254- cost, as this work requires a lot of time and money.
231+ potentially reducing framerate. Additional downsides are that currently
232+ only single-window use with [ Screen] ( Screen ) ('[ Flip] ( Flip ) ') will work, also no more
233+ fancy things like flip events, async flips, frame-sequential stereo or
234+ VRR. This is a construction site!
255235
256236
257237For those combinations that should work (Intel iGPU + [ NVidia] ( NVidia ) /AMD dGPU
258- "Optimus/Enduro", and AMD iGPU + AMD dGPU), after you've upgraded to all
259- the required software, the following setup steps are needed for muxless
260- PRIME mode. Note that these \* do not apply \* to Optimus with the proprietary
261- graphics driver from [ NVidia ] ( NVidia ) , for which setup was explained above:
238+ "Optimus/Enduro", and AMD iGPU + AMD dGPU), the following setup steps are
239+ needed for muxless PRIME mode. Note that these \* do not apply \* to Optimus
240+ with the proprietary graphics driver from [ NVidia ] ( NVidia ) , for which setup was
241+ explained above:
262242
2632431 . Run the "[ XOrgConfCreator] ( XOrgConfCreator ) " script to create a proper [ XOrg] ( XOrg ) configuration file,
264244 and then "[ XOrgConfSelector] ( XOrgConfSelector ) " to switch to that configuration file, logout and
0 commit comments