Graphics card not found, strange monitor refresh interval from beamposition

Hi PTB community,


I'm having an issue with PTB not being able to find my graphics card.


Details:

  • MatlabR2019b
  • Psychtoolbox 3.0.16
  • Ubuntu 18.04 LTS
  • Intel Core i5-9600K CUP @ 3.70 Hz x 6
  • Graphics card: Nvidia GeForce RTX 2070/PCIe/SSE2
  • Graphics driver: NVIDIA 435
  • Displays: Dell Alienware Gaming Monitor (240 Hz)
I get the following error: 

PTB-INFO: NVIDIA Corporation - (null) GPU found. Trying to establish low-level access...
PTB-INFO: Connected to NVidia (null) GPU of NV-160 family with 4 display heads.

It also reports a strange monitor refresh interval from beamposition:

PTB-INFO: Measured monitor refresh interval from beamposition = 999.984615 ms [1.000015 Hz].

(Full output is below.)

Previously, using PTB 3.0.15, the graphics card was not recognized and I also received the error: 

PTB-INFO: Beamposition queries unsupported or defective on this system. Using basic timestamping as fallback.

However, after seeing the recent beta update with support for the new NVidia GPUs, I updated to 3.0.16. I also replaced the Screen.mexa64 file in the Psychtoolbox/PsychBasic/ folder provided by Mario in response to Alex White who had a similar issue (although I suspect this is redundant, assuming that the fix in 3.0.16 is simply this file). However, my card is still not recognized and refresh information from beamposition is incorrect. 

Any ideas on what might be going wrong?

Thank you so much!

Alison Campbell

---------
Full output:

PTB-INFO: This is Psychtoolbox-3 for GNU/Linux X11, under Matlab 64-Bit (Version 3.0.16 - Build date: Sep 18 2019).
PTB-INFO: OS support status: Linux 5.0.0-23-generic Supported.
PTB-INFO: Type 'PsychtoolboxVersion' for more detailed version information.
PTB-INFO: Most parts of the Psychtoolbox distribution are licensed to you under terms of the MIT License, with
PTB-INFO: some restrictions. See file 'License.txt' in the Psychtoolbox root folder for the exact licensing conditions.

PTB-INFO: NVIDIA Corporation - (null) GPU found. Trying to establish low-level access...
PTB-INFO: Connected to NVidia (null) GPU of NV-160 family with 4 display heads.


PTB-INFO: OpenGL-Renderer is NVIDIA Corporation :: GeForce RTX 2070/PCIe/SSE2 :: 4.6.0 NVIDIA 435.21
PTB-INFO: VBL startline = 1080 , VBL Endline = 1161
PTB-INFO: Measured monitor refresh interval from beamposition = 999.984615 ms [1.000015 Hz].
PTB-INFO: Will use beamposition query for accurate Flip time stamping.
PTB-INFO: Measured monitor refresh interval from VBLsync = 4.188276 ms [238.761710 Hz]. (260 valid samples taken, stddev=0.199703 ms.)
PTB-INFO: Reported monitor refresh interval from operating system = 4.166667 ms [240.000000 Hz].
PTB-INFO: Small deviations between reported values are normal and no reason to worry.

WARNING: Mismatch between measured monitor refresh intervals! This indicates problems with rasterbeam position queries.


----- ! PTB - WARNING: SYNCHRONIZATION TROUBLE ! ----

One or more internal checks (see Warnings above) indicate that
queries of rasterbeam position are not properly working for your setup.

Psychtoolbox will work around this by using a different timing algorithm, 
but it will cause Screen('Flip') to report less accurate/robust timestamps
for stimulus timing.
Read 'help BeampositionQueries' for more info and troubleshooting tips.


PTB-INFO: Failed to request additional performance tuning from operating system.
PTB-INFO: This is because the optional "FeralInteractive gamemode" package is not installed
PTB-INFO: and set up yet. If you want to have these extra optimizations, then read
PTB-INFO: the setup instructions in "help LinuxGameMode".

The refresh interval reported by the operating system is 4.16667 ms.
Measured refresh interval, as reported by "GetFlipInterval" is 4.18828 ms. (nsamples = 0, stddev = 0.00000 ms)

ans =

     1



INFO: PTB's Screen('Flip', 10) command seems to have missed the requested stimulus presentation deadline
INFO: a total of 18 times out of a total of 605 flips during this session.

