-
Notifications
You must be signed in to change notification settings - Fork 756
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
Rework graphics adapter scanning to not use the Windows registry #2498
Comments
We should either revert to using the WMI interface (which is non-trivial, because we'd need to copy a lot of code that interacts with Win32/COM), or we need to find some other way to query the driver information which does not rely on the registry. |
We also need to patch Minecraft itself to no longer use the (broken) method, since it tries to enumerate the graphics adapters in the system when producing the crash report, and can fail/abort if that doesn't work. |
Regarding the point about the registry keys not getting cleaned up, we've seen ridiculous reports like the following... If you don't fully remove your graphics drivers before installing a different GPU, nothing ever gets invoked to clean up the old registry entries, and then Sodium gets confused because it sees a bunch of GPUs that are not even installed. |
Would it make sense to report this to Mojira? |
Oh wow. Maybe use some open source libs to get the gpu info? |
That library is called OSHI. It’s the one that broke. |
There is now a new graphics adapter probe implementation using D3D-KMT on Windows. This should fix the problems described in the issue... |
Fixed with 4041519...b1164fb. |
Minecraft 1.20.5 and later now use a newer version of OSHI, which changed the way that graphics adapters are enumerated on the system. Specifically, it now looks at the Windows registry under
SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}
instead of querying WMI.This has a number of problems:
DriverVersion
key) are not of an expected type, and trying to query it causes a crash at startup. (see 1.20.6 crash #2450)In general, it seems the registry is just completely unreliable and is nothing but a trainwreck to interact with. And tragically, this would be typical for anything on Windows.
The text was updated successfully, but these errors were encountered: