Stimulus wobbling on Psychopy 1.83.04 on Ubuntu 16.04 (KDE 5.5.5)

Is anyone using the same Psychopy version and Ubuntu system as I do? I am currently facing a stimulus display problem where the moving stimulus keeps jerking subtly back and forth during the course of its movement. This doesn’t happen on MATLAB on the same computer with the same kind of stimulus.

I have already set waitBlanking=False since I’m using a Linux system. I have tried updating graphics drivers as well as the latest Ubuntu updates but nothing seems to be fixing this issue.

I have also ran the timeByFrames.py script and the computer isn’t dropping any frames and is running with the correct refresh interval.

A simple script like this is enough to create the problem:-

from psychopy import visual, core

pos_x = -550
pos_y = 0
speed = 2.5
rect_width=1
rect_height=500

win =visual.Window(fullscr=True, screen = 0, allowGUI=False,
    bitsMode=None, units='pix', waitBlanking = False, winType='pyglet', monitor = 'testMonitor')
    
rect = visual.Rect(win, width=rect_width, height=rect_height, lineColor = (1,1,1), fillColor="white", pos = (pos_x,pos_y))

for x in range(500):
    pos_x = pos_x + speed
    rect.pos= (pos_x,pos_y)
    rect.draw()
    win.flip()

When I run that on my mac I certainly get smooth motion left to right. At the moment you’re trying to increment your stimulus position by fractions of a pixel, so some frames your line is exactly on a pixel and some frames it’s in between two pixels. Is that the effect you’re seeing (change your speed to be an integer?)

By the way if you paste code in the forum put it in-between three backticks to get nicely formatted python code.

1 Like

Ah alright thanks for the advice on code pasting.

Changing the speed to integer value doesn’t solve the issue however. Do you reckon this could be a graphics card issue then?

Update: I tried running the stimulus on Unity and it’s fine. Can’t quite identify the issue here. It seems to be a combination of factors 1) KDE is definitely involved here and 2) the particular build of my system. I guess I’ll stick to using unity for this testing station for now.

I am on 1.84.01 on Arch Linux with Xfce/Xfwm and also see the “flickering” with an integer speed.