0

I recently installed OBS Studio under Ubuntu 20.04 LTS on my laptop (a Lenovo Thinkpad T410). While I didn't encounter any issue during the installation, I am unable to run OBS Studio itself, as I keep running into the following error:

Failed to initialize video.  Your GPU may not be supported, or your graphics drivers may need to be updated.

In order to provide you with all the necessary details, here is the complete console output of the obs command:

Attempted path: share/obs/obs-studio/locale/en-US.ini
Attempted path: /usr/share/obs/obs-studio/locale/en-US.ini
Attempted path: share/obs/obs-studio/locale.ini
Attempted path: /usr/share/obs/obs-studio/locale.ini
Attempted path: share/obs/obs-studio/locale/fr-FR.ini
Attempted path: /usr/share/obs/obs-studio/locale/fr-FR.ini
info: Using preferred locale 'fr-FR'
Attempted path: share/obs/obs-studio/themes/Dark.qss
Attempted path: /usr/share/obs/obs-studio/themes/Dark.qss
info: CPU Name: Intel(R) Core(TM) i5 CPU       M 520  @ 2.40GHz
info: CPU Speed: 1548.597MHz
info: Physical Cores: 2, Logical Cores: 4
info: Physical Memory: 3733MB Total, 228MB Free
info: Kernel Version: Linux 5.4.0-52-generic
info: Distribution: "Ubuntu" "20.04"
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.20.8
info: Portable mode: false
Attempted path: share/obs/obs-studio/themes/Dark/no_sources.svg
Attempted path: /usr/share/obs/obs-studio/themes/Dark/no_sources.svg
QMetaObject::connectSlotsByName: No matching signal for on_advAudioProps_clicked()
QMetaObject::connectSlotsByName: No matching signal for on_advAudioProps_destroyed()
QMetaObject::connectSlotsByName: No matching signal for on_actionGridMode_triggered()
QMetaObject::connectSlotsByName: No matching signal for on_program_customContextMenuRequested(QPoint)
QMetaObject::connectSlotsByName: No matching signal for on_transitionRemove_clicked()
info: OBS 26.0.2 (linux)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
    samples per sec: 48000
    speakers:        2
info: ---------------------------------
info: Initializing OpenGL...
error: X Error: GLXBadFBConfig, Major opcode: 152, Minor opcode: 34, Serial: 29
error: Failed to create OpenGL context.
error: Failed to create context!
error: device_create (GL) failed
error: Failed to initialize video.  Your GPU may not be supported, or your graphics drivers may need to be updated.
info: Freeing OBS context data
info: == Profiler Results =============================
info: run_program_init: 2009,26 ms
info:  ┣OBSApp::AppInit: 9,107 ms
info:  ┃ ┗OBSApp::InitLocale: 4,805 ms
info:  ┗OBSApp::OBSInit: 241,855 ms
info:    ┣obs_startup: 20,295 ms
info:    ┗OBSBasic::OBSInit: 54,346 ms
info:      ┣OBSBasic::InitBasicConfig: 0,672 ms
info:      ┣OBSBasic::ResetAudio: 0,257 ms
info:      ┗OBSBasic::ResetVideo: 52,276 ms
info: obs_hotkey_thread(25 ms): min=0,129 ms, median=0,325 ms, max=15,866 ms, 99th percentile=15,866 ms, 100% below 25 ms
info: audio_thread(Audio): min=0,021 ms, median=0,042 ms, max=0,086 ms, 99th percentile=0,086 ms
info: =================================================
info: == Profiler Time Between Calls ==================
info: obs_hotkey_thread(25 ms): min=25,215 ms, median=25,444 ms, max=40,983 ms, 64,4068% within ±2% of 25 ms (0% lower, 35,5932% higher)
info: =================================================
info: Number of memory leaks: 178

After searching the issue, it appears my problem is that I have a too old OpenGL version (2.1). While my GPU (integrated; my CPU being Intel i5 M520) isn't cutting-edge, it doesn't seem to be too old for OBS Studio because I also installed the same program on my Windows 10 (as my laptop is a dual boot) and I had no issue running it to capture from my webcam or from an opened window.

However, I have a hard time finding out how I can upgrade my OpenGL version under Ubuntu 20.04. My best attempt was to get a more up-to-date version of the Mesa 3D library via the kisak-mesa PPA, but while it upgraded my version of Mesa, it didn't change the OpenGL version. Here is what I get when I run the glxinfo | grep "OpenGL version" command:

OpenGL version string: 2.1 Mesa 20.2.1 - kisak-mesa PPA

On a side note, I also had a look at the Additional drivers tab in Softwares & Updates, but this tab is completely empty in my case and doesn't suggest any driver that could improve my current situation.

What could I do to this fix ? Another recent question suggests installing OBS Studio via snap, but despite trying that, I get the same issue as before.

Many thanks in advance for your help.

1 Answers1