cemu-project / Cemu

Cemu - Wii U emulator
https://cemu.info
Mozilla Public License 2.0
6.65k stars 518 forks source link

Vulkan error -4 upon launching a game #1111

Closed Golem642 closed 4 months ago

Golem642 commented 4 months ago

Current Behavior

When launching a game, i get the error "Error while initializing the Vulkan renderer : Unable to create a logical device : -4"

Expected Behavior

The game should launch normally

Steps to Reproduce

Open Cemu Go to general settings > graphics Set the renderer to Vulkan (my current config is detailed in the emulation settings) Close and open a game The error will pop up (although only for me somehow no one else have this error)

System Info (Optional)

OS: Windows 10 22H2 GPU: Intel® Iris® Xe Graphics

Emulation Settings (Optional)

Renderer : Vulkan Graphic card : Intel® Iris® Xe Graphics Vsync : None Upscale : Bicubic Downscale : Bilinear Fullscreen scaling : keep ratio

Logs (Optional)

Somehow Cemu doesn't create logs ??? No file is created in the Cemu folder (yes i am in the correct folder), i checked my antivirus protection and it is allowed to do anything so idk

Golem642 commented 4 months ago

I talked about this in the Discord server, and we already tried a few things which includes :

None of these worked in the end and i'm still stuck with the error. A thing to note is that it worked before for like a month or two, and then it started giving me this error everytime. I have tried using older versions of the software, nothing changes. I don't know what to do anymore

Exzap commented 4 months ago

Error -4 means VK_ERROR_DEVICE_LOST which usually indicates something akin to a driver crash, but it can basically be anything. Which game are you trying to run? Did you a try a different one? Also, is OpenGL working?

Golem642 commented 4 months ago

OpenGL works but it devours my GPU + it lags more than Vulkan. And i think that nothing works in general, i only have 2 things : the friend list and Splatoon. None of those work, same error

Exzap commented 4 months ago

What you can do to help us troubleshoot this: 1) Install the latest VulkanSDK from https://vulkan.lunarg.com/sdk/home#windows (Click on "Latest SDK" or the link under "SDK installer") 2) Restart your PC 3) Launch Cemu and in the menu enable Debug -> Logging -> Vulkan Validation Layer 4) Now run the game 5) Upload log.txt (if it still doesn't create it, check write permissions or create a new folder for Cemu)

Golem642 commented 4 months ago

I just finished installing the SDK (haven't restarted yet), i didn't check any optional things besides the "launch configurator" thingy at the end. When it opened, I got errors and new info now image image image

Golem642 commented 4 months ago

Ok, i just restarted my computer and enabled Vulkan validation layer logs. The game still crashes with -4, and the only log there is was when i just tried before with setting the renderer to OpenGL. Which proves it can make logs, but somehow it doesn't want to when it crashes with Vulkan

Exzap commented 4 months ago

You seem to have at least two programs installed that hook into Vulkan and could cause the device crash. Try to uninstall Reshade and if that doesn't fix it, then uninstall Twitch Studio also. You can always reinstall it later, this is just so we can narrow it down and figure out what causes the crash.

Golem642 commented 4 months ago

Ok thank you so much, that was the problem (i had to uninstall both). I don't know why Cemu can't start if a layer manifest is wrong (even if it's not his), because Vulkan configurator seems to be able to ignore them, but it's a problem. I don't know if that can be fixed, but at least i know now thanks

Exzap commented 4 months ago

This is a configuration problem or a bug in those layers since it fails even before Cemu does anything with Vulkan beyond basic initialization. It's kinda outside of our control and I am not sure how we would workaround this, or if we even could. But glad you resolved it.

Squall-Leonhart commented 4 months ago

That Twitch layer has been deprecated and removed from current installs of Twitch Studio, it is no longer supported and needs to be removed manually as the twitch studio uninstaller does not remove it(It does if you're still using a twitch studio version that actually installed the overlay, not if you've updated since to one that doesn't), rather than go through the motions here in comments, you can look at this thread.

https://forums.guru3d.com/threads/crash-0xc0000005-3221225477-in-red-dead-redemption-2-solution-found.445927/

Reshade is not the issue, its twitchoverlay 100% which has never been updated for compliance with VK 1.2+.