| name | optiscaler-client-fsr4-manager |
| description | OptiScaler Client FSR4 manager for game upscaling, frame generation, and performance optimization with AMD FSR4, DLSS replacement, and mod management |
| triggers | ["how do I install OptiScaler FSR4 for my games","configure FSR4 upscaling with OptiScaler","replace DLSS with FSR4 using OptiScaler","manage game profiles with OptiScaler Client","troubleshoot OptiScaler FSR4 artifacts or performance","set up frame generation with OptiScaler","scan Steam library for OptiScaler compatible games","configure OptiScaler INI settings for game optimization"] |
OptiScaler Client FSR4 Manager
Skill by ara.so — Devtools Skills collection.
OptiScaler Client FSR4 is a desktop utility for managing AMD FidelityFX Super Resolution 4 (FSR4) upscaling and frame generation technology in PC games. It provides a modern GUI for:
- Game library scanning (Steam, Epic, manual paths)
- DLSS to FSR4 replacement (DLL patching)
- Profile management with per-game INI configurations
- Frame generation and low-latency mode toggles
- Auto-detection of compatible games
- Mod management for upscaling technologies (FSR, XeSS, DLSS)
Built with C# and Avalonia UI, it targets Windows 11 and Linux (Steam Deck compatible).
Installation
-
Download the latest release:
curl -L -o OptiscalerClient.zip \
https://github.com/Devanshu-dev/optiscaler-client-fsr4/releases/download/v1.0.5/OptiscalerClient-1.0.5.zip
unzip OptiscalerClient.zip -d OptiScaler
cd OptiScaler
-
Run the application:
OptiscalerClient.exe
chmod +x OptiscalerClient
./OptiscalerClient
-
First launch:
- Application will prompt for administrator rights (required for DLL patching)
- Automatically scans common game library locations
- Creates default configuration in
%APPDATA%/OptiScaler or ~/.config/OptiScaler
Key Features and Configuration
Game Library Scanning
The application auto-detects games from:
- Steam library folders
- Epic Games Store
- Custom paths
Manual game addition:
var game = new GameEntry
{
Name = "Cyberpunk 2077",
ExecutablePath = @"C:\Games\Cyberpunk 2077\bin\x64\Cyberpunk2077.exe",
InstallDirectory = @"C:\Games\Cyberpunk 2077",
SupportsFSR4 = true,
SupportsDLSS = true
};
Configuration file (games.json):
{
"games": [
{
"name": "Cyberpunk 2077",
"path": "C:\\Games\\Cyberpunk 2077\\bin\\x64",
"executable": "Cyberpunk2077.exe",
"dlss_detected": true,
"fsr4_enabled": true,
"profile": "balanced"
}
]
}
INI Configuration Management
OptiScaler uses INI files for per-game settings. These are typically placed in the game's executable directory.
Example nvngx.ini (FSR4 configuration):
[FSR4]
Preset = Balanced
Sharpness = 0.7
FrameGeneration = true
FrameGenerationQuality = High
LowLatency = true
EnableINT8 = true
TemporalAA = true
ShowDebugOverlay = false
LogLevel = Warning
C# code to generate/update INI:
using System.IO;
using System.Text;
public class IniConfigManager
{
public static void CreateFSR4Config(string gamePath, FSR4Settings settings)
{
var iniPath = Path.Combine(gamePath, "nvngx.ini");
var sb = new StringBuilder();
sb.AppendLine("[FSR4]");
sb.AppendLine($"Preset = {settings.Preset}");
sb.AppendLine($"Sharpness = {settings.Sharpness:F1}");
sb.AppendLine($"FrameGeneration = {settings.FrameGeneration.ToString().ToLower()}");
sb.AppendLine($"FrameGenerationQuality = {settings.FrameGenQuality}");
sb.AppendLine($"LowLatency = {settings.LowLatency.ToString().ToLower()}");
sb.AppendLine($"EnableINT8 = {settings.EnableINT8.ToString().ToLower()}");
sb.AppendLine($"TemporalAA = {settings.TemporalAA.ToString().ToLower()}");
sb.AppendLine($"ShowDebugOverlay = false");
sb.AppendLine($"LogLevel = {settings.LogLevel}");
File.WriteAllText(iniPath, sb.ToString());
}
}
public class FSR4Settings
{
public string Preset { get; set; } = "Balanced";
public float Sharpness { get; set; } = 0.7f;
public bool FrameGeneration { get; set; } = true;
public string FrameGenQuality { get; set; } = "High";
public bool LowLatency { get; set; } = true;
public bool EnableINT8 { get; set; } = true;
public bool TemporalAA { get; set; } = true;
public string LogLevel { get; set; } = "Warning";
}
DLSS to FSR4 Replacement (DLL Patching)
OptiScaler replaces NVIDIA DLSS DLLs with FSR4-enabled versions:
DLL files replaced:
nvngx_dlss.dll → FSR4 wrapper
nvngx.dll → OptiScaler bridge
_nvngx.dll → Backup/compatibility layer
C# patching logic:
using System.IO;
using System.Security.Cryptography;
public class DLLPatcher
{
private readonly string _optiscalerDllsPath;
public DLLPatcher(string optiscalerPath)
{
_optiscalerDllsPath = Path.Combine(optiscalerPath, "dlls");
}
public async Task PatchGameAsync(string gameExecutablePath)
{
var gameDir = Path.GetDirectoryName(gameExecutablePath);
var dlssPath = Path.Combine(gameDir, "nvngx_dlss.dll");
if (File.Exists(dlssPath))
{
var backupPath = Path.Combine(gameDir, "nvngx_dlss.dll.backup");
if (!File.Exists(backupPath))
{
File.Copy(dlssPath, backupPath, false);
}
}
var fsr4WrapperPath = Path.Combine(_optiscalerDllsPath, "nvngx_dlss.dll");
var optiscalerBridgePath = Path.Combine(_optiscalerDllsPath, "nvngx.dll");
File.Copy(fsr4WrapperPath, dlssPath, true);
File.Copy(optiscalerBridgePath, Path.Combine(gameDir, "nvngx.dll"), true);
if (!VerifyDllIntegrity(dlssPath))
{
throw new InvalidOperationException("DLL integrity check failed");
}
}
private bool VerifyDllIntegrity(string dllPath)
{
using var md5 = MD5.Create();
using var stream = File.OpenRead(dllPath);
var hash = md5.ComputeHash(stream);
return true;
}
public void RestoreOriginal(string gameExecutablePath)
{
var gameDir = Path.GetDirectoryName(gameExecutablePath);
var dlssPath = Path.Combine(gameDir, "nvngx_dlss.dll");
var backupPath = Path.Combine(gameDir, "nvngx_dlss.dll.backup");
if (File.Exists(backupPath))
{
File.Copy(backupPath, dlssPath, true);
File.Delete(backupPath);
}
File.Delete(Path.Combine(gameDir, "nvngx.dll"));
}
}
Profile Management
Profile structure:
public class GameProfile
{
public string GameName { get; set; }
public string ProfileName { get; set; } = "Default";
public FSR4Settings FSR4 { get; set; }
public PatchingOptions Patching { get; set; }
public bool AutoApply { get; set; } = false;
}
public class PatchingOptions
{
public bool EnableOptiPatcher { get; set; } = true;
public bool EnableNukeMFG { get; set; } = false;
public bool EnableFakeNvAPI { get; set; } = true;
}
public class ProfileManager
{
private readonly string _profilesPath;
public ProfileManager(string configPath)
{
_profilesPath = Path.Combine(configPath, "profiles");
Directory.CreateDirectory(_profilesPath);
}
public void SaveProfile(GameProfile profile)
{
var profilePath = Path.Combine(_profilesPath, $"{profile.GameName}.json");
var json = System.Text.Json.JsonSerializer.Serialize(profile, new System.Text.Json.JsonSerializerOptions
{
WriteIndented = true
});
File.WriteAllText(profilePath, json);
}
public GameProfile LoadProfile(string gameName)
{
var profilePath = Path.Combine(_profilesPath, $"{gameName}.json");
if (!File.Exists(profilePath))
return CreateDefaultProfile(gameName);
var json = File.ReadAllText(profilePath);
return System.Text.Json.JsonSerializer.Deserialize<GameProfile>(json);
}
private GameProfile CreateDefaultProfile(string gameName)
{
return new GameProfile
{
GameName = gameName,
ProfileName = "Default",
FSR4 = new FSR4Settings(),
Patching = new PatchingOptions()
};
}
}
Frame Generation Configuration
Enable frame generation:
public class FrameGenerationConfig
{
public enum FGMode
{
Off,
Native,
Software,
Hybrid
}
public static void ConfigureFrameGen(string gameDir, FGMode mode, int targetFPS = 60)
{
var configPath = Path.Combine(gameDir, "nvngx.ini");
var lines = new List<string>();
lines.Add("[FrameGeneration]");
lines.Add($"Enabled = {(mode != FGMode.Off).ToString().ToLower()}");
lines.Add($"Mode = {mode}");
lines.Add($"TargetFPS = {targetFPS}");
lines.Add($"MinFPSThreshold = {targetFPS / 2}");
lines.Add($"MotionVectorQuality = High");
lines.Add($"HudFix = true");
lines.Add($"RefreshRateSync = true");
lines.Add("[Latency]");
lines.Add("LowLatencyMode = true");
lines.Add("RefreshRateBoost = true");
lines.Add("FramePacing = true");
File.WriteAllLines(configPath, lines);
}
}
Common Usage Patterns
Pattern 1: Auto-Configure Game on Detection
public class AutoConfigService
{
private readonly ProfileManager _profileManager;
private readonly DLLPatcher _patcher;
private readonly IniConfigManager _iniManager;
public async Task AutoConfigureGameAsync(GameEntry game)
{
var profile = _profileManager.LoadProfile(game.Name);
if (game.Name.Contains("Cyberpunk"))
{
profile.FSR4.Preset = "Quality";
profile.FSR4.Sharpness = 0.8f;
profile.Patching.EnableNukeMFG = true;
}
else if (game.Name.Contains("Horizon"))
{
profile.FSR4.Preset = "Balanced";
profile.FSR4.FrameGeneration = true;
}
await _patcher.PatchGameAsync(game.ExecutablePath);
IniConfigManager.CreateFSR4Config(
Path.GetDirectoryName(game.ExecutablePath),
profile.FSR4
);
_profileManager.SaveProfile(profile);
}
}
Pattern 2: Batch Processing Multiple Games
public class BatchProcessor
{
public async Task ProcessLibraryAsync(List<GameEntry> games, FSR4Settings globalSettings)
{
var tasks = new List<Task>();
foreach (var game in games.Where(g => g.SupportsDLSS))
{
tasks.Add(Task.Run(async () =>
{
try
{
Console.WriteLine($"Processing {game.Name}...");
var patcher = new DLLPatcher(Environment.GetFolderPath(
Environment.SpecialFolder.ApplicationData) + "\\OptiScaler");
await patcher.PatchGameAsync(game.ExecutablePath);
IniConfigManager.CreateFSR4Config(
Path.GetDirectoryName(game.ExecutablePath),
globalSettings
);
Console.WriteLine($"✓ {game.Name} configured successfully");
}
catch (Exception ex)
{
Console.WriteLine($"✗ {game.Name} failed: {ex.Message}");
}
}));
}
await Task.WhenAll(tasks);
}
}
Pattern 3: CLI Automation
public class OptiScalerCLI
{
public static async Task Main(string[] args)
{
var command = args.Length > 0 ? args[0] : "help";
switch (command.ToLower())
{
case "scan":
await ScanLibraryAsync();
break;
case "patch":
if (args.Length < 2)
{
Console.WriteLine("Usage: optiscaler patch <game-path>");
return;
}
await PatchGameAsync(args[1]);
break;
case "restore":
if (args.Length < 2)
{
Console.WriteLine("Usage: optiscaler restore <game-path>");
return;
}
RestoreGame(args[1]);
break;
case "config":
if (args.Length < 3)
{
Console.WriteLine("Usage: optiscaler config <game-path> <preset>");
return;
}
ConfigureGame(args[1], args[2]);
break;
default:
ShowHelp();
break;
}
}
private static async Task PatchGameAsync(string gamePath)
{
var patcher = new DLLPatcher(GetOptiScalerPath());
await patcher.PatchGameAsync(gamePath);
Console.WriteLine($"Game patched: {gamePath}");
}
private static void ConfigureGame(string gamePath, string preset)
{
var settings = new FSR4Settings { Preset = preset };
IniConfigManager.CreateFSR4Config(
Path.GetDirectoryName(gamePath),
settings
);
Console.WriteLine($"Configuration applied: {preset}");
}
private static string GetOptiScalerPath()
{
return Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
"OptiScaler"
);
}
}
Troubleshooting
Visual Artifacts
Problem: Ghosting, shimmering, or temporal artifacts
Solution:
var settings = new FSR4Settings
{
Preset = "Quality",
Sharpness = 0.5f,
TemporalAA = true,
};
Poor Performance
Problem: FPS drops below expectations
Solution:
var settings = new FSR4Settings
{
Preset = "Performance",
EnableINT8 = true,
FrameGeneration = false,
LowLatency = true
};
Game Crashes or Won't Start
Problem: Game fails to launch after patching
Solution:
var patcher = new DLLPatcher(GetOptiScalerPath());
patcher.RestoreOriginal(gameExecutablePath);
High Input Lag with Frame Generation
Problem: Noticeable input latency
Solution:
[FrameGeneration]
Enabled = true
MinFPSThreshold = 40
[Latency]
LowLatencyMode = true
RefreshRateBoost = true
FramePacing = true
AsyncCompute = true
DLL Patching Permission Errors
Problem: Access denied when copying DLLs
Solution:
using System.Diagnostics;
using System.Security.Principal;
public static bool IsAdministrator()
{
var identity = WindowsIdentity.GetCurrent();
var principal = new WindowsPrincipal(identity);
return principal.IsInRole(WindowsBuiltInRole.Administrator);
}
public static void RestartAsAdmin()
{
if (!IsAdministrator())
{
var processInfo = new ProcessStartInfo
{
UseShellExecute = true,
FileName = Process.GetCurrentProcess().MainModule.FileName,
Verb = "runas"
};
try
{
Process.Start(processInfo);
Environment.Exit(0);
}
catch (Exception ex)
{
Console.WriteLine($"Failed to restart as admin: {ex.Message}");
}
}
}
Game-Specific Configuration
Cyberpunk 2077:
[FSR4]
Preset = Quality
Sharpness = 0.8
FrameGeneration = true
TemporalAA = true
MotionVectorScale = 1.0
[Patching]
EnableNukeMFG = true
Red Dead Redemption 2:
[FSR4]
Preset = Balanced
Sharpness = 0.6
FrameGeneration = false
TemporalJitter = 0.3
[Compatibility]
ForceDX12 = true
DisableVulkan = true
Forza Horizon 6:
[FSR4]
Preset = Performance
FrameGeneration = true
MotionVectorQuality = High
HudFix = true
Environment Variables
OptiScaler respects the following environment variables:
export OPTISCALER_CONFIG_DIR="$HOME/.config/optiscaler"
export OPTISCALER_DLL_PATH="/opt/optiscaler/dlls"
export OPTISCALER_DEBUG=1
export OPTISCALER_FORCE_PRESET="Quality"
export OPTISCALER_DISABLE_FRAMEGEN=1
Advanced Configuration
Custom Sharpening Filters
[FSR4]
Sharpness = 0.7
SharpeningFilter = AMD_CAS
[CAS]
Strength = 0.7
EdgeAdaptive = true
[NIS]
Strength = 0.5
Multiple Profile Presets
public class PresetLibrary
{
public static Dictionary<string, FSR4Settings> Presets = new()
{
["MaxQuality"] = new FSR4Settings
{
Preset = "Ultra Quality",
Sharpness = 0.9f,
FrameGeneration = false,
EnableINT8 = false
},
["MaxPerformance"] = new FSR4Settings
{
Preset = "Ultra Performance",
Sharpness = 0.4f,
FrameGeneration = true,
EnableINT8 = true
},
["Balanced"] = new FSR4Settings
{
Preset = "Balanced",
Sharpness = 0.7f,
FrameGeneration = true,
EnableINT8 = true
}
};
}
This skill provides comprehensive guidance for using OptiScaler Client FSR4 to manage game upscaling, patch DLSS to FSR4, configure profiles, and troubleshoot common issues in a C# codebase with Avalonia UI.