Topten.nvpatch
0.1.108
dotnet tool install --global Topten.nvpatch --version 0.1.108
dotnet new tool-manifest
dotnet tool install --local Topten.nvpatch --version 0.1.108
#tool dotnet:?package=Topten.nvpatch&version=0.1.108
nuke :add-package Topten.nvpatch --version 0.1.108
nvpatch
A simple command line utitly to patch existing x86 and x64 executables to include the
export symbols NvOptimusEnablement and AmdPowerXpressRequestHighPerformance
as required to enable the discreet GPU on some machines (mainly laptops)
Originally written to be used with the game Sector's Edge it should work with any x86 or x64 Windows application.
Experimental Status
At this stage, this project should be considered experimental - I've only just got it working and have only done some very basic testing. I'm keen to hear how it works for others.
If you find problems or have suggestions, please log an issue
Or, if it works for you, please drop me an email and let me know.
Installation and Usage
To install:
dotnet tool install -g Topten.nvpatch
(requires .NET 8 installed)
One installed you can patch an existing executable with the following command:
nvpatch --enable MyProgram.exe
x64 support seems stable. x86 support has just been added and seems to basically work, but hasn't been fully tested.
How it Works
See this blog post.
More Options
nvpatch v0.1.106.0
Copyright c 2021 Topten Software. All Rights Reserved
Usage: nvpatch [options] <inputfile.exe> [<outputfile.exe]
Adds, updates or queries the export symbols 'NvOptimusEnablement'
and 'AmdPowerXpressRequestHighPerformance' in an existing .exe
Options:
--enable sets GPU export symbols to 1 (adding if missing
--disable sets GPU export symbols to 0 (if it exists)
--status shows the current NvOptimusEnablement status
--help show this help, or help for a command
--version show version information
License
Copyright © 2014-2025 Topten Software.
All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License") you may not use this product except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.</p>
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.