# Ubuntu + Nvidia sync trouble

**URL:** <https://psychtoolbox.discourse.group/t/ubuntu-nvidia-sync-trouble/3284>\
**Category:** Hardware\
**Tags:** linux, gpu\
**Created:** [July 7, 2020, 11:30am UTC](https://psychtoolbox.discourse.group/t/ubuntu-nvidia-sync-trouble/3284 "2020-07-07T11:30:51Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Ian-Max-Andolina](https://yyz2.discourse-cdn.com/free1/user_avatar/psychtoolbox.discourse.group/ian-max-andolina/32/4_2.png) [@Ian-Max-Andolina](https://psychtoolbox.discourse.group/u/Ian-Max-Andolina)\
**Post date:** [July 7, 2020, 11:26pm UTC](https://psychtoolbox.discourse.group/t/ubuntu-nvidia-sync-trouble/3284/2 "2020-07-07T23:26:29Z")

</div>

I have tried everything on my RTX-2070 and T1000 systems, including all the recommended optimisations (low-latency kernel, clean install, gamemode priority etc.), you can see some of this in the following issue: [https://github.com/kleinerm/Psychtoolbox-3/issues/168](https://github.com/kleinerm/Psychtoolbox-3/issues/168)

One thing that was a reliable observation — the first PTB run in a fresh MATLAB invocation normally returns sync `stddev` just below the threshold, but from the next run on the sync testing always fails. Does this happen for you? I never managed to solve this.

My solution is to only use AMD cards with the open-source drivers for experiment data (where I never get sync errors), and then just test if I’m running on NVidia and increase the sync tolerance as my NVidia machines are only development systems:

```matlab
gpuinfo = opengl('data');
if IsLinux && ~isempty(regexpi(gpuinfo.Vendor,'NVIDIA','ONCE'))
   Screen('Preference','SyncTestSettings', 0.001); %up to 1ms std variability
end

```

---

_[View the full topic](https://psychtoolbox.discourse.group/t/ubuntu-nvidia-sync-trouble/3284)._
