{"record":{"id":"2566eaf6ab10bc04","repo":"stride3d/stride","slug":"no-compatible-screen-modes-found-after-ranking","errorCode":null,"errorMessage":"No compatible screen modes found after ranking","messagePattern":"No compatible screen modes found after ranking","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.Games/GraphicsDeviceManager.cs","lineNumber":696,"sourceCode":"                // Nothing was found; first, let's check if graphics profile was actually supported\n                // NOTE: We don't do this preemptively because in some cases it seems to take lot of time\n                //       (happened on a test machine, several seconds freeze on ID3D11Device.Release())\n                if (!IsPreferredProfileAvailable(preferredParameters.PreferredGraphicsProfile, out var availableGraphicsProfile))\n                {\n                    var notSupportedProfiles = string.Join(\", \", preferredParameters.PreferredGraphicsProfile);\n                    throw new InvalidOperationException($\"None of the graphics profiles [{notSupportedProfiles}] are supported by the Graphics Device. \" +\n                        $\"The highest available profile is [{availableGraphicsProfile}].\");\n                }\n\n                // Otherwise, there was just no screen mode\n                throw new InvalidOperationException(\"No compatible screen mode found\");\n            }\n\n            RankDevices(devices);\n\n            if (devices.Count == 0)\n            {\n                throw new InvalidOperationException(\"No compatible screen modes found after ranking\");\n            }\n            return devices[0];\n        }\n\n        /// <summary>\n        ///   Ranks a list of <see cref=\"GraphicsDeviceInformation\"/>s before creating a new Graphics Device.\n        /// </summary>\n        /// <param name=\"foundDevices\">A list of possible device configurations to be ranked and reordered.</param>\n        protected virtual void RankDevices(List<GraphicsDeviceInformation> foundDevices)\n        {\n            // Don't sort if there is a single device (mostly for XAML/UWP)\n            if (foundDevices.Count == 1)\n                return;\n\n            foundDevices.Sort(CompareDeviceInformations);\n\n            //\n            // Compares two `GraphicsDeviceInformation` instances to determine their ranking.","sourceCodeStart":678,"sourceCodeEnd":714,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Games/GraphicsDeviceManager.cs#L678-L714","documentation":"After enumerating candidate devices, FindBestDevice calls RankDevices to order them and throws if zero devices survive ranking. This means device candidates existed but none passed the ranking/compatibility filter, so no GraphicsDeviceInformation can be returned to CreateDevice.","triggerScenarios":"FindBestDevice collects devices (which pass the earlier profile check), then RankDevices filters/orders them and the resulting list is empty — e.g. all candidates rejected due to adapter/outputs constraints or conflicting device description filters.","commonSituations":"Systems with only software/null adapters, GPU adapter disabled in Device Manager, custom Ranking/DeviceFilter hooks that reject every candidate, or broken multi-GPU configurations.","solutions":["Check that the GPU adapter is enabled and functioning (Device Manager / dxdiag).","Remove or fix custom device ranking/filtering overrides that might discard all candidates.","Re-enable full device enumeration by resetting GraphicsDeviceManager settings to defaults and retrying."],"exampleFix":"// before\ngdm.DeviceCreationFlags |= DeviceCreationFlags.Debug; // custom filters reject all\ngdm.Ranking = myRankingThatFiltersEverything;\n// after\ngdm.Ranking = null; // use default ranking\n// or verify adapter before creating device","handlingStrategy":"retry","validationCode":"// ensure a functional adapter exists before running\nif (!GraphicsDevice.IsSupported) throw new PlatformNotSupportedException(\"No usable GPU adapter\");","typeGuard":null,"tryCatchPattern":"try { game.Run(); }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"after ranking\"))\n{\n    logger.LogError(ex, \"All graphics device candidates were rejected\");\n    throw;\n}","preventionTips":["Verify the GPU adapter is enabled and drivers are healthy (dxdiag).","Avoid custom Ranking/filter hooks that can reject every candidate.","Reset GraphicsDeviceManager options to defaults when diagnosing."],"tags":["graphics","gpu","device-enumeration"],"backgroundTag":"empty-result-set","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}