Fix 0xC026233A: Invalid Primary Surface Size Error
This DirectX error hits when a game or app sends a resolution the GPU driver can't handle. The fix is almost always in the display settings or driver config.
Yeah, this error is annoying. Let's fix it.
You're staring at 0xC026233A and your game or app crashed. It's a DirectX error that basically means the driver told the app "nope, that's not a valid surface size." The culprit here is almost always a bad resolution, refresh rate, or scaling setting. I've seen this on everything from a 4K gaming rig to a budget laptop running an old Intel iGPU. The fix is usually quick.
Step 1: Reset Your Display Settings
Don't bother reinstalling the game first. Start with Windows display settings. Right-click the desktop and pick Display settings. Under Display resolution, set it to the monitor's native resolution. That's the one marked "Recommended." Then scroll down to Advanced display and check the refresh rate. Set it to 60 Hz or the monitor's max. Anything overclocked or custom can trigger this error.
Path: Settings > System > Display > Advanced display > Choose a refresh rateIf you're using scaling (like 125% or 150%), drop it to 100% temporarily. Some older apps — especially games from 2010–2015 — can't handle non-100% scaling. Then restart the app. If it works, you can bump scaling back later.
Step 2: Delete Custom Resolutions
If you've ever created a custom resolution (for overclocking, ultrawide tweaks, or forcing a lower resolution), that's likely the trigger. Open your GPU control panel:
- NVIDIA: Control Panel > Change resolution > Customize > Delete the custom resolutions.
- AMD: Radeon Software > Display > Custom Resolutions > Delete them.
- Intel: Graphics Command Center > Display > Custom Resolutions > Remove.
After deleting, apply and reboot. I've seen this error pop up from a custom 1440p overclock that worked fine for months until a driver update broke it.
Step 3: Reinstall the GPU Driver Cleanly
When settings don't stick, a corrupted driver is the next suspect. Don't just "update" — do a clean install. Use DDU (Display Driver Uninstaller) in Safe Mode. Boot into Safe Mode, run DDU, select "Clean and restart." Then install the latest driver from NVIDIA, AMD, or Intel's site. Skip the optional 3D Vision or GeForce Experience bloat. This wipes out any lingering profile or registry junk that holds a bad resolution.
1. Download DDU from guru3d.com
2. Boot into Safe Mode (Shift + Restart > Troubleshoot > Advanced Startup)
3. Run DDU > Clean and restart
4. Install fresh driverI've fixed this error on five different machines with this exact method. It's the nuclear option, but it works when nothing else does.
Why This Error Happens
The DirectX runtime asks the GPU to allocate a buffer for the primary surface — the main framebuffer. If the resolution, refresh rate, or pixel format doesn't match what the driver expects, it returns error 0xC026233A. Common triggers:
- Monitor's EDID data is corrupted or missing (rare, but happens with cheap HDMI adapters).
- App tries to set a resolution the GPU doesn't support via the current output (e.g., 4K on an old DVI cable).
- Mixed refresh rates on multi-monitor setups — running a 144 Hz and a 60 Hz monitor can confuse some games.
Less Common Variations
Sometimes the error pops up in a specific app, not the whole system. For those cases:
- Minecraft (Java Edition): Check the
options.txtfile in%appdata%/.minecraft. Look forfullscreenResolutionand set it to match your desktop resolution. I've seen this where the file had a resolution that didn't exist. - Old games (DirectX 9 era): Run them in windowed mode. Right-click the .exe > Properties > Compatibility > Enable "Run in 640x480" or set a specific resolution under "Change high DPI settings."
- Virtual machines: If you're running a VM with GPU passthrough, ensure the virtual monitor resolution matches the physical one. Hyper-V sometimes defaults to 1024x768 when the host is 1080p.
Prevention
Three things will keep 0xC026233A from coming back:
- Stick to standard resolutions. 1920x1080, 2560x1440, 3840x2160. Avoid fractional scaling if you can. 100% or 200% is safest.
- Keep drivers updated, but not bleeding edge. Use Game Ready or stable branch drivers. Beta drivers can introduce bugs that break surface allocation.
- Don't overclock your monitor beyond its EDID spec. If you push a 60 Hz panel to 75 Hz, you're asking for a mismatch. Some monitors handle it, some don't. Test with a tool like CRU (Custom Resolution Utility) and revert if you see glitches.
That's it. You won't see 0xC026233A again unless you go poking at resolutions blindly. If you do, come back to step one.
Was this solution helpful?