What this error means
You're seeing 0XC026234A (ERROR_GRAPHICS_MODE_NOT_IN_MODESET). This one's common when you plug in a secondary monitor, change the refresh rate to something unusual, or launch a game that tries to switch to a custom resolution. I've seen it on Dell XPS laptops hooking up to 4K TVs and on older Radeon cards (RX 580, Vega 56) with newer high-refresh monitors.
The short version: Windows or your app asked the graphics driver to use a display mode – like 1920x1080 at 144 Hz – that isn't in the list the driver currently holds. The list is called the mode set. When the mode's missing, you get this error.
Let's walk through the fixes from quickest to most thorough. Stop when the error goes away.
Simple fix (30 seconds): Restart the graphics driver
This isn't a full reboot. It just resets the driver without closing your work. It can re-sync the mode set with your monitor's EDID (the little chip that tells the PC what resolutions it supports).
- Press Win + Ctrl + Shift + B all at once.
- You'll see a brief screen flicker and hear a beep. That's the driver restarting.
- Now try the action that triggered the error (change resolution, launch the game, connect the monitor).
What to expect: If the error was from a temporary glitch, it's gone. If not, move to the next step.
Moderate fix (5 minutes): Reset display settings via the Settings app
Sometimes the mode set gets corrupted because of a bad resolution or refresh rate. We'll clear it back to defaults.
- Right-click the desktop and choose Display settings.
- Scroll down to Advanced display and click it.
- Under Choose a refresh rate, pick the default – usually 60 Hz for most monitors. Change it only if you know your monitor supports higher. (If you were trying to set 144 Hz and got the error, go back to 60 Hz first.)
- Click Apply. Windows will ask you to confirm. If the screen goes black for a second, that's normal. If it doesn't come back, wait 15 seconds – Windows will revert automatically.
- Now go back and try your original setting again. Often the mode set rebuilds after a reset.
Still no luck? Let's go nuclear with the driver.
Advanced fix (15+ minutes): Clean driver reinstall with DDU
This is the one that really fixes it. Use a tool called Display Driver Uninstaller (DDU) to wipe all remnants of your graphics driver, then install fresh. This clears any stale mode sets cached by the driver.
Step 1: Download DDU and a fresh driver
- Download the latest Display Driver Uninstaller from Guru3D. Get the portable version – no install needed.
- Go to your GPU manufacturer's site and grab the newest driver package for your card. Save it to your desktop. Don't install it yet.
Step 2: Boot into Safe Mode
DDU needs Safe Mode so no driver files are locked.
- Open Settings → Update & Security → Recovery.
- Under Advanced startup, click Restart now.
- After reboot, choose Troubleshoot → Advanced options → Startup Settings → Restart.
- Press 4 on your keyboard to boot into Safe Mode.
Step 3: Run DDU
- Extract the DDU zip and run
DDU v18.0.7.0.exe(the version number might differ). - In the options, set Select device type to GPU.
- Click Clean and restart (not just clean).
- DDU will wipe the driver and restart the PC. On reboot, Windows will be using the basic Microsoft display driver – you'll see a low resolution and maybe a stretched screen. That's fine.
Step 4: Install the new driver
- Run the driver installer you downloaded earlier.
- Choose Custom (Advanced) installation, then check Perform a clean installation.
- Let it finish. Your screen may flicker a few times as it installs.
- Reboot when prompted.
After the reboot, your resolution should be back to normal. Try the action that gave you the error again. 9 times out of 10, it's gone.
What if none of this works?
If the error persists after a clean driver install, you might have a hardware issue. Test with a different monitor or cable – bad HDMI/DisplayPort cables can corrupt EDID data. Also check for a monitor firmware update on the manufacturer's support site. On some Dell monitors (like the S2721DGF), a firmware update fixed exactly this error.
And one more thing: if you're using a USB-C to HDMI adapter, try a direct HDMI cable. Those adapters can mangle the mode set. I've seen it dozens of times.