INFO: This number is fairly accurate (and indicative of real timing problems in your own code or your system)
INFO: if you provided requested stimulus onset times with the 'when' argument of Screen('Flip', window [, when]);
INFO: If you called Screen('Flip', window); without the 'when' argument, this count is more of a ''mild'' indicator
INFO: of timing behaviour than a hard reliable measurement. Large numbers may indicate problems and should at least
INFO: deserve your closer attention. Cfe. 'help SyncTrouble', the FAQ section at www.psychtoolbox.org and the
INFO: examples in the PDF presentation in PsychDocumentation/Psychtoolbox3-Slides.pdf for more info and timing tips.

PTB missed 1 out of 600 stimulus presentation deadlines.
One missed deadline is ok and an artifact of the measurement.
PTB completed 0 stimulus presentations before the requested target time.
Have a look at the plots for more details...




Comments interspersed below. But first, congratulations for your
excellent choice of operating system, but my condolences for your
specific choice of graphics and display hardware.

On Wed, Oct 9, 2019 at 4:43 AM campbel1@... [PSYCHTOOLBOX]
<PSYCHTOOLBOX@yahoogroups.com> wrote:
> Hi PTB community,
>
> I'm having an issue with PTB not being able to find my graphics card.
>

It does find it.

>
> Details:
>
> MatlabR2019b
> Psychtoolbox 3.0.16
> Ubuntu 18.04 LTS
> Intel Core i5-9600K CUP @ 3.70 Hz x 6
> Graphics card: Nvidia GeForce RTX 2070/PCIe/SSE2
> Graphics driver: NVIDIA 435
> Displays: Dell Alienware Gaming Monitor (240 Hz)
>

I so wish people would follow our hardware recommendations and use AMD
or Intel gpu's whenever possible, where we have excellent open-source
graphics/display drivers on Linux. Not only do they provide additional
useful features for vision science applications, compared to NVidia.
They are also plug & play and make it more easy for me in the rare
case of trouble - or make it possible for me to help at all. With
NVidia there isn't any guarantee that the kind of low-level stuff
which is important for vision science keeps working or can be fixed if
it breaks.

> I get the following error:
>
> PTB-INFO: NVIDIA Corporation - (null) GPU found. Trying to establish low-level access...
> PTB-INFO: Connected to NVidia (null) GPU of NV-160 family with 4 display heads.
>

