Skip to content
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

[OSX] Vulkan support is either not configured in SDL or not available in current SDL video driver (cocoa) or platform #368

Closed
benwainwright opened this issue Sep 26, 2020 · 36 comments
Labels
bug Something isn't working

Comments

@benwainwright
Copy link

Tried to run and got this:

Ignored client type property: "methods"
Ignored client type property: "attributes"
Ignored style attribute: "standout"
thread 'main' panicked at 'Failed to create window: SdlError("Vulkan support is either not configured in SDL or not available in current SDL video driver (cocoa) or platform")', src/window/sdl2.rs:132:14
stack backtrace:
   0:        0x10e7a5135 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h24bb64d98a7e25d6
   1:        0x10e71d82c - core::fmt::write::h8fdc9cddb01cd8b2
   2:        0x10e7a4749 - std::io::Write::write_fmt::hcc3030013983bab6
   3:        0x10e7a4105 - std::panicking::default_hook::{{closure}}::h95817712c5ff0736
   4:        0x10e7a3852 - std::panicking::rust_panic_with_hook::haf571858f996ac45
   5:        0x10e7a7dda - rust_begin_unwind
   6:        0x10ece507f - core::panicking::panic_fmt::h11676ba6a846d9f4
   7:        0x10ece55e5 - core::option::expect_none_failed::h312e48bacb63d8ec
   8:        0x10e6f1c6b - neovide::window::window_wrapper::ui_loop::h0723425ccd7c2cf4
   9:        0x10e6b89ac - neovide::main::hb205e48d6028f98e
  10:        0x10e7b65f6 - std::sys_common::backtrace::__rust_begin_short_backtrace::hd67e5532c4fc3d97
  11:        0x10e6b7712 - main
@benwainwright benwainwright changed the title Vulkan support is either not configured in SDL or not available in current SDL video driver (cocoa) or platform [OSX] Vulkan support is either not configured in SDL or not available in current SDL video driver (cocoa) or platform Sep 26, 2020
@j4qfrost
Copy link
Collaborator

j4qfrost commented Sep 26, 2020 via email

@benwainwright
Copy link
Author

Yup

@benwainwright
Copy link
Author

benwainwright commented Sep 26, 2020

Just did a quick sanity check on that

image

@j4qfrost
Copy link
Collaborator

Is this the first time you tried building it, and did you just install vulkan or was it on your system beforehand?

@benwainwright
Copy link
Author

  1. Yes
  2. Installed it specifically for this - never heard of it before today

@j4qfrost
Copy link
Collaborator

Have you rebooted your computer?

@Kethku Kethku added the bug Something isn't working label Sep 27, 2020
@benwainwright
Copy link
Author

Yes

@j4qfrost
Copy link
Collaborator

Try cargo run --no-default-features --features=winit If that works, then you might need to reinstall SDL. You could also just continue using the winit version, but that doesn't have regular support.

@benwainwright
Copy link
Author

Ok cargo run --no-default-features --features=winit works.

I did brew reinstall SDL2 and it had no impact on running the actual binary.

@j4qfrost
Copy link
Collaborator

Sorry, I don't remember running into this issue myself. I can just shoot some guesses at you. I assume you have Xcode installed? Also what version of OSX are you on?

@benwainwright
Copy link
Author

I do have Xcode installed.

Version 10.14.6 (18G103)

@j4qfrost
Copy link
Collaborator

Have you run SDL with anything else? If not try the lazyfoo examples:

# Clone the repository
git clone https://github.com/gldraphael/LazyFoo.git
# Go to the 4th tutorial ...
cd LazyFoo/4
# ... and build it
make
# Run the executable
./a.out

@benwainwright
Copy link
Author

I just tried that and it worked fine

@j4qfrost
Copy link
Collaborator

This won't narrow it down, but here is an issue that might help. #301
A reference for installing vulkan, because it's actually a bit unstable on Macs https://vulkan.lunarg.com/doc/sdk/1.2.148.1/mac/getting_started.html

You might find that you have to upgrade to 10.15

@benwainwright
Copy link
Author

Thanks, I'll have a look through that page tomorrow.

You might find that you have to upgrade to 10.15

Sadly this isn't an option for me. It's a corporate laptop and OS upgrades have to be the approved builds that come from IT, which will only install on the office network. As you can imagine, I'm not likely to return to the office for a while.

@aclysma
Copy link

aclysma commented Sep 29, 2020

This sounds suspiciously like this: Rust-SDL2/rust-sdl2#1030

Easy way to check is to run this command: cargo update --package sdl2-sys --precise 0.34.2 and then see if neovide can run after that.

EDIT sdl2-sys, not sdl2

  • One of my recent changes to skulpin was to not initialize the vulkan subsystem which would fix this
  • And the real fix is merged but not published in the sdl2-rs tree

BTW, there is an open issue with the windows "bundled" builds: Rust-SDL2/rust-sdl2#1029

It might make sense to pin neovide to 0.34.2 exactly until both the macOS and windows fixes are published.

@jsosulski
Copy link
Contributor

Not sure it this is related, but I had some issues with getting neovide to run on my Kubuntu 20.04 machine. The culprit was that my processor is quite old (Haswell architecture) and 'Haswell Vulkan support is incomplete'. According to wikipedia Broadwell architectures have the identical Vulkan support, i.e. probably the same issues.

@benwainwright
Copy link
Author

Easy way to check is to run this command: cargo update --package sdl2 --precise 0.34.2 and then see if neovide can run after that.

