Skip to content

Commit e5df862

Browse files
committed
Update online docs for 3.0.22.2 release.
1 parent 74dbc5a commit e5df862

20 files changed

Lines changed: 277 additions & 156 deletions

docs/EyelinkCleanupHelper.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# [EyelinkCleanupHelper](EyelinkCleanupHelper)
2+
##### >[Psychtoolbox](Psychtoolbox)>[PsychHardware](PsychHardware)>[EyelinkToolbox](EyelinkToolbox)>[EyelinkOneLiners](EyelinkOneLiners)
3+
4+
% Restore character output to command window, disable [GetChar](GetChar) et al.:
5+
6+
7+
8+
9+
<div class="code_header" style="text-align:right;">
10+
<span style="float:left;">Path&nbsp;&nbsp;</span> <span class="counter">Retrieve <a href=
11+
"https://raw.github.com/Psychtoolbox-3/Psychtoolbox-3/beta/Psychtoolbox/PsychHardware/EyelinkToolbox/EyelinkOneLiners/EyelinkCleanupHelper.m">current version from GitHub</a> | View <a href=
12+
"https://github.com/Psychtoolbox-3/Psychtoolbox-3/commits/beta/Psychtoolbox/PsychHardware/EyelinkToolbox/EyelinkOneLiners/EyelinkCleanupHelper.m">changelog</a></span>
13+
</div>
14+
<div class="code">
15+
<code>Psychtoolbox/PsychHardware/EyelinkToolbox/EyelinkOneLiners/EyelinkCleanupHelper.m</code>
16+
</div>
17+

docs/EyelinkTransferFileHelper.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# [EyelinkTransferFileHelper](EyelinkTransferFileHelper)
2+
##### >[Psychtoolbox](Psychtoolbox)>[PsychHardware](PsychHardware)>[EyelinkToolbox](EyelinkToolbox)>[EyelinkOneLiners](EyelinkOneLiners)
3+
4+
[EyelinkTransferFileHelper](EyelinkTransferFileHelper)(el, edfFile)
5+
6+
Helper function for transferring a copy of the EDF file to the experiment folder
7+
on the display computer and displaying some feedback to the user.
8+
9+
'el' Eyelink struct.
10+
'edfFile' Name of the EDF file.
11+
12+
13+
14+
15+
16+
<div class="code_header" style="text-align:right;">
17+
<span style="float:left;">Path&nbsp;&nbsp;</span> <span class="counter">Retrieve <a href=
18+
"https://raw.github.com/Psychtoolbox-3/Psychtoolbox-3/beta/Psychtoolbox/PsychHardware/EyelinkToolbox/EyelinkOneLiners/EyelinkTransferFileHelper.m">current version from GitHub</a> | View <a href=
19+
"https://github.com/Psychtoolbox-3/Psychtoolbox-3/commits/beta/Psychtoolbox/PsychHardware/EyelinkToolbox/EyelinkOneLiners/EyelinkTransferFileHelper.m">changelog</a></span>
20+
</div>
21+
<div class="code">
22+
<code>Psychtoolbox/PsychHardware/EyelinkToolbox/EyelinkOneLiners/EyelinkTransferFileHelper.m</code>
23+
</div>
24+

docs/HDRViewer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ https://www.openexr.com/downloads.html
3131
'highprecision' If set to 1, request floating point 16 fp16 display
3232
output, instead of the default 10 bpc fixed point output of HDR-10.
3333
If set to 2, will request a 16 bpc fixed point framebuffer, which allows for up
34-
to 16 bpc linear precision, but in reality on early 2021 hardware at most 12 bpc.
34+
to 16 bpc linear precision, but in reality on early 2025 hardware at most 12 bpc.
3535
On most operating-systems + driver + gpu combos this 16 bpc mode will fail.
3636

3737
'windowed' If set to 1 and running on MS-Windows, create a non-fullscreen

docs/HybridGraphics.md

