3

I have developed a program to play videos in psychopy using a machine with Ubuntu 16.04, a NVIDIA GPU and associated driver. The program works perfectly fine on this machine. The program is rather large but of note, it uses visual.Window(fullscr=True) which as default uses the pyglet backend and also uses visual.MovieStim3. I am now trying to run this program on a different machine with Ubuntu 18.04.1 LTS and integrated intel graphics (HD Graphics 620 (Kaby Lake GT2)) and am having problems. new machine driver info below:

  *-display                 
       description: VGA compatible controller
       product: Intel Corporation
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 02
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:128 memory:ee000000-eeffffff memory:d0000000-dfffffff ioport:f000(size=64) memory:c0000-dffff

Here is the traceback when I run the program:

Traceback (most recent call last):
  File "/home/adf/mxj719/experiments/video_sorting/video_sorting.py", line 456, in <module>
    start_sorting(av_original_csv, user, usr_csv, bonus, last_video)
  File "/home/adf/mxj719/experiments/video_sorting/video_sorting.py", line 357, in start_sorting
    win = visual.Window(fullscr=True)
  File "/home/adf/mxj719/.conda/envs/conda_psychopy/lib/python2.7/site-packages/psychopy/visual/window.py", line 375, in __init__
    self.backend = backends.getBackend(win=self, *args, **kwargs)
  File "/home/adf/mxj719/.conda/envs/conda_psychopy/lib/python2.7/site-packages/psychopy/visual/backends/__init__.py", line 32, in getBackend
    return Backend(win, *args, **kwargs)
  File "/home/adf/mxj719/.conda/envs/conda_psychopy/lib/python2.7/site-packages/psychopy/visual/backends/pygletbackend.py", line 227, in __init__
    self._origGammaRamp = self.getGammaRamp()
  File "/home/adf/mxj719/.conda/envs/conda_psychopy/lib/python2.7/site-packages/psychopy/visual/backends/pygletbackend.py", line 326, in getGammaRamp
    return getGammaRamp(self.screenID, self.xDisplay)
  File "/home/adf/mxj719/.conda/envs/conda_psychopy/lib/python2.7/site-packages/psychopy/visual/backends/gamma.py", line 120, in getGammaRamp
    rampSize = getGammaRampSize(screenID, xDisplay=xDisplay)
  File "/home/adf/mxj719/.conda/envs/conda_psychopy/lib/python2.7/site-packages/psychopy/visual/backends/gamma.py", line 285, in getGammaRampSize
    raise RuntimeError("Gamma ramp size is reported as 0.")
RuntimeError: Gamma ramp size is reported as 0.
Segmentation fault

This is a common problem it seems: https://discourse.psychopy.org/t/gamma-problem-in-v1-90-2/4549

But each solution involves either switching the visual.Window type to pygame (which is now archaic for psychopy) or glfw (which is not a simple setup and is very new and not well documented). I would like a solution that allows me to continue using pyglet.

Another solution given involves ensuring that xf86-video-intel is installed to give a sensible LUT size, I have tried this and it seems that this driver is installed as default on Ubuntu 18, so this does not work for me.

Someone else mentions that I could comment out the RuntimeError in the source code but I could not find those lines of code where they pointed it out. (/usr/lib/python2.7/dist-packages/psychopy/visual/backends/gamma.py).

Please also note that I have tried both the python2.7 and python3.5 psychopy install instructions with anaconda as outlined here: http://psychopy.org/installation.html

  • 1
    I humbly recommend you post a link to this in the issue tracker of both Pyglet and psychopy. Because it's most likely a integration issue with a formula or w/e you're working on. – Torxed Nov 22 '18 at 17:21
  • @Torxed thanks, I will post this on the github issues page. – MichaelAndroidNewbie Nov 28 '18 at 14:49

1 Answers1

2

Another solution given involves ensuring that xf86-video-intel is installed to give a sensible LUT size, I have tried this and it seems that this driver is installed as default on Ubuntu 18, so this does not work for me.

You might need to set the driver in a configuration file. To do this, edit your /etc/X11/xorg.conf.d/20-intel.conf file (or create it if it does not exist) to contain the following lines:

Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
EndSection
S.A.
  • 1,222
  • 1
  • 16
  • 33