Tried that, then I ran cargo build --release, but when I run the produced executable I still get the same error :(

@j4qfrost
Copy link
Collaborator

@jsosulski not sure vulkan support is the issue. It looks like the winit features are working fine on his machine. It specifically has to do with vulkan/sdl interop on his machine. Not sure where to go at this point with debugging.

@aclysma
Copy link

aclysma commented Sep 29, 2020

You get that error message if sdl2 is compiled without metal support. The bug I mentioned before was that the bundled build script incorrectly believed metal was not available on the platform and stripped both metal and vulkan out of the build. You can dig around in the target folder for CMake build logs of sdl2 (assuming bundled feature is being used) to troubleshoot further.

@aclysma
Copy link

aclysma commented Sep 29, 2020

Also the recent changes in skulpin no longer require SDL2 to activate the vulkan rendering system at all so would likely work around this.

@aclysma
Copy link

aclysma commented Sep 30, 2020

Hey I just realized my earlier comment was incorrect. You would need to downgrade sdl2-sys, not sdl2.

Could you try:
cargo update --package sdl2-sys --precise 0.34.2

@j4qfrost
Copy link
Collaborator

Wouldn't that effectively be the same with regard to this issue?

@xiaochuanyu
Copy link

I got a brand new laptop with OSX 10.15.6 (19G73) and ran into the same error trying to install from source.
It worked after doing the following following @aclysma's advice above:

  1. I updated sdl2-sys version to 0.34.2 in Cargo.toml.
  2. cargo update --package sdl2-sys --precise 0.34.2

@j4qfrost
Copy link
Collaborator

j4qfrost commented Oct 7, 2020

@benwainwright Can you check that @aclysma's suggestion works for you also? If so, I'll rollback the sdl2-sys version for exclusively Macs.

@TENX-S
Copy link

TENX-S commented Oct 7, 2020

I got a brand new laptop with OSX 10.15.6 (19G73) and ran into the same error trying to install from source.
It worked after doing the following following @aclysma's advice above:

1. I updated `sdl2-sys` version to `0.34.2` in `Cargo.toml`.

2. `cargo update --package sdl2-sys --precise 0.34.2`

It works to me also (macOS 10.15.7)

j4qfrost added a commit that referenced this issue Oct 7, 2020
@j4qfrost
Copy link
Collaborator

j4qfrost commented Oct 7, 2020

#372 This should fix it. Note, I will be keeping my eye on rust-sdl2 and update it as fixes come. Sorry for the slow response. I have been distracted by another project.

@j4qfrost j4qfrost closed this as completed Oct 7, 2020
@j4qfrost
Copy link
Collaborator

j4qfrost commented Oct 7, 2020

@Kethku I seem to have introduced an issue for the Windows workflow build. Going to need to build on a local Windows machine to see if I broke anything for the end user. The CI builds are supposed to be using 0.34.2 now like on my machine, but I'm not sure what's going on with the cargo file. I'll open up another issue to investigate this tomorrow.

@Kethku
Copy link
Member

Kethku commented Oct 7, 2020

Is it the link issue?

@j4qfrost
Copy link
Collaborator

j4qfrost commented Oct 7, 2020

Nope just figured it out. It was my ignorance about how the package system worked. I had though that using version in conjunction with git would grab the version from the repo. The reason why my build worked was that I was overriding sys with master which included the fix by alcysma. So instead of rolling back I inadvertently pushed forward. That's enough embarrassment for one night. Going to push out one final change.

@benwainwright
Copy link
Author

Will have a look this morning, thanks

@suzanshakya
Copy link

I got a brand new laptop with OSX 10.15.6 (19G73) and ran into the same error trying to install from source.
It worked after doing the following following @aclysma's advice above:

1. I updated `sdl2-sys` version to `0.34.2` in `Cargo.toml`.

2. `cargo update --package sdl2-sys --precise 0.34.2`

Thanks!
This works even on M1 Macbook!

@Kethku
Copy link
Member

Kethku commented Jan 10, 2021

@suzanshakya so do you have neovide working on an m1 mac? There is an open issue saying somebody else is having troubles with it. Could you give some details about what steps were necessary?

@piyush1104
Copy link

piyush1104 commented Jan 16, 2021

I got a brand new laptop with OSX 10.15.6 (19G73) and ran into the same error trying to install from source.
It worked after doing the following following @aclysma's advice above:

  1. I updated sdl2-sys version to 0.34.2 in Cargo.toml.
  2. cargo update --package sdl2-sys --precise 0.34.2

I had the same error but this solved it. Thanks!

But for some reason, I have two windows opened everytime I run ./neovide.

@NickSchimek
Copy link

woohoo! - this solution worked for me as well. I've been using neovide for about 6 months and have been loving it. Thank you!

I had compiled neovide without issue 6 months ago, and ran into this same issue today when I pulled down the latest and greatest. I'm on 10.15.7

and yup. the following worked

1. I updated sdl2-sys version to 0.34.2 in Cargo.toml.
2. cargo update --package sdl2-sys --precise 0.34.2

Do you think this is something that should be added to the install docs? or perhaps downgrade sdl2-sys on the repo src?

@Kethku
Copy link
Member

Kethku commented Jan 27, 2021

@NickSchimek glad you got up and running. Could you pull the relevant parts of this issue into a separate issue so that I can address it directly? THis feels unrelated to the parent issue, but has been pointed to as unblocking other folks as shown by the references

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants