Minecraft runs smoothly on Windows but crashing in Ubuntu 20.04

Hi and according to the title it crashes and the error is

glfw error 65543: Failed to create context: GLXBadFBConfig.
Please update your drivers. (see aka.ms/minecraft for more instructions)

If any more information is required please comment me and i will provide it.

My inbuilt VGA controller:

00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09) (prog-if 00 [VGA controller])
        Subsystem: Gigabyte Technology Co., Ltd Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller
        Flags: bus master, fast devsel, latency 0, IRQ 28
        Memory at f7800000 (64-bit, non-prefetchable) [size=4M]
        Memory at e0000000 (64-bit, prefetchable) [size=256M]
        I/O ports at f000 [size=64]
        Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
        Capabilities: <access denied>
        Kernel driver in use: i915
        Kernel modules: i915

And I don't have any graphics card.


Solution 1:

The following information comes from this Minecraft's blog tutorial. The error has been around and a solution was found by the "expert nerd" Nachitus, all credits to this person.

Quoting:

GLFW error 65543: GLX: Failed to create context: GLXBadFBConfig. Is an error that happens specially when you're trying to load Minecraft with Optifine in 1.17.1. The cause of this error is that this Optifine version needs OpenGL 4.3 to create a context apparently called "GLXBadFBConfig". (...) Yes, for some reason this error usually happens on Linux and not on Windows.

Workaround:

MESA_GL_VERSION_OVERRIDE=4.3

to temporarily override the OpenGL version variable. Then run it with

MESA_GL_VERSION_OVERRIDE=4.3 (your minecraft executable)

or if Java then

MESA_GL_VERSION_OVERRIDE=4.3 java -jar (your minecraft executable)

The example given below is for the Fénix Launcher:

MESA_GL_VERSION_OVERRIDE=4.3 java -jar LauncherFenix-Minecraft-v7.jar