Problem with OpenGL Drivers [Ubuntu 22.04]
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 430
- Forks
- 187
- Avg merge
- 2h 31m
- Merged PRs (30d)
- 2
Description
Hi everyone,
I am trying to install Phy on Ubuntu 22.04.1 on an AMD/ATI Mobility Radeon HD 5430 graphics card. I haven't been able to launch the GUI due to the following errors:
$ phy template-gui params.py
16:34:03.753 [W] model:655 Skipping spike waveforms that do not exist, they will be extracted on the fly from the raw data as needed.
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
libGL error: MESA-LOADER: failed to open radeonsi: /usr/lib/dri/radeonsi_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.
QGLXContext: Failed to create dummy contextglxinfo | grep "OpenGL version"
OpenGL version string: 4.6 (Compatibility Profile) Mesa 22.2.5
16:34:04.099 [W] gui:671 Could not create view TemplateFeatureView.
Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
Aborted (core dumped)`
So the main problem seems to be failure with creating an OpenGL context. I tried updating the drivers and the mesa-util package, and that got me to this error:
$ phy template-gui params.py
18:02:20.322 [W] model:655 Skipping spike waveforms that do not exist, they will be extracted on the fly from the raw data as needed.
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
libGL error: MESA-LOADER: failed to open radeonsi: /usr/lib/dri/radeonsi_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
Segmentation fault (core dumped)
I tried updating the drivers by updating the mesa-utils library (which seems to be an open-source OpenGL implementation for Linux). I also managed to locate the packages and tried setting a symbolic link and adding the path the libraries are in to the 'LD_LIBRARY_PATH', none of which worked.
I got a suggestion to force Phy to use software rendering instead of hardware acceleration:
export LIBGL_ALWAYS_SOFTWARE=1
This managed to get rid of one of the driver errors, but the other one is still a problem (and this also didn't fix the broader issue). So this is the current error I'm getting:
$ phy template-gui params.py
19:06:50.685 [W] model:655 Skipping spike waveforms that do not exist, they will be extracted on the fly from the raw data as needed.
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
Segmentation fault (core dumped)
If anyone has any suggestions on what I could try next, it would be greatly appreciated!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing phy template-gui params.py on Ubuntu 22.04 with the reported AMD/ATI Mobility Radeon HD 5430 setup, then inspect the Mesa and OpenGL environment described in the logs. No repository file or test is named; done would mean the GUI launches without the reported OpenGL context failure or segmentation fault.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, python, ubuntu
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100