Lines changed: 54 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,27 @@ outputs (internal flat panel and external video connectors like
3333
controlled and allows selection of which gpu is driving the
3434
displays, 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
4040
operating system controls the mux to select an appropriate gpu. For light
4141
desktop and 2D use, the iGPU is active. Whenever a 3D application starts
4242
up, e.g., Psychtoolbox, the iGPU gets disconnected and powered down and
4343
the dGPU gets powered up and connected. From the perspective of
4444
Psychtoolbox 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
5049
with either the dGPU active and the Laptop behaves like a machine with
5150
one gpu, or the active gpu can be switched via the Linux "vgaswitcheroo"
5251
mechanism. The same applies for other PC laptops which are equipped with
5352
a mux. Iow. one can manually select the performance vs. power consumption
5453
tradeoff.
5554

55+
# Muxless laptops
56+
5657
Most modern common PC laptops are muxless though. The iGPU is hard-wired
5758
to the video outputs, both to the laptop flat panel and the external
5859
outputs. 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.
6465
This involves some significant overhead: Multiple milliseconds of time
6566
are needed for each [Screen](Screen)('[Flip](Flip)') to copy image data from the dGPU to
6667
the 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
7071
to properly synchronize the rendering of the dGPU with the display of the
7172
iGPU. Depending on how this synchronization or handshake is implemented,
7273
visual stimulus onset timing and timestamping can be highly unreliable
@@ -77,7 +78,7 @@ and inaccurate.
7778
On Microsoft Windows a handshake method is used which maintains good
7879
framerates for video games and similar applications, but causes visual
7980
stimulus 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
8182
panel. That means that the dGPU is unusable if visual timing matters in
8283
any way. The best you can do on a muxless laptop under Microsoft Windows
8384
is 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
9293
implementing methods which provide both good performance \*and\* reliable,
9394
trustworthy, accurate visual timing and timestamping. Some - but not all!
9495
- types of Laptop hardware should work well, but for all of them some
9596
special 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

108104
The 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

257237
For 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

263243
1. 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

docs/LMSToMacBoyn.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# [LMSToMacBoyn](LMSToMacBoyn)
22
##### >[Psychtoolbox](Psychtoolbox)>[PsychColorimetric](PsychColorimetric)
33

4-
ls = [LMSToMacBoyn](LMSToMacBoyn)(LMS,[T\_cones,T\_lum])
4+
[ls, factorsLMS] = [LMSToMacBoyn](LMSToMacBoyn)(LMS,[T\_cones,T\_lum],[lumReturnFlag)
55

66
Compute [MacLeod](MacLeod)-Boynton chromaticity from cone exciation coordinates.
77
This is L/Lum and S/Lum, with appropriate normalization as described
@@ -32,6 +32,24 @@ When you use the CIE cone fundamentals and corresponding luminance
3232
functions, this procedure yields the [MacLeod](MacLeod)-Boynton chromaticity
3333
diagrams as specified in CIE 170-2:2015.
3434

35+
It would have been smarter to write this routine to return lsY rather
36+
than just ls, long ago. Getting Y back makes it easier to convert back
37+
to LMS, and also be consistent with the way other conversions to
38+
chromaticity are set up. Changing this now would probably break some
39+
existing code, so instead this routine now takes an optional fourth
40+
argument that returns the luminance used in the denominator. If you ask
41+
for this, you need to provide T\_LMS and T\_Y as well, which is recommended
42+
for clarity in any case. Set lumReturnFlag = 1 on call to get back three
43+
vectors with Y (the normalizing denominator) as the third coordinate. In
44+
general this will not be the same as L+M in the passed cone system, but
45+
rather a weighted combination of L and M, with the weights computed from
46+
the passed T\_LMS and T\_Y.
47+
48+
The factorsLMS return value is a column vector with three entries that
49+
specifies how this routine decided to scale the passed LMS cone
50+
fundamentals to best approximate luminance and get the s axis scaling.
51+
Note that if you pass LMS as the empty matrix, you can obtain this vector without doing much else.
52+
3553
\*\* Legacy Usage: Just pass LMS values. In this case, we assume that the
3654
passed LMS values were computed with respect to the Smith-Pokorny
3755
fundamentals normalized to a peak of 1 and Judd-Vos luminance (more or
@@ -56,6 +74,11 @@ the gains of having this work as now specified in the CIE standard.
5674
seems good to match the standard. Thanks to Danny Garside
5775
for pointing out the scaling specified in the 2015
5876
standard.
77+
06/16/25 dhb Provide lurReturnFlag and corresponding output option, but
78+
keep code backward compatible when that is not passed.
79+
dhb Return the factorsLM column vector computed by this
80+
routine, so that it is easily available to the caller if
81+
wanted.
5982

6083

6184

0 commit comments

Comments
 (0)