-
Notifications
You must be signed in to change notification settings - Fork 901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ubuntu visual.Window() crashes with pyglet on XF86VidModeGetGammaRamp #2061
Comments
Mine used to just silently fail when the size of the gamma ramp was reported as 0 - it looks like we might need to do more to allow it to 'work' in this situation. Can you post |
Sure thing: Xorg.0.log |
I might be reading it wrong, but it seems like it using the 'modesetting' driver (which now supports gamma, but didn't somewhat recently) rather than the intel driver. Can you explictly set the driver in an xorg conf and see if that changes anything? |
Any hints on how to do that? I've always been pretty mystified by X configuration files. |
I think it should be enough to put the following in
|
Maybe his system is reporting 0, but is actually 1024, while we're reverting to a default of 256? Should we try and work out if any call to GetGammaRamp would have worked? Kodi, you could try hard-coding the rampSize to be 1024 in psychopy/psychopy/visual/backends/gamma.py Line 147 in 30066a5
|
Worth a try. My guess is that it is due to the use of the modesetting driver in combination with an older version of xorg-server that doesn't have full gamma support (Mario Kleiner has some potentially relevant commits in February, after the release of the version used here) - but that's just a guess. |
@djmannion Adding that configuration file fixed the problem. Thanks! It's pretty dumb that the package that's supposed to update your graphics drivers doesn't actually do that without more configuration. |
@peircej That unfortunately doesn't seem to change anything, but adding |
Great! By 'fixed', do you mean that gamma can be changed and no warnings are emitted? Or that it runs without crashing but with warnings and no gamma functionality? |
|
I was having the same problem on The suggestion given above worked for me as well.
My specifications:
|
Leading numbers like those are used to control the order in which configuration files are read or scripts are run. |
I also had this issue, with psychopy 3.0.0, python 3.6.0, and Ubuntu 18.04, on a new laptop with integrated Intel graphics and an NVIDIA GPU. Updating my drivers, adding the |
I'm having the same issue with PsychoPy 3.0.4 on Arch Linux, Wayland, and an NVIDIA GPU (using the proprietary |
That setup should work fine - it is pretty much what I use, except for the Wayland aspect. I haven't come across any reports of Wayland being used. The Arch wiki seems to suggest that gamma handling is different under Wayland. |
You're right, everything works when I switch to Xorg. |
Try using the 'glfw' backend, I believe it supports Wayland. |
Yes, I have to use |
I changed the value of rampSize to 1024, however it did not work for me. |
I do not know very well what is xorg, however I got the option to start Gnome xorg in my ubuntu, I decided to try that and it worked. Thanks for the comments above. |
Hi, in my case with Kubuntu 18.04 on KDE (Plasma 5.15.3), Python 3.7.2, PsychoPy 3.0.6 none of the above suggestions worked, i.e. I am still getting the I followed all steps mentioned in #2082. I tried both hard-coding the Output of Here my Xorg.0.log Thanks Update: Commenting out the lines if not `success:`
raise AssertionError('XF86VidModeGetGammaRamp failed') or using |
Your
It looks like you would need to install the intel graphics drivers, to get the pyglet solution to work. |
Oops, yes, that is indeed correct. Thanks! |
So, conceivably we could write the intel.conf file for the user with something like the below. It doesn't quite solve the problem because they'd still need to restart the machine, but it might help? import subprocess as sp
from askpass import AskPass
folder = "/etc/X11/xorg.conf.d"
filename = "/etc/X11/xorg.conf.d/20-intel.conf"
localfile = 'intel.conf'
prompt=("Intel card needs a config file installing. "
"Please insert an admin password to continue")
with AskPass(prompt=prompt, timeout=30) as ask:
success = False
for psswd in ask:
try:
proc = sp.Popen(["echo {} | sudo -S mkdir -p '{}'"
.format(psswd, folder)],
shell=True, stdout=sp.PIPE, stderr=sp.PIPE)
output, error=proc.communicate(timeout=0.5)
assert not proc.returncode
fullCmd = ('echo {} | sudo -S cp {} {}'
.format(psswd, localfile, filename))
proc = sp.Popen([fullCmd],
shell=True, stdout=sp.PIPE, stderr=sp.PIPE)
output, error=proc.communicate(timeout=0.5)
assert not proc.returncode
logging.info("Created intel.conf")
success = True
break
except AssertionError as e:
# what went wrong?
print(output.decode('utf-8'))
print(error.decode('utf-8'))
except sp.TimeoutExpired as e:
logging.info('Bad password')
else:
print("Failed to create intel.conf")
``` |
I had a problem of psychopy silently crashing without any error outputs. Even after trying out the solution of creation |
On PsychoPy 30066a5, Python 3.6.6, and Ubuntu 18.04, having just updated my Intel graphics drivers via the PPA at https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers, running
crashes with
I've seen this kind of thing previously on Windows, and #1982 (now closed) is likely related. My old workaround for this was to downgrade PsychoPy to 1.85.3, but I'm trying to upgrade my task program to Python 3 now that Python 2 is finally in its twilight years, and PsychoPy 1.85.3 doesn't support Python 3.
I've also looked at the pygame and glfw backends. However, pygame seems to be buggy (my stimuli are placed oddly) and glfw seems not to be feature-complete yet (
psychopy.event.Mouse()
crashes).The text was updated successfully, but these errors were encountered: