How do you overcome the “RuntimeError: Gamma ramp size is reported as 0.” without changing the window...












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










share|improve this question




















  • 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
















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










share|improve this question




















  • 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














3












3








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










share|improve this question
















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







pygame driver glfw pyglet psychopy






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 16 '18 at 15:43







MichaelAndroidNewbie

















asked Nov 16 '18 at 15:26









MichaelAndroidNewbieMichaelAndroidNewbie

150219




150219








  • 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





    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




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





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





@Torxed thanks, I will post this on the github issues page.

– MichaelAndroidNewbie
Nov 28 '18 at 14:49












1 Answer
1






active

oldest

votes


















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





share|improve this answer


























  • Thanks but unfortunately this did not work. I still get the same error.

    – MichaelAndroidNewbie
    Nov 28 '18 at 14:48











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53340798%2fhow-do-you-overcome-the-runtimeerror-gamma-ramp-size-is-reported-as-0-withou%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









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





share|improve this answer


























  • Thanks but unfortunately this did not work. I still get the same error.

    – MichaelAndroidNewbie
    Nov 28 '18 at 14:48
















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





share|improve this answer


























  • Thanks but unfortunately this did not work. I still get the same error.

    – MichaelAndroidNewbie
    Nov 28 '18 at 14:48














2












2








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





share|improve this answer
















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






share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 27 '18 at 13:26









S.A.

469618




469618










answered Nov 24 '18 at 8:29









Damien MannionDamien Mannion

212




212













  • Thanks but unfortunately this did not work. I still get the same error.

    – MichaelAndroidNewbie
    Nov 28 '18 at 14:48



















  • Thanks but unfortunately this did not work. I still get the same error.

    – MichaelAndroidNewbie
    Nov 28 '18 at 14:48

















Thanks but unfortunately this did not work. I still get the same error.

– MichaelAndroidNewbie
Nov 28 '18 at 14:48





Thanks but unfortunately this did not work. I still get the same error.

– MichaelAndroidNewbie
Nov 28 '18 at 14:48


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53340798%2fhow-do-you-overcome-the-runtimeerror-gamma-ramp-size-is-reported-as-0-withou%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Tangent Lines Diagram Along Smooth Curve

Yusuf al-Mu'taman ibn Hud

Zucchini