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

Crashing with NVIDIA Drivers version 536.23 #1816

Closed
BluebirdYT opened this issue Jun 15, 2023 · 14 comments
Closed

Crashing with NVIDIA Drivers version 536.23 #1816

BluebirdYT opened this issue Jun 15, 2023 · 14 comments
Labels
A-drivers Area: Driver compatibility R-has-workaround Resolution: Has workaround S-confirmed Status: Confirmed T-native Type: Native crash
Milestone

Comments

@BluebirdYT
Copy link

BluebirdYT commented Jun 15, 2023

Version information

sodium-fabric-mc1.20-0.4.10+build.27

Reproduction Steps

  1. Hold down f3+a for 3-10 seconds
  2. The game crashes

Crash Report file

Crash Report:
[Removed to protect personal info]

Latest Log:
latest.log

Additional information

I have recently updated my NVIDIA Drivers to version 536.23 and started crashing a lot. I had no crashes before I updated and now I am experiencing so many. I just randomly crash when switching servers and holding f3+a down for a while. These are the two most common crashes I get. This crash also started to happen in versions 1.19.2-1.20 (The ones I've tested so far) while previously 1.19.2-1.20 were not crashing.

@BluebirdYT BluebirdYT added S-needs-triage Status: Needs triage T-crash Type: Crash or hang labels Jun 15, 2023
@pajicadvance pajicadvance added A-drivers Area: Driver compatibility T-native Type: Native crash T-crash Type: Crash or hang and removed T-crash Type: Crash or hang S-needs-triage Status: Needs triage labels Jun 15, 2023
@jellysquid3
Copy link
Member

jellysquid3 commented Jun 21, 2023

The workaround introduced by #1486 is no longer working, since it seems NVIDIA changed the application detection logic for Minecraft. Unfortunately, it's very hard for us to workaround, because they're checking the command line arguments of the process for the string net.minecraft.client.main.Main (with one space on each side of the string), and then installing a DRS profile with Threaded Optimization and some other things enabled, which are unstable and cause crashes.

@jellysquid3
Copy link
Member

You can workaround this issue by using Prism Launcher instead of the vanilla launcher. This prevents the NVIDIA drivers from detecting Minecraft, but it results in reduced performance as their optimization can no longer take effect. The reason why Prism Launcher is not affected comes down to the fact that it doesn't pass -DFabricMcEmu= net.minecraft.client.main.Main as a JVM argument, which the NVIDIA drivers are looking for.

We'll have to look into whether we can implement some additional NVIDIA-specific optimizations in Sodium in order to make up for this difference.

@RealmKebab
Copy link

Prism launcher actually works in this case, it no longer crashes.

@ColonelGerdauf

This comment was marked as abuse.

@jellysquid3
Copy link
Member

It seems to be the same set of OpenGL optimizations, though figuring out what exactly they're doing is difficult. The only thing that has obviously changed is the way it detects whether the optimization should be applied.

@ColonelGerdauf

This comment was marked as abuse.

@jellysquid3
Copy link
Member

We have an issue for tracking the performance issues on NVIDIA as well (see #1830.) The discussion would be better suited there.

@jellysquid3
Copy link
Member

I've spent some time looking into what the driver is doing, and I don't think there is any way for us to workaround this without egregious hacks. The current running theory is that we can try hooking into the Win32 function GetCommandLineW and strip the process command line, so that when the NVIDIA driver queries it on OpenGL context creation, it is unable to detect the presence of Minecraft.

Either that, or we will block all NVIDIA users from using Sodium, because they cannot stop breaking our mod...

@FeldrinH
Copy link

Is there something we as users can do to advance this issue on Nvidia's side? Some public issue to upvote? How can we let Nvidia know that this issue exists and is affecting us?

@jellysquid3
Copy link
Member

We already tried to generate a lot of noise by giving every NVIDIA user a pop-up warning on game startup, which asked that they submit a bug report. A NVIDIA representative said they were aware of the issue, and that a bug had been filed internally, but we have not heard anything since. Fast forwarding to now, they have changed the process detection to be much more difficult to dodge, and it's still been radio silence.

This is the same issue we've ran into when reporting bugs to AMD's engineers. We make phone calls even, and something get raised "internally" and then we never hear back again.

I just don't think we register on the radar of these companies. Getting these issues fixed never works out.

@jellysquid3
Copy link
Member

We've implemented some exceedingly terrible workarounds in Sodium to try and solve this problem. The initial user reports suggest that all crashes have been fixed, micro-stutter is significantly reduced, and that frame rates are (on average) improved by 50% to 250%.

@jellysquid3 jellysquid3 added this to the Sodium 0.5 milestone Jul 5, 2023
@jellysquid3 jellysquid3 added R-has-workaround Resolution: Has workaround R-pending-release Resolution: Pending release labels Jul 5, 2023
@Ry-315
Copy link

Ry-315 commented Jul 5, 2023

Shouldn't the previous workaround be scrapped if it doesn't work?

@jellysquid3
Copy link
Member

Fixed in Sodium 0.5.0.

@Ramezsushi
Copy link

Weird, I have not updated to sodium 0.5.0 but I noticed it stopped crashing recently, I haven't changed anything & I am using 531.79, which released may 2nd, does the sodium fix apply to previous versions in some way? (I am using the latest 1.19.2 build on modrinth, yes im a bit outdated lol)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-drivers Area: Driver compatibility R-has-workaround Resolution: Has workaround S-confirmed Status: Confirmed T-native Type: Native crash
Development

No branches or pull requests

8 participants