Skip to content

Failed to create OpenGL context: Error { raw_code: Some(12297), raw_os_message: None, kind: BadMatch } #2068

Closed

Description

@volfyd

Describe the bug

Neovide panics on startup.

To Reproduce
Steps to reproduce the behavior:

  1. Run neovide, nothing visible happens.
  2. A file neovide_backtraces.log was created with these contents
2023-10-06 19:18:17 - Neovide panicked with the message 'Failed to create OpenGL context: Error { raw_code: Some(12297), raw_os_message: None, kind: BadMatch }'. (File: src/renderer/opengl.rs; Line: 101, Column: 10)
   0: neovide::main::{{closure}}
   1: std::panicking::rust_panic_with_hook
   2: std::panicking::begin_panic_handler::{{closure}}
   3: std::sys_common::backtrace::__rust_end_short_backtrace
   4: rust_begin_unwind
   5: core::panicking::panic_fmt
   6: core::result::unwrap_failed
   7: neovide::renderer::opengl::build_context
   8: neovide::window::window_wrapper::WinitWindowWrapper::new
   9: neovide::window::create_window
  10: neovide::main
  11: std::sys_common::backtrace::__rust_begin_short_backtrace
  12: main
  13: __libc_start_call_main
  14: __libc_start_main@GLIBC_2.17
  15: _start

Expected behavior
Neovide starts

Screenshots
No window to screenshot

Desktop (please complete the following information):

Please run neovide --log and paste the contents of the .log file created in the current directory here:

TRACE [neovide] Neovide version: 0.11.2
DEBUG [neovide::bridge::command] Starting neovim with: Command { std: "/home/lhuhn/.nix-profile/bin/nvim" "--embed" "-p", kill_on_drop: false }

Additional context

  1. I have tried different versions of Mesa with no success.
  2. I have tried both UTM and a brew version of QEmu (with the idea that their 3d acceleration might be different). There is no difference.
  3. Version 0.10.4 worked fine

Activity

  1. volfyd commented on Oct 8, 2023

    @volfyd
    Author

    I tried starting neovide without Wayland:

    $ WAYLAND_DISPLAY= neovide --nofork
    Neovide panicked with the message 'Failed to create OpenGL context: Error { raw_code: Some(167), raw_os_message: Some("GLXBadFBConfig"), kind: BadConfig }'. (File: src/renderer/opengl.rs; Line: 101, Column: 10)
    This is a bug and we would love for it to be reported to https://github.com/neovide/neovide/issues
    
    Backtrace saved to neovide_backtraces.log!
    

    Reading up on GLXBadFBConfig:

    https://stackoverflow.com/questions/65531911/glx-context-creation-error-glxbadfbconfig

    It is possibly related to the supported version of OpenGL in the VM.

    $ glxinfo | grep -e "OpenGL version"                          
    
    OpenGL version string: 2.1 Mesa 23.1.7
    

    Here is an explanation of why UTM doesn't support higher (would also apply to other version of qemu on MacOS):

    utmapp/UTM#4285

    So I guess neovide 11 needs a higher version of OpenGL?

  2. fredizzimo commented on Oct 9, 2023

    @fredizzimo
    Contributor

    Yes, it currently requires OpenGL 3.3. Not necessarily because it really needs it, but because it was chosen as a "safe" value, being over 10 years old and released in 2010.

    This can be changed, see the discussion here #2008. But we need to decide if we want to use an older version for everyone or if we detect it somehow.

  3. volfyd commented on Oct 10, 2023

    @volfyd
    Author

    Oh this is a lot easier than I thought. I can confirm that

    MESA_GL_VERSION_OVERRIDE=3.3 MESA_GLSL_VERSION_OVERRIDE=330 neovide
    

    runs properly.

  4. fredizzimo commented on Oct 12, 2023

    @fredizzimo
    Contributor

    I will leave this open, since we need a better error message, and at least document the workaround.

  5. Kethku commented on Nov 8, 2023

    @Kethku
    Member

    I've seen some projects create a list of known errors we match against with pointers to issues or with more helpful suggestions than just the error alone would provide. Maybe we could update the panic hook to do this in a centralized way? Might be worth it for some of these more configuration dependent kinds of bugs.

    On the other hand it seems reasonable to me to just create an entry in the faq and leave it at that

  6. added this to the 0.15.0 milestone on Jan 11, 2025
  7. modified the milestones: 0.15.0, 0.16.0 on Mar 22, 2025
  8. last-partizan commented on Jan 22, 2026

    @last-partizan
    Contributor

    I am now proud owner or Radxa Rock 5b+ board, as my daily driver, and I'm amazed that this shit works :)

    I'll take my time to read related issues, and I think

    This can be changed, see the discussion here #2008. But we need to decide if we want to use an older version for everyone or if we detect it somehow.

    Doing that detection thing is pretty good idea, I'll play around and see if it works :)

    If someone has better ideas, let me know!

  9. falcucci commented on Jan 23, 2026

    @falcucci
    Member

    it seems that the workaround is simple and proven, so am at least adding a faq about it

    @last-partizan feel free to continue to play around with it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions