RTX 5060 Ti + cuda + SwarmUI Setup Guide for Ubuntu 24.04

A comprehensive guide for Linux novices to set up SwarmUI with NVIDIA RTX 5060 Ti on Ubuntu 24.04. It assumes you are comfortable with using command-line input and have a reasonable degree of computer literacy.
N.B. This guide arises from me trying to solve the install issue myself, setting up a local workstation (a Dell 5820 with 64GB RAM) with a new RTX 5060Ti 16GB VRAM GPU. The report arises from a long conversation with claude.ai, and incorporates results of links and corrections I’ve sourced from reading lots of user-forums, man-pages and various websites etc. I have not tried everything in this guide – claude added quite a few options to consider, so NO GUARANTEES – USE IT ENTIRELY AT YOUR OWN RISK! Hopefully it will save you some of the time & dramas I went through and provide you with some recovery options when things go wrong – which they will!
Please feel free to add/emend bits and pieces in the comments section below – for future updates.
Last updated: June 2025
Understanding the Challenge
The NVIDIA RTX 5060 Ti is a recently released (2025) GPU using the Blackwell architecture with sm_120 compute capability. This creates several compatibility challenges:
Why RTX 5060 Ti is Different
- New Architecture: Blackwell GPUs require newer drivers (575.x+) and CUDA toolkit versions (12.8+)
- Limited Software Support: Many AI frameworks haven’t caught up to support sm_120 yet
- Driver Requirements: Older drivers (like 545.x) simply don’t work at all
- PyTorch Compatibility: Only PyTorch nightly builds support this GPU currently
The Software Stack We Need
┌─────────────────────────────────────┐
│ SwarmUI (.NET Application) │ ← Web interface
├─────────────────────────────────────┤
│ ComfyUI (Python AI Backend) │ ← Does the actual AI processing
├─────────────────────────────────────┤
│ PyTorch + CUDA Libraries │ ← GPU acceleration framework
├─────────────────────────────────────┤
│ NVIDIA Driver 575.x+ │ ← Low-level GPU communication
├─────────────────────────────────────┤
│ RTX 5060 Ti Hardware │ ← Your GPU
└─────────────────────────────────────┘
Prerequisites and System Preparation
Critical Decision: Secure Boot and Driver Signing
⚠️ IMPORTANT: Before installing NVIDIA drivers, you must decide how to handle Secure Boot. This is often the biggest stumbling block for new users.
Understanding Secure Boot
Secure Boot prevents unsigned kernel modules from loading. NVIDIA drivers are kernel modules, so they need to be either:
- Signed by a trusted authority, or
- Self-signed and enrolled in your system’s MOK (Machine Owner Key) database, or
- Installed with Secure Boot disabled
Option 1: Disable Secure Boot (Simplest but Less Secure)
Pros:
- No complex MOK enrollment process
- No passwords to remember
- Driver installation “just works”
- Can install either open or proprietary drivers
Cons:
- Reduces system security
- Boot process is less protected against malware
How to disable:
# Enter BIOS/UEFI settings during boot (usually F2, F12, or Delete key)
# Navigate to Security or Boot settings
# Find "Secure Boot" option
# Set to "Disabled"
# Save and exit
Option 2: Keep Secure Boot Enabled with MOK Enrollment (More Secure)
Pros:
- Maintains system security
- Properly signed drivers
- Industry best practice
Cons:
- Complex setup process
- Must remember MOK password
- Easy to mess up
MOK Enrollment Process:
# During driver installation, you'll be prompted to create a MOK password
# After installation, reboot
# You'll see a blue MOK management screen
# Select "Enroll MOK" → "Continue" → Enter your MOK password
# Reboot again
⚠️ GOTCHA: The MOK password prompt appears only once during installation. If you miss it or forget the password, you’ll need to reinstall the driver!
Recommendation for New Users
For this guide, we recommend disabling Secure Boot because:
- RTX 5060 Ti setup is already complex enough
- MOK enrollment adds another failure point
- You can re-enable Secure Boot later if needed
Can You Re-enable Secure Boot Later?
Short answer: It depends on which driver variant you installed.
If You Installed Open Source Drivers (nvidia-open)
# Check which driver you have
nvidia-smi | head -n 3
# Look for "NVIDIA-SMI" version info
# Open source drivers can be re-signed for Secure Boot
# You can potentially re-enable Secure Boot later by:
# 1. Installing driver signing utilities
# 2. Signing the driver modules yourself
# 3. Enrolling your signing key in MOK
If You Installed Proprietary Drivers
# Proprietary drivers require MOK enrollment for Secure Boot
# To re-enable Secure Boot:
# 1. You'd need to reinstall the driver with MOK enrollment
# 2. Or switch to open source drivers
Safe Re-enabling Process
# 1. First, make sure your driver works perfectly
nvidia-smi
# 2. Research your specific driver variant's Secure Boot compatibility
modinfo nvidia # Check driver info
# 3. Consider creating a system backup first
sudo timeshift --create --comments "Before re-enabling Secure Boot"
# 4. Re-enable in BIOS and test boot
# 5. If system doesn't boot, disable Secure Boot again from BIOS
Essential Linux Recovery Skills
Before installing drivers, every Linux user should know how to access text mode and recover from display issues.
Accessing Text Mode (CLI)
When your display doesn’t work after driver installation, you can switch to text-only mode:
# Switch to text console (when display is broken)
Ctrl + Alt + F3 # or F4, F5, F6
# Login with your username and password
# Switch back to graphical mode (when it's working)
Ctrl + Alt + F1 # or F2 (depending on your system)
# Some systems use F7 for graphics mode
Checking Current Display Status
# Check if graphical display is running
sudo systemctl status gdm3
# or for other display managers:
sudo systemctl status lightdm
sudo systemctl status sddm
# Check if NVIDIA driver is loaded
lsmod | grep nvidia
nvidia-smi # Will fail if driver not working
Emergency Driver Recovery
If your display breaks after driver installation:
# 1. Boot and immediately press Ctrl+Alt+F3 to get to text mode
# 2. Login with your credentials
# 3. Remove the broken NVIDIA driver:
sudo nvidia-uninstall
# or if that doesn't exist:
sudo apt remove --purge nvidia* -y
sudo apt autoremove -y
# 4. Reboot - Ubuntu 24.04 will automatically provide working graphics
sudo reboot
# Your display should work immediately with Ubuntu's automatic fallback
# No need to manually install replacement drivers
Alternative Recovery Method
# If nvidia-uninstall doesn't work, manually remove driver:
sudo rm -rf /usr/lib/nvidia*
sudo rm -rf /usr/lib32/nvidia*
sudo rm -rf /etc/X11/xorg.conf
sudo rm -rf /usr/share/nvidia*
# Regenerate initramfs
sudo update-initramfs -u
# Reboot
sudo reboot
Update Your System
# Always start with a fully updated system
sudo apt update && sudo apt upgrade -y
# Install essential build tools
sudo apt install -y wget curl build-essential
Installing the Correct NVIDIA Driver
Driver Upgrades and Long-term Considerations
Future Driver Updates with Open Source Drivers
Advantages of nvidia-open for upgrades:
# Open source drivers integrate better with package managers
# Future Ubuntu versions may include nvidia-open in repositories
# Easier to switch between driver versions
# DKMS automatically rebuilds drivers for new kernels
When newer drivers become available:
# 1. Download new nvidia-open driver from NVIDIA
# 2. Uninstall old driver (usually handled automatically)
# 3. Install new driver with same process
# 4. DKMS will handle kernel module registration
Potential Issues to Watch For
Kernel Updates:
# Problem: Ubuntu kernel updates can break manually installed drivers
# Solution: DKMS registration (done during installation) usually fixes this automatically
# Check after kernel updates:
nvidia-smi
# If driver breaks after kernel update:
sudo dkms status # Check DKMS status
sudo dkms install nvidia/575.57.08 # Reinstall if needed
Repository Conflicts:
# Problem: When driver 575.x eventually appears in repositories,
# you might get conflicts between manual and repository versions
# Prevention: Check before major Ubuntu updates
apt list --upgradable | grep nvidia
# If conflicts arise, choose one installation method:
# Option A: Remove manual driver, use repository version
sudo nvidia-uninstall
sudo apt install nvidia-driver-575-open
# Option B: Hold repository packages to prevent conflicts
sudo apt-mark hold nvidia-driver-*
Signs Your Driver Needs Attention:
nvidia-smireturns “command not found”- X server won’t start after updates
- Poor graphics performance
- CUDA applications suddenly stop working
Migration Path to Repository Drivers
When driver 575.x becomes available in Ubuntu repositories:
# 1. Check if repository version is available
apt search nvidia-driver-575
# 2. If available and you want to switch:
sudo nvidia-uninstall # Remove manual installation
sudo apt install nvidia-driver-575-open # Install from repository
sudo reboot
# 3. Verify the switch worked
nvidia-smi
apt list --installed | grep nvidia-driver
⚠️ GOTCHA: Don’t mix manual and repository driver installations! Choose one method and stick with it.
Install Driver 575.x (Manual Download Required)
⚠️ IMPORTANT: RTX 5060 Ti is so new that driver 575.x is NOT available in Ubuntu repositories or PPAs yet. You must download it manually from NVIDIA.
Choosing Driver Variant
NVIDIA offers two variants for Linux:
Open Source Driver (nvidia-open) – RECOMMENDED
- Pros: Better long-term support, easier updates, can work with Secure Boot
- Cons: Slightly newer, less tested
- File:
NVIDIA-Linux-x86_64-575.57.08-open.run - Future-proof: Easier to upgrade and maintain
Proprietary Driver (nvidia)
- Pros: More mature, extensively tested
- Cons: Harder to upgrade, requires MOK for Secure Boot
- File:
NVIDIA-Linux-x86_64-575.57.08.run - Traditional: What most guides assume you’re using
Download and Install Process
# Go to: https://www.nvidia.com/en-us/drivers/details/245537/
# Download the OPEN SOURCE version: NVIDIA-Linux-x86_64-575.57.08-open.run
# Make it executable
chmod +x NVIDIA-Linux-x86_64-575.57.08-open.run
# CRITICAL SAFETY STEPS:
# 1. Create a recovery plan in case things go wrong
echo "Recovery commands:" > ~/nvidia_recovery.txt
echo "Ctrl+Alt+F3 to access text mode" >> ~/nvidia_recovery.txt
echo "sudo nvidia-uninstall" >> ~/nvidia_recovery.txt
echo "sudo ubuntu-drivers autoinstall" >> ~/nvidia_recovery.txt
echo "sudo reboot" >> ~/nvidia_recovery.txt
# 2. Stop the display manager
sudo systemctl stop gdm3
# 3. Switch to text mode for safe installation
# Press Ctrl+Alt+F3 (or F4)
# Login with your username and password
# 4. Run the installer from text mode
sudo ./NVIDIA-Linux-x86_64-575.57.08-open.run
# Installation options to choose:
# - Accept license: Yes
# - Install kernel module: Yes
# - Update X configuration: Yes (usually)
# - Register kernel module sources with DKMS: Yes (recommended)
# - Would you like to run nvidia-xconfig: Usually Yes
# 5. Reboot to test the new driver
sudo reboot
# 6. If display doesn't work after reboot:
# - Press Ctrl+Alt+F3 immediately during boot
# - Follow recovery commands from ~/nvidia_recovery.txt
What to Do if Installation Fails
Scenario 1: Black screen after reboot
# Press Ctrl+Alt+F3 during boot
# Login, then run:
cat ~/nvidia_recovery.txt # Review recovery steps
sudo nvidia-uninstall
# Ubuntu 24.04 automatically provides working graphics after reboot
sudo reboot
Scenario 2: Display works but nvidia-smi fails
# Check what's loaded
lsmod | grep nvidia
dmesg | grep -i nvidia
# Common issues:
# - Secure Boot blocking driver (disable in BIOS)
# - Conflicting old drivers (remove with apt)
# - Missing kernel headers (install with apt)
Scenario 3: Installation completes but driver won’t load
# Check system logs
journalctl -u gdm3
dmesg | tail -20
# Force driver load test
sudo modprobe nvidia
nvidia-smi
Post-Installation Verification
# Check driver loaded correctly
nvidia-smi
# Should show:
# - Driver Version: 575.57.08
# - Your RTX 5060 Ti detected
# - CUDA Version: 12.9 (maximum supported)
# Check driver variant
cat /proc/driver/nvidia/version
# Should mention "Open Kernel modules" if you installed nvidia-open
Verify Driver Installation
# After reboot, check driver version
nvidia-smi
# You should see something like:
# Driver Version: 575.57.08
# CUDA Version: 12.9 (this is the maximum supported, not what's installed)
⚠️ GOTCHA: The “CUDA Version” shown in nvidia-smi is the maximum CUDA version your driver supports, not what’s actually installed!
Removing Conflicting CUDA Installations
Why This Step is Critical
Ubuntu often comes with older CUDA packages that will conflict with the newer versions needed for RTX 5060 Ti. We need to remove these completely.
Check What’s Installed
# First, make sure you're at SYSTEM LEVEL (not in any virtual environment)
# Your prompt should look like: user@computer:~$
# NOT like: (base) user@computer:~$ or (venv) user@computer:~$
# If you see any environment prefix, deactivate it:
conda deactivate # Keep running this until no prefix shows
# Now check what CUDA packages are installed
dpkg -l | grep -i cuda
dpkg -l | grep -i nvidia
Remove System CUDA Packages
# Remove all CUDA-related packages (KEEP NVIDIA DRIVER PACKAGES)
sudo apt remove --purge nvidia-cuda-toolkit nvidia-cuda-dev nvidia-cuda-gdb nvidia-cuda-toolkit-doc libcudart12 libcublas12 libcublaslt12 libcufft11 libcufftw11 libcurand10 libcusolver11 libcusolvermg11 libcusparse12 libnppc12 libnppial12 libnppicc12 libnppidei12 libnppif12 libnppig12 libnppim12 libnppist12 libnppisu12 libnppitc12 libnpps12 libnvrtc12 libnvrtc-builtins12.0 libnvjitlink12 libnvjpeg12 libnvtoolsext1 libnvvm4 nsight-compute nsight-compute-target nsight-systems nsight-systems-target nvidia-profiler nvidia-visual-profiler libcupti-dev libcupti12 libcupti-doc libnvidia-ml-dev nvidia-opencl-dev libcub-dev libcu++-dev libaccinj64-12.0 libcuinj64-12.0 -y
# Clean up
sudo apt autoremove -y
# Remove any manual CUDA installations
sudo rm -rf /usr/local/cuda*
Verify Cleanup
# These should return empty results or "not found"
dpkg -l | grep -i cuda
which nvcc
ls -la /usr/local/cuda*
# This should still work (driver preserved)
nvidia-smi
⚠️ GOTCHA: Never remove packages starting with nvidia-driver-575 – these are your working GPU driver!
Understanding Virtual Environments
What Are Virtual Environments?
Virtual environments are isolated Python installations that prevent different projects from interfering with each other.
Why Virtual Environments Are Essential for RTX 5060 Ti Setups
The Fundamental Problem: RTX 5060 Ti requires cutting-edge software versions that conflict with system stability.
Without Virtual Environments (System-Wide Installation)
# What happens when you install everything system-wide:
sudo pip install torch # PyTorch nightly for RTX 5060 Ti
sudo pip install some-other-ai-tool # Needs different CUDA version
# Result: Conflicts, broken dependencies, system-wide chaos
Problems with system-wide installation:
- Version Conflicts: RTX 5060 Ti needs PyTorch nightly, but other apps need stable PyTorch
- CUDA Mismatches: Different AI tools require different CUDA versions (12.1 vs 12.8)
- Dependency Hell: Updating one package breaks three others
- System Pollution: Failed experiments leave behind conflicting packages
- Hard to Debug: When something breaks, you can’t tell which project caused it
- Difficult Recovery: Fixing one app often breaks another
- Update Nightmare: System updates cascade through all projects simultaneously
With Virtual Environments (Isolated Installation)
# Each project gets its own isolated environment:
conda create -n swarmui python=3.11 # SwarmUI environment
conda create -n comfyui python=3.10 # ComfyUI standalone environment
conda create -n stable-diffusion python=3.11 # Stable Diffusion WebUI environment
Benefits of isolated environments:
- Perfect Isolation: Each project has exactly the versions it needs
- Easy Experimentation: Try new software without risking existing setups
- Simple Recovery: If something breaks, just delete and recreate the environment
- Multiple CUDA Versions: Different projects can use CUDA 12.1, 12.4, 12.8 simultaneously
- Clean Updates: Update one project without affecting others
- Easy Backup: Export environment configs for reproduction
- Conflict-Free: RTX 5060 Ti requirements don’t interfere with other AI tools
Real-World Example: RTX 5060 Ti Multi-Project Setup
# Project 1: SwarmUI (needs CUDA 12.8 + PyTorch nightly)
conda create -n swarmui python=3.11
conda activate swarmui
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu128
# Project 2: Stable Diffusion WebUI (needs CUDA 12.1 + stable PyTorch)
conda create -n webui python=3.10
conda activate webui
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
# Project 3: Machine Learning Research (needs specific versions)
conda create -n research python=3.9
conda activate research
pip install torch==1.13.0 torchvision==0.14.0
# All three coexist perfectly - no conflicts!
Types of Virtual Environments for Different Use Cases
1. Conda Environments (What We’ll Use)
- Purpose: Manage entire software stacks (Python + packages + system libraries)
- Best for: Complex projects with specific version requirements
- Commands:
conda activate,conda deactivate
2. Python venv (Used by ComfyUI)
- Purpose: Isolate Python packages only
- Best for: Simple Python projects
- Commands:
source venv/bin/activate,deactivate
Sharing Resources Between Virtual Environments
Critical Space-Saving Strategy: You can share CUDA installations, AI models, and other large resources between virtual environments while keeping Python packages isolated.
What Gets Shared vs What Stays Isolated
✅ SHARED Resources (System/User Level):
- CUDA Toolkit (installed once, used by all environments)
- AI Models (symlinks/shared directories)
- NVIDIA Drivers (system-wide installation)
- Large datasets (mounted/linked into environments)
- Cache directories (model downloads, pip cache)
🔒 ISOLATED Resources (Per Environment):
- Python packages (PyTorch, NumPy, etc.)
- Environment-specific configs (different model paths, settings)
- Experimental packages (testing new tools safely)
- Project-specific dependencies (different app requirements)
CUDA 12.8 Sharing Strategy
Option 1: System-Wide CUDA (Recommended for RTX 5060 Ti)
# Install CUDA 12.8 once at system level (in your swarmui conda environment)
conda activate swarmui
conda install cuda-toolkit=12.8 -c nvidia
# All other environments automatically see this CUDA installation
conda create -n comfyui python=3.11
conda activate comfyui
# CUDA 12.8 toolkit is automatically available here too!
# Verify CUDA is shared
conda activate swarmui
which nvcc # Shows: /home/user/anaconda3/envs/swarmui/bin/nvcc
conda activate comfyui
export PATH=/home/user/anaconda3/envs/swarmui/bin:$PATH
which nvcc # Now available in comfyui environment too
Option 2: Conda Environment Sharing
# Method 1: Inherit from base environment
conda create -n project2 --clone swarmui # Copy entire environment
conda activate project2
pip uninstall unwanted-packages # Remove project-specific stuff
# Method 2: Environment stacking
conda activate base
conda install cuda-toolkit=12.8 -c nvidia # Install in base
# Now all environments inherit CUDA from base
AI Model Sharing Strategies
Problem: AI models are huge (2-8GB each) and identical across projects
Solution: Central model storage with symlinks/environment variables
Strategy 1: Shared Model Directory
# Create central model storage
mkdir -p ~/AI_Models/{stable-diffusion,controlnet,embeddings,lora}
# Download models once to central location
cd ~/AI_Models/stable-diffusion
wget https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned.safetensors
# Link models into different AI projects
ln -s ~/AI_Models/stable-diffusion/* ~/Projects/SwarmUI/Models/Stable-Diffusion/
ln -s ~/AI_Models/stable-diffusion/* ~/Projects/ComfyUI/models/checkpoints/
ln -s ~/AI_Models/stable-diffusion/* ~/Projects/WebUI/models/Stable-diffusion/
Strategy 2: Environment Variables for Model Paths
# Add to ~/.bashrc for all environments to share
echo 'export AI_MODELS_PATH="$HOME/AI_Models"' >> ~/.bashrc
echo 'export HUGGINGFACE_HUB_CACHE="$HOME/AI_Models/.cache"' >> ~/.bashrc
source ~/.bashrc
# Configure each AI application to use shared paths
# SwarmUI: Edit settings to point to $AI_MODELS_PATH
# ComfyUI: Use --extra-model-paths-config pointing to shared directory
# WebUI: Use --ckpt-dir $AI_MODELS_PATH/stable-diffusion
Strategy 3: Bind Mounts (Advanced)
# Create shared model directory
sudo mkdir -p /opt/ai-models
sudo chown $USER:$USER /opt/ai-models
# Mount into different project directories
mkdir -p ~/Projects/SwarmUI/Models/shared
mkdir -p ~/Projects/ComfyUI/models/shared
# Add to /etc/fstab for permanent mounts
echo "/opt/ai-models /home/$USER/Projects/SwarmUI/Models/shared none bind 0 0" | sudo tee -a /etc/fstab
echo "/opt/ai-models /home/$USER/Projects/ComfyUI/models/shared none bind 0 0" | sudo tee -a /etc/fstab
Disk Space Comparison
Without Sharing (Wasteful):
~/Projects/SwarmUI/Models/ 8.5 GB
~/Projects/ComfyUI/models/ 8.5 GB
~/Projects/WebUI/models/ 8.5 GB
~/.cache/huggingface/ 4.2 GB
~/anaconda3/envs/swarmui/ 2.1 GB
~/anaconda3/envs/comfyui/ 2.1 GB
~/anaconda3/envs/webui/ 2.1 GB
Total: 36.0 GB
With Smart Sharing:
~/AI_Models/ 8.5 GB (central storage)
~/anaconda3/envs/swarmui/ 1.2 GB (CUDA + PyTorch only)
~/anaconda3/envs/comfyui/ 0.8 GB (PyTorch only, shares CUDA)
~/anaconda3/envs/webui/ 0.9 GB (PyTorch only, shares CUDA)
~/Projects/*/Models/ 0.1 GB (symlinks only)
Total: 11.5 GB (68% space savings!)
Practical Shared Setup for RTX 5060 Ti
1. Create Master Environment with CUDA
# This environment has CUDA 12.8 and will be the "base"
conda create -n rtx5060ti-base python=3.11
conda activate rtx5060ti-base
conda install cuda-toolkit=12.8 -c nvidia
2. Create Project-Specific Environments
# SwarmUI environment (uses base CUDA)
conda create -n swarmui python=3.11
conda activate swarmui
export PATH=/home/$USER/anaconda3/envs/rtx5060ti-base/bin:$PATH
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128
# ComfyUI environment (uses base CUDA)
conda create -n comfyui python=3.11
conda activate comfyui
export PATH=/home/$USER/anaconda3/envs/rtx5060ti-base/bin:$PATH
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
# Test both can see CUDA
conda activate swarmui && nvcc --version # Should work
conda activate comfyui && nvcc --version # Should work
3. Set Up Shared Models
# Create shared model structure
mkdir -p ~/AI_Models/{checkpoints,lora,controlnet,embeddings,vae}
# Add environment variable to all environments
echo 'export AI_MODELS_ROOT="$HOME/AI_Models"' >> ~/.bashrc
# Configure each project to use shared models
# (Specific steps depend on each application's config files)
Managing Shared Environments
Environment Activation Scripts
# Create ~/activate_swarmui.sh
cat > ~/activate_swarmui.sh << 'EOF'
#!/bin/bash
conda activate swarmui
export PATH="/home/$USER/anaconda3/envs/rtx5060ti-base/bin:$PATH"
export LD_LIBRARY_PATH="/home/$USER/anaconda3/envs/rtx5060ti-base/lib:$LD_LIBRARY_PATH"
export AI_MODELS_ROOT="$HOME/AI_Models"
echo "SwarmUI environment ready with shared CUDA and models"
cd ~/Projects/SwarmUI
EOF
chmod +x ~/activate_swarmui.sh
Dependency Management
# Pin shared CUDA version to prevent conflicts
echo "cuda-toolkit=12.8" > ~/AI_Models/cuda_requirements.txt
# Document which environments share what
cat > ~/AI_Models/sharing_map.txt << 'EOF'
CUDA 12.8: rtx5060ti-base (master), swarmui, comfyui, webui
Models: All environments via symlinks to ~/AI_Models/
Cache: Shared HuggingFace cache at ~/AI_Models/.cache
EOF
Troubleshooting Shared Setups
Issue: Environment can’t find CUDA
# Add CUDA path to environment activation
conda activate problematic-env
conda env config vars set PATH="/home/$USER/anaconda3/envs/rtx5060ti-base/bin:$PATH"
conda deactivate && conda activate problematic-env # Reload
Issue: Model not found in new environment
# Check symlinks are correct
ls -la ~/Projects/NewProject/models/
# Fix broken symlinks
ln -sf ~/AI_Models/checkpoints/* ~/Projects/NewProject/models/checkpoints/
Issue: Different CUDA versions needed
# Some projects need different CUDA versions
# Create separate base environments for each CUDA version
conda create -n cuda-121-base python=3.11
conda activate cuda-121-base
conda install cuda-toolkit=12.1 -c nvidia
conda create -n cuda-128-base python=3.11
conda activate cuda-128-base
conda install cuda-toolkit=12.8 -c nvidia
Benefits of Resource Sharing
For RTX 5060 Ti Users:
- Massive Disk Savings: 50-70% reduction in storage requirements
- Faster Setup: New environments inherit working CUDA immediately
- Model Efficiency: Download once, use everywhere
- Easier Updates: Update CUDA in one place, affects all environments
- Cost Reduction: Don’t need massive SSDs just for redundant models
Management Benefits:
- Single Source of Truth: One CUDA installation to maintain
- Consistent Versions: All projects use same CUDA toolkit
- Easier Troubleshooting: Fewer variables when debugging
- Backup Efficiency: Backup shared resources once
Bottom Line: Smart resource sharing lets you have the isolation benefits of virtual environments while avoiding the storage and complexity penalties. This is especially important for RTX 5060 Ti setups where both the software requirements and model files are exceptionally large.
1. One Environment Per AI Project
# DON'T: Mix different AI tools in one environment
conda create -n ai-everything python=3.11
conda activate ai-everything
pip install comfyui swarmui automatic1111-webui # Recipe for disaster!
# DO: Separate environment for each major project
conda create -n swarmui python=3.11 # For SwarmUI only
conda create -n comfyui python=3.11 # For ComfyUI standalone
conda create -n a1111 python=3.10 # For Automatic1111 WebUI
2. Document Your Working Environments
# When you get RTX 5060 Ti working perfectly, save the environment
conda activate swarmui
conda env export > ~/swarmui_working_env.yml
# Later, recreate exact working setup:
conda env create -f ~/swarmui_working_env.yml
3. Pin Critical Versions
# For RTX 5060 Ti, pin the working versions explicitly
pip install torch==2.9.0.dev20250628+cu128 torchvision==0.22.1 torchaudio==2.7.1
# Don't let automatic updates break your working setup
4. Environment Naming Strategy
# Use descriptive names that include key info
conda create -n swarmui-rtx5060ti-cu128 python=3.11 # Clear what it's for
conda create -n comfyui-stable-cu121 python=3.10 # Stable version
conda create -n research-temp python=3.11 # Temporary experiments
Why This Matters Specifically for RTX 5060 Ti
Your GPU is bleeding-edge, which means:
- Rapid Software Changes: PyTorch support is evolving weekly
- Version Sensitivity: Wrong CUDA version = completely broken setup
- Experimental Software: You’re often using nightly builds and beta versions
- High Setup Cost: Getting RTX 5060 Ti working takes hours – protect that investment
- Compatibility Windows: Working combinations are narrow and fragile
Virtual Environment Disaster Prevention
Common RTX 5060 Ti Disasters Prevented by Virtual Environments
Disaster 1: System Update Cascade
# Without venvs: Ubuntu update breaks everything
sudo apt upgrade # Breaks system Python, breaks all AI tools
# With venvs: Only affected environment breaks, others untouched
conda activate swarmui # Still works
conda activate research # Still works
conda activate broken-env # Only this one needs fixing
Disaster 2: Experimentation Damage
# Without venvs: Testing new AI tool breaks existing setup
pip install experimental-ai-package # Conflicts with PyTorch nightly
# Now SwarmUI is broken, hours of debugging ahead
# With venvs: Experiment safely
conda create -n experiment python=3.11
conda activate experiment
pip install experimental-ai-package # Breaks only experiment environment
conda activate swarmui # SwarmUI still perfect
Disaster 3: Dependency Conflicts
# Without venvs: Impossible to satisfy all requirements
# SwarmUI needs: PyTorch nightly + CUDA 12.8
# Other tool needs: PyTorch stable + CUDA 12.1
# Result: Neither works
# With venvs: Both work perfectly in isolation
Virtual Environment Recovery Strategies
Quick Environment Reproduction
# Save working environment for instant recovery
conda env export > ~/environments/swarmui-$(date +%Y%m%d).yml
# Restore exact working state anytime
conda env create -f ~/environments/swarmui-20250629.yml
Environment Health Checks
# Create health check script for each environment
cat > ~/check_swarmui_env.sh << 'EOF'
#!/bin/bash
conda activate swarmui
echo "Python: $(python --version)"
echo "PyTorch: $(python -c 'import torch; print(torch.__version__)')"
echo "CUDA Available: $(python -c 'import torch; print(torch.cuda.is_available())')"
echo "GPU: $(python -c 'import torch; print(torch.cuda.get_device_name(0) if torch.cuda.is_available() else "None")')"
EOF
chmod +x ~/check_swarmui_env.sh
The Virtual Environment Mindset
Think of environments like project workspaces:
- Each AI project gets its own “workshop” with specific tools
- Experiments happen in “temporary labs” that can be destroyed safely
- “Production workshops” are carefully maintained and protected
- You can have multiple workshops for different aspects of the same project
For RTX 5060 Ti users specifically:
- Your working environment is precious – protect it with isolation
- Experiments are high-risk – contain them in disposable environments
- Updates are dangerous – test in separate environments first
- Dependencies are fragile – don’t let other projects interfere
Environment Management Commands Reference
# Environment Lifecycle Management
conda create -n myproject python=3.11 # Create
conda activate myproject # Enter
conda deactivate # Exit
conda env list # List all
conda env remove -n myproject # Delete
# Environment Backup/Restore
conda env export > myproject.yml # Backup
conda env create -f myproject.yml # Restore
conda env update -f myproject.yml # Update from file
# Environment Health
conda list # What's installed
conda info # Environment details
pip list # Pip packages
When to Use Each Environment Level
System Level (No Environment Active)
# Prompt looks like: user@computer:~$
# Use for:
- Installing system packages (apt install)
- Modifying system files (sudo commands)
- Installing drivers
Conda Environment
# Prompt looks like: (environment_name) user@computer:~$
# Use for:
- Installing Python packages for your project
- Running your main applications
- Managing project-specific dependencies
Python venv
# Prompt looks like: (venv) user@computer:~$
# Use for:
- Working inside specific tool environments
- Fixing package conflicts in sub-projects
Switching Between Environments
# Check current environment
echo "Current environment: ${CONDA_DEFAULT_ENV:-'System Level'}"
# Go to system level
conda deactivate # Repeat until no prefix shows
# Activate conda environment
conda activate swarmui
# Enter a Python venv (from within a project directory)
source venv/bin/activate
# Exit Python venv
deactivate
Setting Up Conda Environment
Install Anaconda/Miniconda
If you don’t have conda installed:
# Download Miniconda
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
# Install it
bash Miniconda3-latest-Linux-x86_64.sh
# Restart terminal or run:
source ~/.bashrc
Create SwarmUI Environment
# Create dedicated environment for SwarmUI with Python 3.11
conda create -n swarmui python=3.11
# Activate the environment
conda activate swarmui
# Your prompt should now show: (swarmui) user@computer:~$
Install CUDA in Conda Environment
# Make sure you're in swarmui environment
conda activate swarmui
# Install CUDA toolkit 12.8 (required for RTX 5060 Ti)
conda install cuda-toolkit=12.8 -c nvidia
# Verify installation
nvcc --version # Should show 12.8.x
Install Compatible PyTorch
# Still in swarmui environment
# Install PyTorch nightly with CUDA 12.8 support
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128
# Test PyTorch installation
python -c "
import torch
print(f'PyTorch: {torch.__version__}')
print(f'CUDA Available: {torch.cuda.is_available()}')
if torch.cuda.is_available():
print(f'GPU: {torch.cuda.get_device_name(0)}')
"
⚠️ GOTCHA: We use pip for PyTorch because conda doesn’t have the latest nightly builds with RTX 5060 Ti support.
Installing .NET Runtime
Why SwarmUI Needs .NET
SwarmUI is a C#/.NET application that provides the web interface and manages AI backends. The actual AI processing happens in Python (ComfyUI), but the main application is .NET.
Install .NET 8.0
# Still in swarmui environment, but .NET installs system-wide
# Add Microsoft package repository
wget https://packages.microsoft.com/config/ubuntu/24.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
# Update and install .NET
sudo apt update
sudo apt install -y dotnet-runtime-8.0 dotnet-sdk-8.0
# Verify installation
dotnet --version # Should show 8.0.xxx
Installing SwarmUI
Clone and Set Up SwarmUI
# Make sure you're in swarmui conda environment
conda activate swarmui
# Create project directory
mkdir -p ~/Projects
cd ~/Projects
# Clone SwarmUI
git clone https://github.com/mcmonkeyprojects/SwarmUI.git
cd SwarmUI
# Launch SwarmUI (this will build and configure everything)
./launch-linux.sh
First Launch Process
When you run SwarmUI for the first time, it will:
- Build the .NET application (takes 1-2 minutes)
- Open web browser to installation page
- Download ComfyUI backend automatically
- Create its own Python venv for ComfyUI
- Install PyTorch (but wrong version for RTX 5060 Ti)
- Download AI models (several GB)
Expected Issues on First Run
You’ll likely see an error like:
CUDA error: no kernel image is available for execution on the device
This is expected! SwarmUI installs PyTorch with CUDA 12.4, but RTX 5060 Ti needs CUDA 12.8.
Fixing PyTorch for RTX 5060 Ti
The Problem
SwarmUI’s ComfyUI backend automatically installs PyTorch with CUDA 12.4 support, but RTX 5060 Ti requires CUDA 12.8 for its sm_120 compute capability.
The Solution: Update PyTorch in ComfyUI’s Environment
Step 1: Navigate to ComfyUI’s Environment
# Go to ComfyUI directory
cd ~/Projects/SwarmUI/dlbackend/ComfyUI
# Activate ComfyUI's Python venv
source venv/bin/activate
# Your prompt should now show: (venv) user@computer:path$
Step 2: Replace PyTorch
# Remove incompatible PyTorch
pip uninstall torch torchvision torchaudio -y
# Install PyTorch nightly with CUDA 12.8 support
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128
Step 3: Verify the Fix
# Test PyTorch with RTX 5060 Ti
python -c "
import torch
print(f'PyTorch version: {torch.__version__}')
print(f'CUDA available: {torch.cuda.is_available()}')
if torch.cuda.is_available():
print(f'GPU: {torch.cuda.get_device_name(0)}')
print(f'CUDA version: {torch.version.cuda}')
try:
x = torch.randn(10, 10, device='cuda')
y = x @ x
print('✅ CUDA operations working!')
except Exception as e:
print(f'❌ CUDA test failed: {e}')
"
You should see:
PyTorch version: 2.9.0.dev20250628+cu128
CUDA available: True
GPU: NVIDIA GeForce RTX 5060 Ti
CUDA version: 12.8
✅ CUDA operations working!
Step 4: Restart SwarmUI
# Exit ComfyUI's venv
deactivate
# Go back to SwarmUI directory
cd ~/Projects/SwarmUI
# Activate your conda environment
conda activate swarmui
# Restart SwarmUI
./launch-linux.sh
Troubleshooting and Common Issues
Driver Issues
Linux Console and Recovery Fundamentals
Understanding Linux Console Access
Linux provides multiple “virtual terminals” that you can switch between:
- tty1 (Ctrl+Alt+F1): Usually graphical desktop
- tty2 (Ctrl+Alt+F2): Sometimes graphical desktop
- tty3-tty6 (Ctrl+Alt+F3 to F6): Text-only consoles
- tty7 (Ctrl+Alt+F7): Sometimes graphical desktop (older systems)
⚠️ Key Point: When your display breaks, you can ALWAYS access text mode with Ctrl+Alt+F3!
Boot Recovery Options
If your system won’t boot to desktop after driver installation:
Option 1: Recovery Mode
# During boot, when you see GRUB menu:
# 1. Highlight Ubuntu entry
# 2. Press 'e' to edit
# 3. Find line starting with 'linux'
# 4. Add 'nomodeset' to the end
# 5. Press Ctrl+X to boot
# This boots with basic graphics, allowing you to fix drivers
Option 2: Single User Mode
# In GRUB, add 'single' or '1' to kernel parameters
# This boots to text-only root shell
# Perfect for driver removal when nothing else works
Option 3: Live USB Recovery
# Boot from Ubuntu installation USB
# Choose "Try Ubuntu"
# Mount your hard drive and fix from external system
Essential Recovery Commands Reference
Create this file for emergencies:
# Create recovery reference
cat > ~/emergency_commands.txt << 'EOF'
=== NVIDIA DRIVER EMERGENCY RECOVERY ===
1. ACCESS TEXT MODE:
Ctrl+Alt+F3 (or F4, F5, F6)
2. REMOVE NVIDIA DRIVER:
sudo nvidia-uninstall
3. IF NVIDIA-UNINSTALL MISSING:
sudo apt remove --purge nvidia* -y
sudo rm -rf /etc/X11/xorg.conf
4. REBOOT (Ubuntu 24.04 auto-recovers graphics):
sudo reboot
5. CHECK DISPLAY MANAGER (if needed):
sudo systemctl status gdm3
sudo systemctl restart gdm3
=== BOOT WITH BASIC GRAPHICS ===
In GRUB menu, edit Ubuntu entry and add: nomodeset
=== CHECK WHAT'S RUNNING ===
lspci -k | grep -A 2 -i "VGA" # Check graphics hardware
lsmod | grep nvidia # Check loaded modules
systemctl status gdm3 # Check display manager
EOF
echo "Recovery commands saved to ~/emergency_commands.txt"
cat ~/emergency_commands.txt
Problem: Black Screen After Driver Installation
Solution: The manual .run installer sometimes conflicts with existing drivers
# Boot into recovery mode or text mode (Ctrl+Alt+F3)
# Uninstall any existing NVIDIA drivers
sudo apt remove --purge nvidia* -y
sudo apt autoremove -y
# Reinstall the manual driver
sudo ./NVIDIA-Linux-x86_64-575.57.08-open.run
# If issues persist, try installing with --no-opengl-files flag
sudo ./NVIDIA-Linux-x86_64-575.57.08-open.run --no-opengl-files
Complete Driver Removal and System Reset
If you need to completely start over or switch back to Ubuntu’s default drivers:
Method 1: NVIDIA Uninstaller (Preferred)
# Access text mode if display is broken
Ctrl + Alt + F3
# Run NVIDIA's uninstaller
sudo nvidia-uninstall
# If that command doesn't exist, the driver wasn't installed properly
# Proceed to Method 2
Method 2: Manual Cleanup
# Remove all NVIDIA packages
sudo apt remove --purge nvidia* libnvidia* -y
sudo apt autoremove -y
# Remove manual installations
sudo rm -rf /usr/lib/nvidia*
sudo rm -rf /usr/lib32/nvidia*
sudo rm -rf /usr/share/nvidia*
# Remove configuration files
sudo rm -rf /etc/X11/xorg.conf
sudo rm -rf /etc/X11/xorg.conf.backup
# Remove any custom driver files
sudo find /lib/modules -name "*nvidia*" -delete
sudo find /usr/src -name "*nvidia*" -delete 2>/dev/null
Method 3: Return to Ubuntu Default Driver (Usually Not Needed)
# Ubuntu 24.04 has improved automatic graphics handling
# After removing NVIDIA drivers, the system will automatically use:
# - Built-in kernel graphics drivers
# - Automatic fallback display drivers
# - Basic but functional desktop display
# Only run this if you specifically need to force driver detection
sudo ubuntu-drivers devices # See what's available
sudo ubuntu-drivers autoinstall # Install recommended driver (if any)
# Update initramfs and reboot
sudo update-initramfs -u
sudo reboot
⚠️ Important Update: Ubuntu 24.04 has significantly improved graphics driver handling. When you remove NVIDIA drivers, the system automatically falls back to working display drivers without needing manual intervention. You’ll get a functional desktop immediately after removing the NVIDIA driver and rebooting.
Verification After Cleanup
# Check no NVIDIA drivers remain
dpkg -l | grep nvidia
lsmod | grep nvidia
# Check what graphics system is active
glxinfo | grep renderer # Shows current graphics renderer
lspci -k | grep -A 2 -i "VGA\|3D" # Shows graphics hardware and driver
# After cleanup, you should see basic graphics working automatically
# No need to manually install replacement drivers in Ubuntu 24.04
Problem: nvidia-smi Shows Wrong Driver Version
Solution: Ensure old drivers are completely removed before manual installation
# Check for conflicting drivers
dpkg -l | grep nvidia-driver
# Remove any found packages
sudo apt remove --purge nvidia-driver-* -y
sudo reboot
CUDA Issues
Problem: “CUDA error: no kernel image is available”
Solution: Install PyTorch nightly with CUDA 12.8 (see section above)
Problem: Multiple CUDA Versions Conflict
Solution: Remove all system CUDA, use only conda environments
# Go to system level
conda deactivate
# Remove system CUDA (see removal section above)
Environment Issues
Problem: Can’t Find nvcc
Solution: Check which environment you’re in
# In conda environment:
conda activate swarmui
which nvcc # Should point to conda environment
# In system:
conda deactivate
which nvcc # Should return "not found" (good!)
Problem: PyTorch Can’t Find CUDA
Solution: Ensure you’re using PyTorch nightly
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128
SwarmUI Issues
Problem: SwarmUI Won’t Start
Solution: Check .NET installation
dotnet --version # Should show 8.0.x
Problem: Models Won’t Download
Solution: Check internet connection and disk space
df -h # Check disk space
Understanding What We Built
Environment Architecture
System Level
├── NVIDIA Driver 575.x (system-wide)
├── .NET 8.0 Runtime (system-wide)
└── Conda Environment: swarmui
├── Python 3.11
├── CUDA Toolkit 12.8
├── PyTorch Nightly (CUDA 12.8)
└── SwarmUI Project
└── ComfyUI Backend (separate venv)
└── PyTorch Nightly (CUDA 12.8) ← Fixed version
How the Components Work Together
- NVIDIA Driver: Enables GPU communication at hardware level
- Conda Environment: Provides isolated software stack for SwarmUI
- SwarmUI (.NET): Web interface and workflow management
- ComfyUI (Python): AI processing backend with its own environment
- PyTorch: GPU acceleration framework for AI computations
File Locations
# SwarmUI main application
~/Projects/SwarmUI/
# ComfyUI backend
~/Projects/SwarmUI/dlbackend/ComfyUI/
# AI models (downloaded automatically)
~/Projects/SwarmUI/Models/
# Generated images
~/Projects/SwarmUI/Outputs/
Port Configuration
- SwarmUI Web Interface: http://localhost:7801
- ComfyUI Backend: http://localhost:7822 (internal communication)
Quick Start Commands for Future Use
Starting SwarmUI
# Activate environment and start
conda activate swarmui
cd ~/Projects/SwarmUI
./launch-linux.sh
Updating SwarmUI
conda activate swarmui
cd ~/Projects/SwarmUI
git pull
./launch-linux.sh
Checking GPU Usage
# Monitor GPU while generating images
watch -n 1 nvidia-smi
Safe System Updates and Maintenance
⚠️ CRITICAL: Ubuntu updates can break your RTX 5060 Ti setup in multiple ways. Here’s how to update safely without destroying hours of configuration work.
Why Updates Break RTX 5060 Ti Setups
Kernel Updates:
- New kernels may not have DKMS modules rebuilt
- Manual NVIDIA drivers need recompilation for new kernels
- Different kernel versions may have compatibility issues
Driver Conflicts:
- Ubuntu may try to install conflicting NVIDIA drivers from repositories
- Automatic driver updates can downgrade your manually installed 575.x driver
- CUDA toolkit versions may become mismatched
Package Dependencies:
- PyTorch nightly builds may conflict with updated system packages
- Conda environments can break with Python library updates
- .NET runtime updates may affect SwarmUI
The Safe Update Strategy
1. Create System Backup Before Any Updates
# Install timeshift if not already installed
sudo apt install timeshift
# Create a full system backup
sudo timeshift --create --comments "Before Ubuntu update - RTX 5060 Ti working"
# Verify backup was created
sudo timeshift --list
2. Hold Critical Packages to Prevent Auto-Updates
# Prevent Ubuntu from auto-updating NVIDIA packages
sudo apt-mark hold nvidia-driver-* libnvidia-*
# Check what packages are held
apt-mark showhold
# Prevent kernel updates (optional, for maximum safety)
sudo apt-mark hold linux-generic linux-image-generic linux-headers-generic
3. Update in Safe Stages
Stage 1: Non-critical updates only
# Update package lists
sudo apt update
# See what wants to be updated
apt list --upgradable
# Update only non-critical packages (avoid kernel, nvidia, graphics)
sudo apt upgrade --exclude="linux-* nvidia-* xorg-* mesa-*"
Stage 2: Test system stability
# Reboot to test current updates
sudo reboot
# Verify RTX 5060 Ti still works
nvidia-smi
conda activate swarmui
cd ~/Projects/SwarmUI
./launch-linux.sh
# Test image generation to confirm everything works
Stage 3: Kernel updates (if needed)
# Only after confirming system is stable
sudo apt-mark unhold linux-*
sudo apt upgrade linux-*
# After kernel update, check DKMS rebuilt NVIDIA modules
sudo reboot
dkms status # Should show nvidia modules installed
nvidia-smi # Should still work
4. Ubuntu Version Upgrades (24.04 → 24.10, etc.)
DON’T do direct version upgrades with RTX 5060 Ti setup!
Instead, plan for a clean installation:
# 1. Document your current working setup
nvidia-smi --query-gpu=driver_version --format=csv > ~/rtx5060ti_setup.txt
echo "CUDA version: $(nvcc --version)" >> ~/rtx5060ti_setup.txt
echo "PyTorch: $(python -c 'import torch; print(torch.__version__)')" >> ~/rtx5060ti_setup.txt
conda env export > ~/swarmui_environment.yml
# 2. Back up your projects and models
tar -czf ~/swarmui_backup.tar.gz ~/Projects/SwarmUI/Outputs ~/Projects/SwarmUI/Models
# 3. Fresh install new Ubuntu version
# 4. Follow this guide again with your documented versions
Automatic Update Prevention
Disable Automatic Updates Completely
# Edit update settings
sudo nano /etc/apt/apt.conf.d/20auto-upgrades
# Change contents to:
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "0";
# Disable automatic reboot after updates
sudo systemctl disable unattended-upgrades
Selective Update Control
# Create custom update script
cat > ~/safe_update.sh << 'EOF'
#!/bin/bash
echo "=== Safe RTX 5060 Ti Update Script ==="
# Create backup
echo "Creating system backup..."
sudo timeshift --create --comments "Before safe update $(date)"
# Update package lists
echo "Updating package lists..."
sudo apt update
# Show what wants updating
echo "Packages that want to update:"
apt list --upgradable | grep -v "linux-\|nvidia-\|xorg-\|mesa-"
# Prompt user
read -p "Continue with safe updates? (y/N): " confirm
if [[ $confirm == [yY] ]]; then
sudo apt upgrade --exclude="linux-* nvidia-* xorg-* mesa-*"
echo "Safe updates complete. Test your system before updating kernel/drivers."
else
echo "Update cancelled."
fi
EOF
chmod +x ~/safe_update.sh
Recovery After Broken Updates
If NVIDIA Driver Breaks After Update
# 1. Boot to text mode (Ctrl+Alt+F3)
# 2. Check what broke
dkms status
nvidia-smi # Will likely fail
# 3. Reinstall NVIDIA driver
sudo ./NVIDIA-Linux-x86_64-575.57.08-open.run
# 4. If that fails, restore from backup
sudo timeshift --restore
If SwarmUI Breaks After Update
# Check conda environment
conda activate swarmui
python -c "import torch; print(torch.cuda.is_available())"
# If PyTorch broken, reinstall nightly
cd ~/Projects/SwarmUI/dlbackend/ComfyUI
source venv/bin/activate
pip uninstall torch torchvision torchaudio -y
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128
Nuclear Option: Complete Restore
# If everything is broken, restore last working backup
sudo timeshift --restore --snapshot "Before Ubuntu update - RTX 5060 Ti working"
Update Schedule Recommendations
Monthly Safe Update Routine
# 1st week of month: Create backup and test minor updates
# 2nd week: Monitor for issues, apply fixes
# 3rd week: Consider kernel updates if needed
# 4th week: Document any changes, prepare for next month
Before Any Update Session
# Essential pre-update checklist
echo "=== Pre-Update Checklist ==="
echo "1. ✅ System backup created"
echo "2. ✅ RTX 5060 Ti currently working"
echo "3. ✅ Critical packages held"
echo "4. ✅ Have 2+ hours for troubleshooting"
echo "5. ✅ SwarmUI working and tested"
What NOT to Do
❌ Never do these:
sudo apt update && sudo apt upgrade -y(blind updates)sudo do-release-upgrade(version upgrades)- Install Ubuntu’s automatic NVIDIA drivers over your manual installation
- Update during important projects or deadlines
- Skip backups “just this once”
❌ Warning signs to stop updating:
- Seeing nvidia-driver packages in upgrade list
- Kernel version jumping by more than one minor version
- Large numbers of packages (>50) wanting updates
- Any mention of “removing” packages you need
Emergency Contacts and Resources
Keep these handy during updates:
# Emergency recovery commands (save to ~/emergency_update_recovery.txt)
echo "=== EMERGENCY UPDATE RECOVERY ===" > ~/emergency_update_recovery.txt
echo "1. Ctrl+Alt+F3 for text mode" >> ~/emergency_update_recovery.txt
echo "2. sudo timeshift --list" >> ~/emergency_update_recovery.txt
echo "3. sudo timeshift --restore [snapshot-name]" >> ~/emergency_update_recovery.txt
echo "4. Alternative: sudo nvidia-uninstall && reboot" >> ~/emergency_update_recovery.txt
echo "5. Recovery guide: ~/emergency_commands.txt" >> ~/emergency_update_recovery.txt
Key Takeaways for RTX 5060 Ti Users
Critical Requirements
- Driver 575.x or newer – older drivers simply won’t work
- CUDA 12.8 – required for Blackwell architecture support
- PyTorch Nightly – stable releases don’t support sm_120 yet
- Clean environment setup – avoid conflicts with system CUDA
Why This Setup Works
- Isolated environments prevent software conflicts
- Latest nightly builds provide cutting-edge GPU support
- Proper CUDA version matches GPU architecture requirements
- Clean system state eliminates interference from old packages
Future Considerations
As RTX 5060 Ti support matures:
- Stable PyTorch releases will eventually support sm_120
- System package managers will include compatible CUDA versions
- Driver installation will become more automated
For now, this manual setup ensures you get the best performance from your RTX 5060 Ti with SwarmUI.
Success Indicator: When everything is working correctly, you should see SwarmUI detect your RTX 5060 Ti and successfully generate images without CUDA errors. GPU memory usage should be visible in nvidia-smi, and generation should be fast thanks to your 16GB of VRAM.
This guide reflects the state of RTX 5060 Ti support as of June 2025. As software support improves, some steps may become simpler or unnecessary.
Hi,
Real Thank You very much about sharing experience !!!