> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rightnowai.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting

> Common issues and solutions for RightNow AI

## Installation Issues

### CUDA Toolkit Not Found

**Problem**: RightNow AI can't detect your CUDA installation.

**Solutions**:

1. Verify CUDA Toolkit 11.0-12.5 is installed (not just runtime)
2. Check installation path:
   * **Windows**: `C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.x`
   * **Linux**: `/usr/local/cuda` or `/opt/cuda`
3. Add CUDA bin directory to system PATH
4. Restart RightNow AI after installation

### NCU Profiling Permission Denied

<Tabs>
  <Tab title="Windows">
    **UAC Elevation**: Allow RightNow AI to run as administrator when prompted.

    **Manual Registry Fix**:

    ```batch theme={null}
    # Run Command Prompt as Administrator
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PerfProc\Performance" /v "Disable Performance Counters" /t REG_DWORD /d 0 /f
    ```
  </Tab>

  <Tab title="Linux">
    **Add User to Groups**:

    ```bash theme={null}
    sudo usermod -a -G video $USER
    sudo usermod -a -G render $USER
    sudo usermod -a -G perf_users $USER
    sudo reboot
    ```

    **Enable GPU Performance Counters**:

    ```bash theme={null}
    sudo nvidia-smi -pm 1
    sudo nvidia-smi -lgc 0,1980
    ```
  </Tab>
</Tabs>

## AI Provider Issues

### OpenRouter API Key Not Working

**Problem**: "Invalid API key" or connection errors.

**Solutions**:

1. Verify API key at [openrouter.ai/settings/keys](https://openrouter.ai/settings/keys)
2. Check for extra spaces or special characters
3. Ensure account has credits/payment method
4. Test connection in Settings → AI Providers

### Local Models Not Responding

**Problem**: Ollama/vLLM/LM Studio not working.

**Solutions**:

1. **Ollama**: Verify service is running: `ollama list`
2. **vLLM**: Check server endpoint is accessible
3. **LM Studio**: Ensure local server is started and model loaded
4. Verify firewall isn't blocking local connections

## Profiling Issues

### Kernels Not Profiling

**Problem**: ▶️ buttons don't work or no metrics shown.

**Solutions**:

1. Ensure kernel contains `__global__` functions
2. Check CUDA code compiles successfully with `nvcc`
3. Verify GPU supports compute capability 3.5+
4. Close other GPU-intensive applications
5. Try profiling a simple "Hello World" kernel first

### Inaccurate Performance Metrics

**Problem**: Profiling results seem wrong or inconsistent.

**Solutions**:

1. Warm up GPU with multiple kernel runs
2. Use release build configuration (not debug)
3. Ensure sufficient GPU memory available
4. Profile on dedicated GPU (not integrated graphics)
5. Check for thermal throttling: `nvidia-smi`

## Performance Issues

### Slow AI Responses

**Problem**: AI completions or chat responses are slow.

**Solutions**:

1. **BYOK Users**: Check OpenRouter account limits and credits
2. **Local Models**: Ensure sufficient RAM/VRAM for model size
3. **Network**: Verify stable internet connection
4. Try switching to a smaller/faster model temporarily

### High Memory Usage

**Problem**: RightNow AI consuming too much RAM.

**Solutions**:

1. Close unused profiling panels
2. Limit chat history length in settings
3. Reduce autocomplete context window size
4. Restart RightNow AI periodically for long sessions

## Getting Help

<CardGroup cols={2}>
  <Card title="Community Support" icon="discord" href="https://discord.gg/sSJqgNnq6X">
    Join our Discord for community help and discussions
  </Card>

  <Card title="Contact Support" icon="envelope" href="https://www.rightnowai.co/contact">
    Submit a support request for technical issues
  </Card>
</CardGroup>

<Info>
  **Before reaching out**: Please include your OS version, CUDA version, GPU model, and specific error messages to help us assist you faster.
</Info>
