KoboldCpp won't start or the window closes at once

For a KoboldCpp crash on start, run it from a Command Prompt or terminal instead of double-clicking, so the error stays on screen. The most common causes are a CPU without AVX2 (use koboldcpp-oldpc or Failsafe mode), antivirus or Smart App Control blocking one of its DLLs, an outdated GPU driver, and a model too large for your memory. Match the last lines to a section below.

Checked against KoboldCpp 1.124.2 · updated 13 Nov 2026
  • lab-lnx: Linux test VM · 4 vCPU · 15 GB · no GPU
  • gha-w25: Windows Server 2025 test machine · 4 vCPU · 16 GB · no GPU
  • gha-w22: Windows Server 2022 test machine · 4 vCPU · 16 GB · no GPU
  • gha-u24: Ubuntu 24.04 test machine · 4 vCPU · 16 GB · no GPU
  • gha-mac15: macOS 15 test VM (Apple Silicon) · 3 vCPU · 7 GB · paravirtual Metal
How we test
On this page
  1. Step 1: see the error before the window closes
  2. “Failed to execute script” is not the real error
  3. Old CPU without AVX2: “Illegal instruction” or an access violation
  4. DLL errors: PyInstallerImportError, WinError 1114, koboldcpp_cublas.dll not found
  5. koboldcpp_hipblas.dll
  6. Antivirus deleted or blocked it
  7. Smart App Control blocks it (WinError 4551)
  8. Stale temp folder (_MEI) or a full disk
  9. Windows 7 and other old systems
  10. The launcher never opens
  11. NVIDIA driver or new GPU problems
  12. A KoboldCpp crash after it starts

The result appears here. Nothing you paste leaves this page.

Step 1: see the error before the window closes

A double-clicked program opens its own console and closes it when it stops, so the error vanishes with it. Starting it from a terminal keeps the text. The console is the log: KoboldCpp wrote no log file by default in our test F58, see where to find the log.

  1. Open a terminal in the KoboldCpp folder

    Open the folder that holds koboldcpp.exe. Click the address bar, type cmd and press Enter. A Command Prompt opens in that folder. In PowerShell, type powershell in the address bar instead.

  2. Run KoboldCpp from the terminal

    Command Prompt
    koboldcpp.exe
    koboldcpp.exe --model "D:\My Models\model.gguf"

    Put quotes around any path with spaces. If the file name is different (you renamed it, or it is the nocuda or oldpc file), type that name instead; see the download picker.

  3. Check it worked

    You now see text that ends with either an error or a model-loading line. Match the last lines to a section below, or paste them into the analyzer above.

If you downloaded the file again because it did not work, make sure it came from GitHub: see fake sites.

“Failed to execute script” is not the real error

Users report this line on 63 issues. It is a wrapper from the launcher and only says that an exception was not handled. The cause is printed above it. In our busy-port test the real line was Cannot start the server: no socket could bind, and the wrapper came right after F49. Our missing-library tests ended the same way F56.

Busy port, second instancer1-lnx err-port-in-use · lab-lnx · KoboldCpp 1.124.2 (F49)
OSError: Cannot start the server: no socket could bind.1[PYI-10566:ERROR] Failed to execute script 'koboldcpp' due to unhandled exception!2
  1. OSError: Cannot start the server: no socket could bind.: This is the cause. Read upward to the first error.
  2. [PYI-10566:ERROR] Failed to execute script 'koboldcpp' due to unhandle: The wrapper. It only says something above it failed.

See Failed to execute script and why the last line is not the real error.

Old CPU without AVX2: “Illegal instruction” or an access violation

