# Multidisplay setting on Ubuntu

**URL:** <https://psychtoolbox.discourse.group/t/multidisplay-setting-on-ubuntu/4761>\
**Category:** Programming Help\
**Tags:** linux\
**Created:** [January 1, 2023, 1:39am UTC](https://psychtoolbox.discourse.group/t/multidisplay-setting-on-ubuntu/4761 "2023-01-01T01:39:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lattice](https://yyz2.discourse-cdn.com/free1/user_avatar/psychtoolbox.discourse.group/lattice/32/381_2.png) [@lattice](https://psychtoolbox.discourse.group/u/lattice)\
**Post date:** [January 1, 2023, 1:39am UTC](https://psychtoolbox.discourse.group/t/multidisplay-setting-on-ubuntu/4761/1 "2023-01-01T01:39:17Z")

</div>

I asked about setting the refresh rate, several months ago.

> [@setResolution doesn't work properly on Ubuntu 22.04](https://psychtoolbox.discourse.group/t/setresolution-doesnt-work-properly-on-ubuntu-22-04/4574/4):
>
> @mariokleiner Thank you for your quick reply! Now I can change the ‘FrameRate’ of the second display (for stimulus presentation) from 60 Hz to 144 Hz, using Screen('ConfigureDisplay', 'Scanout', 1, 0, [], [], 144). And I update the PTB version to 3.0.18.

By using Screen(‘ConfigureDisplay’, ‘Scanout’,…), I was able to change the refresh rate of the stimulus presenting display, set by XOrgConfCreator.

A few weeks ago, I have noticed that the following error message after running

> oldSettings = Screen(‘ConfigureDisplay’, ‘Scanout’, 1, 0, , , 144);  
> …  
> One or more output arguments not assigned during call to “Screen”.

Without the output new setting was reflected (by running `Screen('ConfigureDisplay', 'Scanout', 1, 0, [], [], 144);`, two times).

However, since a few days ago, the refreshrate of the LCD monitor cannot be changed at all in this way.  
In fact, after running GaborDemo, the monitor refreshrate was changed from 144 Hz to 60 Hz, and when I tried to reset it to 144 Hz, it stayed at 60 Hz.  
I tried to reset the refresh rate from XOrgConfCreator to no avail.  
I tried to remove PTB3 (`sudo apt purge matlab-psychtoolbox-3`) and reinstalled it again, but I don’t think the situation has changed.

Does anyone know how to solve it?

Ubuntu 20.04.4LTS  
MATLAB 2022a  
PTB 3.0.18 13 Oct

---

<div class="post-metadata">

**Author:** ![lattice](https://yyz2.discourse-cdn.com/free1/user_avatar/psychtoolbox.discourse.group/lattice/32/381_2.png) [@lattice](https://psychtoolbox.discourse.group/u/lattice)\
**Post date:** [January 3, 2023, 5:39am UTC](https://psychtoolbox.discourse.group/t/multidisplay-setting-on-ubuntu/4761/2 "2023-01-03T05:39:17Z")

</div>

Now I found

> %oldsetting = Screen(‘Resolution’, screenNumber [, newwidth] [, newheight] [, newHz]);  
> oldsetting = Screen(‘Resolution’, 1, 1920, 1080, 144);

could return the current setting and also set the new frame rate of the stimulus displaying display (screenNumber:1)