That's not an error but an info and it's fine: Number of display
engines and generation/family of graphics card (NV-160 aka "Turing")
properly recognized. The (null) just means that the product name for
the model id isn't yet in Ubuntu's database, so it can't map model id
codes (PCI device id's) to human readable names.

> It also reports a strange monitor refresh interval from beamposition:
>
> PTB-INFO: Measured monitor refresh interval from beamposition = 999.984615 ms [1.000015 Hz].
>

That's bad and super weird.

> (Full output is below.)
>
> Previously, using PTB 3.0.15, the graphics card was not recognized and I also received the error:
>
> PTB-INFO: Beamposition queries unsupported or defective on this system. Using basic timestamping as fallback.
>
> However, after seeing the recent beta update with support for the new NVidia GPUs, I updated to 3.0.16. I also replaced the Screen.mexa64 file in the Psychtoolbox/PsychBasic/ folder provided by Mario in response to Alex White who had a similar issue (although I suspect this is redundant, assuming that the fix in 3.0.16 is simply this file). However, my card is still not recognized and refresh information from beamposition is incorrect.
>

Yes, the latest beta contains those fixes.

> Any ideas on what might be going wrong?
>

Does it take unusually long for an onscreen window to open? Does this
always happen?
The fact that it recognized a plausible VBL Endline for the display
suggests it connected to the right display engine, which makes the
measured result even more weird.
What's the output of BeampositionTest
(http://psychtoolbox.org/docs/BeampositionTest), once with the
'synced' flag set to its 0 default, once with 1, all plots?

What's the output if running Screen at high verbosity levels like
Screen('Preference", 'Verbosity', 6)?

-mario


> Thank you so much!
>
> Alison Campbell
>
> ---------
> Full output:
>
> PTB-INFO: This is Psychtoolbox-3 for GNU/Linux X11, under Matlab 64-Bit (Version 3.0.16 - Build date: Sep 18 2019).
> PTB-INFO: OS support status: Linux 5.0.0-23-generic Supported.
> PTB-INFO: Type 'PsychtoolboxVersion' for more detailed version information.
> PTB-INFO: Most parts of the Psychtoolbox distribution are licensed to you under terms of the MIT License, with
> PTB-INFO: some restrictions. See file 'License.txt' in the Psychtoolbox root folder for the exact licensing conditions.
>
> PTB-INFO: NVIDIA Corporation - (null) GPU found. Trying to establish low-level access...
> PTB-INFO: Connected to NVidia (null) GPU of NV-160 family with 4 display heads.
>
>
> PTB-INFO: OpenGL-Renderer is NVIDIA Corporation :: GeForce RTX 2070/PCIe/SSE2 :: 4.6.0 NVIDIA 435.21
> PTB-INFO: VBL startline = 1080 , VBL Endline = 1161
> PTB-INFO: Measured monitor refresh interval from beamposition = 999.984615 ms [1.000015 Hz].
> PTB-INFO: Will use beamposition query for accurate Flip time stamping.
> PTB-INFO: Measured monitor refresh interval from VBLsync = 4.188276 ms [238.761710 Hz]. (260 valid samples taken, stddev=0.199703 ms.)

This looks like bad timing. Installing the low latency kernel or the
gamemode optimizations might help, but in its current condition this
doesn't look good for a use case that requires 240 Hz refresh rate.
Also if the Alienware monitor is the one i get on a first Google
search then it supports NVidia G-Sync, which is mostly useless for us,
whereas an equivalent FreeSync2 monitor with a modern AMD gpu might
have been an excellent choice for visual paradigms that need high
refresh rates.

> PTB-INFO: Reported monitor refresh interval from operating system = 4.166667 ms [240.000000 Hz].
> PTB-INFO: Small deviations between reported values are normal and no reason to worry.
>
> WARNING: Mismatch between measured monitor refresh intervals! This indicates problems with rasterbeam position queries.
>
>
> ----- ! PTB - WARNING: SYNCHRONIZATION TROUBLE ! ----
>
> One or more internal checks (see Warnings above) indicate that
> queries of rasterbeam position are not properly working for your setup.
>
> Psychtoolbox will work around this by using a different timing algorithm,
> but it will cause Screen('Flip') to report less accurate/robust timestamps
> for stimulus timing.
> Read 'help BeampositionQueries' for more info and troubleshooting tips.
>
>
> PTB-INFO: Failed to request additional performance tuning from operating system.
> PTB-INFO: This is because the optional "FeralInteractive gamemode" package is not installed
> PTB-INFO: and set up yet. If you want to have these extra optimizations, then read
> PTB-INFO: the setup instructions in "help LinuxGameMode".
>
> The refresh interval reported by the operating system is 4.16667 ms.
> Measured refresh interval, as reported by "GetFlipInterval" is 4.18828 ms. (nsamples = 0, stddev = 0.00000 ms)
>
> ans =
>
> 1
>
>
>
> INFO: PTB's Screen('Flip', 10) command seems to have missed the requested stimulus presentation deadline
> INFO: a total of 18 times out of a total of 605 flips during this session.
>
> INFO: This number is fairly accurate (and indicative of real timing problems in your own code or your system)
> INFO: if you provided requested stimulus onset times with the 'when' argument of Screen('Flip', window [, when]);
> INFO: If you called Screen('Flip', window); without the 'when' argument, this count is more of a ''mild'' indicator
> INFO: of timing behaviour than a hard reliable measurement. Large numbers may indicate problems and should at least
> INFO: deserve your closer attention. Cfe. 'help SyncTrouble', the FAQ section at www.psychtoolbox.org and the
> INFO: examples in the PDF presentation in PsychDocumentation/Psychtoolbox3-Slides.pdf for more info and timing tips.
>
> PTB missed 1 out of 600 stimulus presentation deadlines.
> One missed deadline is ok and an artifact of the measurement.
> PTB completed 0 stimulus presentations before the requested target time.
> Have a look at the plots for more details...
>
>
>
>
>
Hi Mario,

Thanks for the clarification about the graphics card info message. That makes sense.

After updating to 3.0.16 to enable beamposition queries, there is a noticeable increase in the amount of time needed to open to onscreen window (both for screen tests and when running presentation codes). Previously, using 3.0.15, the white welcome screen that appears during the Screen test would only appear for a few seconds; after updating to 3.0.16/replacing the Screen.mexa64 file, this white welcome screen appears for about 30-40 seconds. 

I ran the tests that you suggested and the outputs are attached. Only running BeampositionTest with 'synced'==1 yielded a figure (also attached). 

Thanks very much for your assistance with this!

Alison Campbell 
University of Victoria


None of your attachments is accessible via e-mail or web interface.
Maybe put them into some Dropbox or GDrive or whatever and post
download links.

However, are you saying you have G-Sync enabled on that monitor? In
that case complete failure is expected, with no currently known way to
make it work. PTB's high precision visual stimulus onset timing and
timestamping is incompatible with the G-Sync hardware due to unknown
changes to NVidia's display hardware when it operates in G-Sync mode.
Seems while in the past it only caused quick failure of the
beamposition startup-tests, it now probably causes a full stall of the
PCIe register read for about a second per read, at least that's what i
would guess from the symptoms.

The problem wouldn't happen on your DVI monitor, because that doesn't
support G-Sync, so it is disabled.

At least according to my testing with an earlier GeForce 1060 GTX it
neither works on Linux or Windows.

The only thing you can do atm. is to "disable" all high-precision
timing, either by downgrading your PTB back to v3.0.15 so it doesn't
detect your GPU, or maybe by adding a PsychTweak('UseGPUIndex', 1); to
force it to use a non-existent 2nd GPU, which will probably also get
rid of high precision mode - and all the hangs - without forcing you
to stay on an outdated PTB 3.0.15. This will give you a PTB that
"works" with G-Sync for a sufficiently generous definition of "works",
ie. with likely rather noisy and shaky timing and no guarantee that
the timing is trustworthy in any way.

What i would really recommend though, as i said before, is to find
yourself a FreeSync2 monitor which is also certified by NVidia as
G-Sync compatible and can do 240 Hz. Then a modern AMD graphics card,
probably a Vega gpu -- not tested by myself, but i'm relatively
confident it will work well with PTB and Linux, if not let me know.
And then upgrade to Ubuntu 19.10 as soon as it gets released next
week, or manually to a Linux 5.3 kernel on your Ubuntu 18.04.3 LTS.
And then upgrade to the latest PTB beta as soon as VRR support is
announced. This is the best way forward if you need high refresh rates
and the G-Sync equivalent from AMD.

Here's a link to a talk by AMD's Harry Wentland about the current
state of FreeSync:

Abstract + Slides: https://xdc2019.x.org/event/5/contributions/331/
Video: https://youtu.be/HYa4UvVtMOE?t=30084

-mario


On Wed, Oct 9, 2019 at 10:32 PM campbel1@... [PSYCHTOOLBOX]
<PSYCHTOOLBOX@yahoogroups.com> wrote:
>
>
> [Attachment(s) from campbel1@... [PSYCHTOOLBOX] included below]
>
> Hi again Mario,
>
>
> I realized that I should have been restarting Matlab in between tests. After restarting Matlab, I was able to get some Beamposition test results (attached).
>
> I also decided to see what would happen if I hooked up an older 60Hz Dell monitor (Dell P2210 via DVI-D).
> I then ran VBLSyncTest and the BeampositionTest tests and the results look healthy! I'm not quite sure what that says about the current setup with our 240Hz monitor (Dell AW2518H via DP). We are really needing G-Sync and the 240Hz refresh rate, though. Crossing fingers that this sheds some light...
>
> Alison
>
>
>
Hi Mario,

MANY thanks for your insights, suggestions, and quick feedback on my issue. I ran VBLSyncTest after turning off the G-Sync on the monitor and I think I got a healthy output (pasted below). 

I do ultimately want to have GSync/Freesync functionality, so I will contemplate your suggestions. I may have more questions for you re: modifying my current setup and possible hardware additions, if that's alright.

Alison

All previous output files are here:

-------
VBLSyncTest after turning off G-Sync on the 240Hz monitor:

PTB-INFO: This is Psychtoolbox-3 for GNU/Linux X11, under Matlab 64-Bit (Version 3.0.16 - Build date: Sep 18 2019).
PTB-INFO: OS support status: Linux 5.0.0-23-generic Supported.
PTB-INFO: Type 'PsychtoolboxVersion' for more detailed version information.
PTB-INFO: Most parts of the Psychtoolbox distribution are licensed to you under terms of the MIT License, with
PTB-INFO: some restrictions. See file 'License.txt' in the Psychtoolbox root folder for the exact licensing conditions.

PTB-INFO: NVIDIA Corporation - (null) GPU found. Trying to establish low-level access...
PTB-INFO: Connected to NVidia (null) GPU of NV-160 family with 4 display heads.


PTB-INFO: OpenGL-Renderer is NVIDIA Corporation :: GeForce RTX 2070/PCIe/SSE2 :: 4.6.0 NVIDIA 435.21
PTB-INFO: VBL startline = 1080 , VBL Endline = 1161
PTB-INFO: Measured monitor refresh interval from beamposition = 4.173799 ms [239.589855 Hz].
PTB-INFO: Will use beamposition query for accurate Flip time stamping.
PTB-INFO: Measured monitor refresh interval from VBLsync = 4.176979 ms [239.407472 Hz]. (50 valid samples taken, stddev=0.081975 ms.)
PTB-INFO: Reported monitor refresh interval from operating system = 4.166667 ms [240.000000 Hz].
PTB-INFO: Small deviations between reported values are normal and no reason to worry.
PTB-INFO: Failed to request additional performance tuning from operating system.
PTB-INFO: This is because the optional "FeralInteractive gamemode" package is not installed
PTB-INFO: and set up yet. If you want to have these extra optimizations, then read
PTB-INFO: the setup instructions in "help LinuxGameMode".

The refresh interval reported by the operating system is 4.16667 ms.
Measured refresh interval, as reported by "GetFlipInterval" is 4.17698 ms. (nsamples = 0, stddev = 0.00000 ms)

ans =

     1

PTB missed 1 out of 600 stimulus presentation deadlines.
One missed deadline is ok and an artifact of the measurement.
PTB completed 0 stimulus presentations before the requested target time.
Have a look at the plots for more details...

On Thu, Oct 10, 2019 at 6:45 PM campbel1@... [PSYCHTOOLBOX]
<PSYCHTOOLBOX@yahoogroups.com> wrote:
> Hi Mario,
>
> MANY thanks for your insights, suggestions, and quick feedback on my issue. I ran VBLSyncTest after turning off the G-Sync on the monitor and I think I got a healthy output (pasted below).
>

Yes, that looks all as expected. Timing is a tad noisy, which is more
of an issue if one pushes the system to high flip rates like 240 Hz.

Two thing you could try for extra timing precision would be to install
the low latency kernel (sudo apt install linux-lowlatency-hwe-18.04)
then reboot.
And "help LinuxGameMode" if you also want to install more performance
optimizations.

> I do ultimately want to have GSync/Freesync functionality, so I will contemplate your suggestions. I may have more questions for you re: modifying my current setup and possible hardware additions, if that's alright.
>

Sure.
-mario

> Alison
>
> All previous output files are here:
> https://drive.google.com/drive/folders/1NgTTqkv_HuyJ0B3EhzH1GFU28Qp9q3DA?usp=sharing
>
> -------
> VBLSyncTest after turning off G-Sync on the 240Hz monitor:
>
> PTB-INFO: This is Psychtoolbox-3 for GNU/Linux X11, under Matlab 64-Bit (Version 3.0.16 - Build date: Sep 18 2019).
> PTB-INFO: OS support status: Linux 5.0.0-23-generic Supported.
> PTB-INFO: Type 'PsychtoolboxVersion' for more detailed version information.
> PTB-INFO: Most parts of the Psychtoolbox distribution are licensed to you under terms of the MIT License, with
> PTB-INFO: some restrictions. See file 'License.txt' in the Psychtoolbox root folder for the exact licensing conditions.
>
> PTB-INFO: NVIDIA Corporation - (null) GPU found. Trying to establish low-level access...
> PTB-INFO: Connected to NVidia (null) GPU of NV-160 family with 4 display heads.
>
>
> PTB-INFO: OpenGL-Renderer is NVIDIA Corporation :: GeForce RTX 2070/PCIe/SSE2 :: 4.6.0 NVIDIA 435.21
> PTB-INFO: VBL startline = 1080 , VBL Endline = 1161
> PTB-INFO: Measured monitor refresh interval from beamposition = 4.173799 ms [239.589855 Hz].
> PTB-INFO: Will use beamposition query for accurate Flip time stamping.
> PTB-INFO: Measured monitor refresh interval from VBLsync = 4.176979 ms [239.407472 Hz]. (50 valid samples taken, stddev=0.081975 ms.)
> PTB-INFO: Reported monitor refresh interval from operating system = 4.166667 ms [240.000000 Hz].
> PTB-INFO: Small deviations between reported values are normal and no reason to worry.
> PTB-INFO: Failed to request additional performance tuning from operating system.
> PTB-INFO: This is because the optional "FeralInteractive gamemode" package is not installed
> PTB-INFO: and set up yet. If you want to have these extra optimizations, then read
> PTB-INFO: the setup instructions in "help LinuxGameMode".
>
> The refresh interval reported by the operating system is 4.16667 ms.
> Measured refresh interval, as reported by "GetFlipInterval" is 4.17698 ms. (nsamples = 0, stddev = 0.00000 ms)
>
> ans =
>
> 1
>
> PTB missed 1 out of 600 stimulus presentation deadlines.
> One missed deadline is ok and an artifact of the measurement.
> PTB completed 0 stimulus presentations before the requested target time.
> Have a look at the plots for more details...
>
>