# CUDA error: MPS client failed to connect (cudaErrorMpsClientFailed)

- **ID:** `cuda/cuda-error-mps-client-failed`
- **Domain:** cuda
- **Category:** runtime_error
- **Error Code:** `cudaErrorMpsClientFailed (803)`
- **Verification:** ai_generated
- **Fix Rate:** 82%

## Root Cause

The CUDA Multi-Process Service (MPS) control daemon is not running or has crashed, preventing a new MPS client from connecting to the shared GPU context.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| CUDA 12.0 | active | — | — |
| CUDA 12.1 | active | — | — |
| CUDA 12.3 | active | — | — |
| NVIDIA Driver 535.129.03 | active | — | — |
| NVIDIA Driver 545.23.06 | active | — | — |

## Workarounds

1. **Start the MPS control daemon before launching the application: `export CUDA_MPS_PIPE_DIRECTORY=/tmp/nvidia-mps; nvidia-cuda-mps-control -d`** (90% success)
   ```
   Start the MPS control daemon before launching the application: `export CUDA_MPS_PIPE_DIRECTORY=/tmp/nvidia-mps; nvidia-cuda-mps-control -d`
   ```
2. **Disable MPS by unsetting CUDA_MPS_PIPE_DIRECTORY and restarting the process: `unset CUDA_MPS_PIPE_DIRECTORY`** (95% success)
   ```
   Disable MPS by unsetting CUDA_MPS_PIPE_DIRECTORY and restarting the process: `unset CUDA_MPS_PIPE_DIRECTORY`
   ```
3. **Check if MPS daemon is running and restart it: `ps aux | grep nvidia-cuda-mps-control; killall nvidia-cuda-mps-control; nvidia-cuda-mps-control -d`** (85% success)
   ```
   Check if MPS daemon is running and restart it: `ps aux | grep nvidia-cuda-mps-control; killall nvidia-cuda-mps-control; nvidia-cuda-mps-control -d`
   ```

## Dead Ends

- **** — The error is not caused by missing or corrupt CUDA installations, but by a missing or unresponsive MPS daemon process. (80% fail)
- **** — The environment variable only changes the socket path; if the daemon is not running at that path, the connection still fails. (70% fail)