How to tell: the program stops right after Initializing dynamic library, with Illegal instruction or an access violation, on a PC that is more than about ten years old. Users report this on 10 issues (#56, #1350, #624). We have not reproduced the crash itself yet, because our test machines all have AVX2; the speed numbers below are measured. See Illegal instruction and access violation.

Fixes, in this order:

Fallbacks for a CPU without AVX2
koboldcpp-oldpc fileYour CPU has no AVX2, or you have an old NVIDIA GPU. It always loads the no-AVX2 library.28.2 vs 47.4 tok/s on w22 (about -40%)R-ci1-w22-oldpc-base-q4_k_m
--noavx2 or launcher "Use CPU (Old CPU)"Same CPU, but you want to keep the normal file.31.7 vs 47.4 tok/s on w22 (-33%); -20% on lab-lnxR-ci1-w22-nocuda-fail-noavx2
--failsafeYour CPU has no AVX at all.5.8 vs 47.4 tok/s on w22 (about 8x slower)R-ci1-w22-nocuda-fail-failsafe
Fallbacks cost speed, Failsafe the mostWindows Server 2022 runner, koboldcpp-nocuda build, 0.5B Q4_K_M model, KoboldCpp 1.124.2, 13 Nov 2026CPU lab, 0.5B model: relative differences only
  • Normal (AVX2)47.4 tok/s
  • --noavx231.7 tok/s
  • oldpc file28.2 tok/s
  • --failsafe5.8 tok/s
Data
ItemValue (tok/s)
Normal (AVX2)47.4
--noavx231.7
oldpc file28.2
--failsafe5.8

Download CSV · Results: R-ci1-w22-nocuda-base-q4_k_m, R-ci1-w22-oldpc-base-q4_k_m, R-ci1-w22-nocuda-fail-noavx2, R-ci1-w22-nocuda-fail-failsafe

Relative differences only: this is a CPU lab with a small model F03 F15. The flags are described under --noavx2 and --failsafe.

DLL errors: PyInstallerImportError, WinError 1114, koboldcpp_cublas.dll not found

The single file unpacks its libraries into a temporary folder every time it starts. An error here means a library was removed, blocked, or could not load. Users report it on about 20 issues (#599, #1555, #705, #785, #778). Causes, most likely first:

  1. Antivirus removed or blocked a file. See antivirus.
  2. A stale or partial unpack. See the temp folder.
  3. No usable NVIDIA driver for the CUDA build. In our CI runs the CUDA file fails with koboldcpp_cublas.dll (Windows) or libcuda.so.1 (Linux) not found when a CUDA flag is set and no NVIDIA driver is installed F56. Update the driver from nvidia.com.
  4. To isolate CUDA, try koboldcpp-nocuda.exe. It runs on any PC F02 and can use Vulkan.

The matching rows: PyInstallerImportError, WinError 1114, cublas DLL not found. A missing koboldcpp_common.dll is the same kind of error: with --usevulkan and no graphics driver we saw it, so a missing or broken driver looks like this F57.

koboldcpp_hipblas.dll

This file belongs to the third-party ROCm build for AMD on Windows, a fork, not the official download. Use the official koboldcpp-nocuda.exe with Vulkan, or report the problem to the fork. See AMD.

Antivirus deleted or blocked it

Open Windows Security, then Protection history, and look for KoboldCpp or a file in its temp folder. Users report several detection names on #795, #779 and #2267. Before you restore anything, verify the file:

  1. Make sure it came from the official GitHub release, not a lookalike site: is KoboldCpp safe?.
  2. Compare its SHA-256 hash with the one in the release list F01.
  3. Only then restore it, or exclude one folder that holds KoboldCpp.

Smart App Control blocks it (WinError 4551)

Smart App Control is a Windows 11 feature that blocks programs it does not trust. Users report WinError 4551 or a blocked-app message on #1946 and #2590 (November 2026). We could not reproduce it: Smart App Control only exists on clean consumer installs, which our test machines are not. Statement checked 14 Nov 2026; Windows changes it often.

Your options:

  • Check that the file is the official one first, then see Windows Security and the Event Viewer entry for the blocked file.
  • Turn Smart App Control off. Microsoft’s documentation says it cannot be turned back on without resetting Windows, so read the page before you do it.
  • Run KoboldCpp on Linux instead, on the same PC.

See WinError 4551.

Stale temp folder (_MEI) or a full disk

The single-file build unpacks itself into a folder whose name starts with _MEI: under %TEMP% on Windows and /tmp on Linux. Our Linux log shows it: /tmp/_MEI77CIbl/kcpp_adapters/AutoGuess.json F18. A failed or killed run can leave one behind, and the error Failed to extract … decompression resulted in return code -1 points to a full disk or a damaged unpack (users report #2342). We have not measured the sizes yet on Windows.

  1. Close KoboldCpp.
  2. Free disk space on the drive that holds the temp folder. The CUDA file is 594 MB compressed and unpacks to more F01.
  3. Delete only folders whose names start with _MEI in the temp folder, then start again.

See Failed to extract.

Windows 7 and other old systems

PrefetchVirtualMemory not found in KERNEL32.dll (#68) means Windows lacks a function the program uses. Upstream restored Windows 7 support in 1.43 (2023), but its FAQ lists it as not working and we cannot confirm the current state: we have no Windows 7 machine. Checked 14 Nov 2026.

Options: run Linux on the same PC, rent a cloud GPU or use Colab, or use Kobold Lite with the AI Horde (KoboldAI). Old builds may run, but they receive no security fixes, so be careful. See PrefetchVirtualMemory.

The launcher never opens

On Linux without a display, or over SSH, the launcher cannot draw its window: the messages are no $DISPLAY and Exception in Tkinter callback. Skip the launcher by giving a model on the command line: --model (and --skiplauncher where needed), or a saved .kcpps with --config. The config builder will write the command for you. Users report the Tkinter error on 27 issues. See no display and Tkinter callback.

NVIDIA driver or new GPU problems

The CUDA build needs a current NVIDIA driver; we have not verified the minimum version. Users report empty windows or hangs on RTX 50-series cards (#1611, #1616), which we have not tested. Old cards: using the GPU and NVIDIA. To isolate the cause, start koboldcpp-nocuda.exe and choose Vulkan.

A KoboldCpp crash after it starts

Not sure? Start the decision tree.

Frequently asked questions

Why does KoboldCpp close immediately after I open it?

The window closes when the program stops, and the error is printed inside that window. Start KoboldCpp from a Command Prompt or terminal so the text stays on screen, then match the last lines to a cause. In our tests a missing model file, a file that is not a GGUF and a busy port each stopped it within seconds.

Does KoboldCpp work without AVX2?

Yes, with three options. The koboldcpp-oldpc file always loads the no-AVX2 library. The --noavx2 flag does the same on the normal file. Failsafe mode works on CPUs without AVX at all. On our test machines --noavx2 cost 20 to 36 percent of generation speed and Failsafe about eight times, so use them only when needed.

Does KoboldCpp work on Windows 7?

We cannot say: we have no Windows 7 machine. Upstream restored Windows 7 support in version 1.43 in 2023, but users still report PrefetchVirtualMemory errors, and a current build has not been verified on Windows 7. Options are Linux on the same PC, a cloud GPU, or the AI Horde through Kobold Lite.

Is it safe to restore KoboldCpp from antivirus quarantine?

Only after you verify the file. Download it from GitHub only, compare its SHA-256 hash with the official list, and then restore it or exclude a single folder. Do not turn antivirus off.

How do I stop the window closing so I can read the error?

Run KoboldCpp from a Command Prompt or terminal rather than double-clicking it. The text stays on screen after the program stops.