mouse.setPos(newPos=(0,0)) not working in Ubuntu 22.04.4

OS (e.g. Win10): Ubuntu 22.04.4
PsychoPy version (e.g. 1.84.x): 2024.2.0
What are you trying to achieve?:

I am trying to have the mouse position reset to a dock at the beginning of a trial. I’ve put together a minimal example and attached that here. At the start of the second routine a code chunk should run the following at “Begin Routine” to center the mouse.

mouse2.setPos(newPos=(0, 0))

There is no error or crash. It simply does not change the mouse position. There is a warning regarding windowed v. fullscreen, but changing to full screen in run mode doesn’t seem to change anything.

What did you try to make it work?:

I’ve tried running getPos() in several places in the code (still appears but commented out) to make sure that it is able to get input from the mouse and interact properly, and that works fine.

I’ve also tried moving setPos around in the routine (tried frame by frame to just lock it). I’ve also tried [0,0]. No luck, although I didn’t expect much.

This also runs properly on Mac Sonoma 14.5. It makes me think this is an OS issue interacting with Python/PsychoPy.

Any insights or ideas? Thanks!
end_test_legacy.psyexp (21.1 KB)