README restructuring: new install instructions with pip, services are now a separate file, development guide, manual unistall steps. I tried to follow some of the suggestions from @brockar. Many of the commands still don't work or need testing

This commit is contained in:
HackTestes
2025-07-05 12:42:00 -03:00
parent 222c318c6c
commit 28569044fa
6 changed files with 297 additions and 226 deletions

48
DEVELOPMENT.md Normal file
View File

@@ -0,0 +1,48 @@
# Development guidelines
> [!IMPORTANT]
> All paths are relative to the project's root directory, so make sure to `cd` after cloning the repository. If this is not done, some imports may fail.
## Running the project
```bash
python ./src/caioh_nvml_gpu_control/nvml_gpu_control.py help
```
## Local install
```bash
pip install .
```
## Running unit tests
```bash
python ./tests/test_nvml.py -b
```
## Versioning
Version number scheme: XX.YY.ZZ
* XX: represent breaking changes to the CLI interface. Since users rely on their scripts working correctly and this is the public interface, I will consider it the same as breaking API changes.
* YY: represents new features that do not break existing ones (otherwise it would be XX).
* ZZ: representes changes that don't break anything. It could be a code refactor or new comments.
## Code style
* variable_name
* function_name
* ObjectOrClassName
## Submitting code rules
When submmiting code to this project, pay attention to some rules:
* Other dependencies are DISALLOWED, I want to limit the dependencies as a security measure (just remember the xz incident). You are free to try to convince me, but your contribution will most likely be rejected
* Code should be testable, so please include unit tests to your code. If you think that certain parts are just too hard to make tests, include a justification

42
MANUAL_INSTALL.md Normal file
View File

@@ -0,0 +1,42 @@
# Manual Uninstall
You only need to remove the directory (BE EXTRA CAREFUL WITH THE *RM* COMMAND). You can also use the GUI to simply delete the directory if you find that easier and safer.
Useful docs (read before running the commands):
* [Remove-Item](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/remove-item?view=powershell-7.4)
* [rm man page](https://man7.org/linux/man-pages/man1/rm.1.html)
```bash
# Windows - you can run first with the -WhatIf parameter to test
Remove-Item -Confirm -Force -Recurse -Path 'C:\Program Files\User_NVIDIA_GPU_Control\'
# Linux
rm --interactive --preserve-root -R '/usr/bin/User_NVIDIA_GPU_Control'
```
## Services
Don't forget to remove the old startup services as well
### Windows
* Run the command in an admin prompt
```cmd
schtasks /delete /tn "User NVIDIA GPU Control Task"
```
### Linux
* Run the command as root for systemd
```bash
sudo rm -i /etc/systemd/system/unofficial-gpu-nvml-control.service
```
* Edit root's crontab (you just need to fix the command to the new one)
```bash
sudo crontab -e
```

294
README.md
View File

@@ -17,13 +17,13 @@ To use it, you must have installed:
* NVIDIA's proprietary drivers (>= v520)
* Python 3
* [nvidia-ml-py](https://pypi.org/project/nvidia-ml-py/) (current version used: 12.570.86)
* [nvidia-ml-py](https://pypi.org/project/nvidia-ml-py/) (NVIDIA's official python bindings)
> [!NOTE]
> Your distro may package the nvidia-ml-py, so chek it first
> Windows path if using admin: `C:\Program Files\Python313\Lib\site-packages`
You will also need **admin/root** privileges to be able to **set the fan speed**.
You will also need **admin/root** privileges to be able to **set the settings**.
## Why I am creating this project?
@@ -35,105 +35,120 @@ Because of multiple reasons:
Now that NVIDIA added the functions to work on any CUDA supported card on drivers equal or higher than v520 (see Change Log [here](https://docs.nvidia.com/deploy/nvml-api/change-log.html#change-log)), it is possible to control GeForce cards' fans through NVML! This means that I can get perfect Wayland support as well, since NVML doesn't depend on a display server.
![NVIDIA NVML change logs](img/NVIDIA_NVML_change_logs_515.jpeg)
![NVIDIA NVML change logs](img/NVIDIA_NVML_change_logs_520.jpeg)
NVIDIA's change log
```
Changes between v515 and v520
The following new functionality is exposed on NVIDIA display drivers version 520 Production or later.
...
Added nvmlDeviceGetFanControlPolicy_v2 API to report the control policy for a specified GPU fan.
Added nvmlDeviceSetFanControlPolicy API to set the control policy for a specified GPU fan.
Changes between v510 and v515
The following new functionality is exposed on NVIDIA display drivers version 515 Production or later.
...
Added nvmlDeviceSetFanSpeed_v2 API to set the GPU's fan speed.
Added nvmlDeviceSetDefaultFanSpeed_v2 API to set the GPU's default fan speed.
Added nvmlDeviceGetThermalSettings API to report the GPU's thermal system information.
...
Added nvmlDeviceGetMinMaxFanSpeed API to report the min and max fan speed that user can set for a specified GPU fan.
```
Screenshots: [NVIDIA NVML change logs 515](img/NVIDIA_NVML_change_logs_515.jpeg), [NVIDIA NVML change logs 520](img/NVIDIA_NVML_change_logs_520.jpeg)
## Installation
Note: you may need to adapt the path of some of the commands
### Windows
1. Clone the repository
Install the package with pip running as **admin** to make it system wide (needed for startup services)
```bash
git clone https://github.com/HackTestes/NVML-GPU-Control NVML_GPU_Control
pip install caioh-nvml-gpu-control
```
**The next part requires admin/root permissions**
### Linux
2. Create a new folder for the scripts
Install the package with pip running as root and store it in root's home directory (needed for startup services)
```bash
# Windows
mkdir 'C:\Program Files\User_NVIDIA_GPU_Control\'
# Linux
sudo mkdir '/usr/bin/User_NVIDIA_GPU_Control/'
sudo pip install --user caioh-nvml-gpu-control
```
3. Copy the scripts files from the repository to the new directory
And install it for each user if desired
```bash
# Windows
cp 'C:\Path_to_the_repository\NVML_GPU_Control\src\*.py' 'C:\Program Files\User_NVIDIA_GPU_Control\'
# Linux
sudo cp -r /Path_to_the_repository/NVML_GPU_Control/src/*.py /usr/bin/User_NVIDIA_GPU_Control/
pip install --user caioh-nvml-gpu-control
```
**Additional notes**: you may also need to install the library as admin or install it as a normal user and then lock the files(change the permissions and take ownership as root/admin).
> [!WARNING]
> Files must be writable only to admin/root, otherwise unprivileged programs may escalate provileges with the startup services
### Uninstall
## Uninstall
You only need to remove the directory (BE EXTRA CAREFUL WITH THE *RM* COMMAND). You can also use the GUI to simply delete the directory if you find that easier and safer.
> [!NOTE]
> To uninstall the version before the packaging, please refer to the [MANUAL_INSTALL](MANUAL_INSTALL.md)
Useful docs (read before running the commands):
### Windows
* [Remove-Item](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/remove-item?view=powershell-7.4)
* [rm man page](https://man7.org/linux/man-pages/man1/rm.1.html)
Uninstall the package by running the next command as **admin**
```bash
# Windows - you can run first with the -WhatIf parameter to test
Remove-Item -Confirm -Force -Recurse -Path 'C:\Program Files\User_NVIDIA_GPU_Control\'
# Linux
rm --interactive --preserve-root -R '/usr/bin/User_NVIDIA_GPU_Control'
pip uninstall caioh-nvml-gpu-control
```
### Linux
Uninstall the package by running the next command as **root** or for each user
```bash
sudo pip uninstall --user caioh-nvml-gpu-control
# Or for user packages
pip uninstall --user caioh-nvml-gpu-control
```
## How to use
* Make sure to run with the working directory being the `.\src`
```bash
cd ./src
```
> [!NOTE]
> The python command on Windows may require the **.exe** at the end (like this "python.exe")
> [!TIP]
> You can start the scripts with `chnvml` if the scripts directory is in the PATH or use `python -m caioh_nvml_gpu_control`.
* You must first list all cards that are connected, so you can get the name or UUID
```bash
python ./nvml_gpu_control.py list
chnvml list
```
* Then you can select a target by name
```bash
python ./nvml_gpu_control.py fan-control -n 'NVIDIA GeForce RTX 4080'
chnvml fan-control -n 'NVIDIA GeForce RTX 4080'
```
* Or by UUID
```bash
python ./nvml_gpu_control.py fan-control -id GPU-00000000-0000-0000-0000-000000000000
chnvml fan-control -id GPU-00000000-0000-0000-0000-000000000000
```
* And the fan speed for each temperature level (requires admin)
```bash
sudo python ./nvml_gpu_control.py fan-control -n 'NVIDIA GeForce RTX 4080' -sp '10:35,20:50,30:50,35:100'
sudo chnvml fan-control -n 'NVIDIA GeForce RTX 4080' -sp '10:35,20:50,30:50,35:100'
```
* You could also use the `--dry-run` for testing! (no admin)
* You could also use the `--dry-run` for testing! (no admin or root)
```bash
python ./nvml_gpu_control.py fan-control -n 'NVIDIA GeForce RTX 4080' -sp '10:35,20:50,30:50,35:100' --dry-run
chnvml fan-control -n 'NVIDIA GeForce RTX 4080' -sp '10:35,20:50,30:50,35:100' --dry-run
```
* You can also revert to the original state
* You can also revert to the original fan state by runnig the following command or *rebooting the machine*
```bash
python ./nvml_gpu_control.py fan-policy --auto -n 'NVIDIA GeForce RTX 4080'
chnvml fan-policy --auto -n 'NVIDIA GeForce RTX 4080'
```
Note that it does not current support fan curve (or linear progression), so it works on levels. Each level the temperature is verified against the configuration (higher or equal) and then set properly. Also, each temperature associated with speed is ordered automatically. (think of it as a staircase graph)
@@ -159,7 +174,7 @@ ___________________________
```
#### Usage docs
#### Usage actions and options
```
python ./nvml_gpu_control.py <ACTION> <OPTIONS>
@@ -239,151 +254,9 @@ OPTIONS
```
##### Running tests
## Startup services
```
python ./src/tests.py -b
```
### Setting up services or tasks
This section will present some simple commands to setup services or tasks that start as admin and run the configured program with the configured settings. You should secure the files under an admin only folder, so only authorized programs can modify the scripts (and DON'T use SUID in Linux).
#### Windows
Please, check Microsoft's documentation:
* [Task scheduler](https://learn.microsoft.com/en-us/windows/win32/taskschd/task-scheduler-start-page)
* [Task scheduler command line](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/schtasks)
Since this program does not implement the service API, it will be using scheduled tasks to run at startup. There will be presented a GUI and a command line guide to how to do the setup:
##### GUI
1. Make sure to have the script files at a path only accessible to admin users. This guide will be using `C:\Program Files\User_NVIDIA_GPU_Control\`
2. Open Task Scheduler as an admin (you might need to select a admin user)
3. Click on `create task` (do not confuse it for the create **simple** task)
![TaskScheduler_CreateTask](img/TaskScheduler_CreateTask.png)
4. General tab -> Write the service name. This guide will use: `User NVIDIA GPU Control Task`
5. General tab -> Write a description. This guide will use: `This task runs a daemon at startup responsible for controling NVIDIA GPUs' fans and power`
6. General tab -> Mark the box containing `Run whether the user is logged or not`
7. General tab -> Mark the box containing `Do not store password`
8. General tab -> Mark the box containing `Run with highest privileges`
![TaskScheduler_GeneralTab](img/TaskScheduler_GeneralTab.png)
9. Triggers tab -> Create a new trigger and change the `Begin the task` to `At Startup` (make sure to leave the Enabled box marked)
![TaskScheduler_TriggersTab](img/TaskScheduler_TriggersTab.png)
![TaskScheduler_TriggersTab_2](img/TaskScheduler_TriggersTab_2.png)
10. Actions tab -> Create a new action and select the `action` `Start a program`
11. Actions tab -> In the `Program/script` put the path of the python executable. This guide wil use `"C:\Program Files\Python312\python.exe"` (Note that some python versions may have a different directory name and make sure only admin users can change the executable and the folder) - the double quotes are necessary
12. Actions tab -> In the `Add arguments (optional)`, add the script path and the desired settings. This guide will use the following args: `"C:\Program Files\User_NVIDIA_GPU_Control\nvml_gpu_control.py" "fan-control" "-n" "NVIDIA GeForce RTX 4080" "-sp" "10:0,20:50,35:100"`
or
```
"C:\Program Files\User_NVIDIA_GPU_Control\nvml_gpu_control.py" "control-all" "-n" "NVIDIA GeForce RTX 4080" "-pl" "305" "-tl" "65" "-sp" "10:0,20:50,35:100"
```
13. Actions tab -> In the `Start in (optional)`, add the script path directory. This guide will use the following args: `C:\Program Files\User_NVIDIA_GPU_Control`
![TaskScheduler_ActionsTab](img/TaskScheduler_ActionsTab.png)
14. Conditions tab -> Leave all boxes UNmarked
![TaskScheduler_ConditionsTab](img/TaskScheduler_ConditionsTab.png)
15. Settings tab -> Mark the box in `Allow task to be run on demand`
16. Settings tab -> UNmark the box in `Stop task if it runs longer than`
17. Settings tab -> Mark the box in `If the running task does not end when requested, force it to stop`
18. Settings tab -> In the `If the task is already running, then the following rule applies`, select the `Do not start a new instance`
![TaskScheduler_SettingsTab](img/TaskScheduler_SettingsTab.png)
##### Command line (Not recommended and untested)
Some users might find easier to simply run a command, however, it is important to warn about two things:
1. The command line utility has less features than the GUI version;
2. If you are unsure of what the command does, please check MS's documentation before running it (especially because you must run it with admin permissions)
1. Open a terminal with admin permissions
2. Write the following command: `schtasks /create /tn 'User NVIDIA GPU Control Task' /tr 'C:\Program Files\Python312\python.exe C:\Program Files\User_NVIDIA_GPU_Control\nvml_gpu_control.py fan-control -t "NVIDIA GeForce RTX 4080" -sp "10:0,20:47,30:50,35:100"' /sc ONSTART /np /rl HIGHEST`
Another formatting
```
schtasks /create
/tn 'User NVIDIA GPU Control Task'
/tr 'C:\Program Files\Python312\python.exe C:\Program Files\User_NVIDIA_GPU_Control\nvml_gpu_control.py fan-control -n "NVIDIA GeForce RTX 4080" -sp "10:0,20:47,30:50,35:100"'
/sc ONSTART
/np
/rl HIGHEST
```
One of the limitations involve not being able to change the start working directory, so some paths in the scripts might break. Overall, I do not recommend this approach on Windows, users should opt for the GUI method.
#### Linux (systemd / Crontab)
This section will show how to install a global (system wide) systemd service in Ubuntu and enable it, so every time the computer starts the control will resume their work. It also shows an alternative using crontabs.
##### Systemd service
1. Take a look at the systemd service at `linux_config/unofficial-gpu-nvml-control.service`. Change the GPU name and the settings to the desired configuration (Note: you can use the UUID as well).
2. Copy the unit file into `/etc/systemd/system/` (needs root)
```bash
sudo cp ./linux_config/unofficial-gpu-nvml-control.service /etc/systemd/system/
```
3. Enable the service (needs root)
```bash
sudo systemctl enable --now unofficial-gpu-nvml-control.service
```
4. Troubleshoot if needed (get the stdout from the service)
```bash
sudo journalctl -u unofficial-gpu-nvml-control.service
```
Reload systemd daemon
```bash
sudo systemctl daemon-reload
```
##### Crontab (contributed by user on Reddit: [Brockar](https://www.reddit.com/r/wayland/comments/1arjtxj/comment/my4yfio/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button) / [@brockar](https://github.com/brockar)
1. Edit root's crontab (this ensures that the command will run as root)
```bash
sudo crontab -e
```
2. Add the command (make the changes you want here)
```bash
@reboot /usr/bin/python3 /usr/bin/User_NVIDIA_GPU_Control/nvml_gpu_control.py control-all -n "GPU_NAME" -pl 290 -tl 65 -sp "0:50,36:55,40:75,45:100"
```
Startup services allow you to start the script at system start, so you can configure it once and everything will be working automatically. To install startup services on Windows, see [SERVICES_WINDOWS](SERVICES_WINDOWS.md). And for Linux, check [SERVICES_LINUX](SERVICES_LINUX.md).
## Security considerations
@@ -391,7 +264,7 @@ sudo crontab -e
1. Having an admin prompt under the same desktop
An opened prompt under the same desktop can receive key command from non-privileged programs, allowing any program to escalate to admin. To mitigate this it is necessary to restrict all other programs with a UI limit JobObject, create the window under a new desktop or not create any windows on the desktop (this is how it is done under the guide).
An opened prompt under the same desktop can receive key command from non-privileged programs, allowing any program to escalate to admin. To mitigate this it is necessary to restrict all other programs with a UI limit JobObject, create the window under a new desktop or *not create any windows on the desktop* (this is how it is done under the guide).
2. Programs that start automatically as admin must be secured against writes
@@ -401,49 +274,18 @@ sudo crontab -e
1. Having an admin prompt under the same desktop (X11)
This is a similar risk to the Windows counterpart, especially on X11/Xorg. So, if you use X11, you must create a new session under a new TTY to create an admin window; but if you use Wayland, it already isolates windows by default.
This is a similar risk to the Windows counterpart, especially on X11/Xorg. So, if you use X11, you must create a new session under a new TTY to create an admin window; but if you use Wayland, it already isolates windows by default. Right now, no window is created.
2. Programs that start automatically as admin must be secured against writes
Same as Windows. All of the executables and scripts must be accessible only to the root user (UID 0). I recommend to install the pynvml library with the distro's package manager.
## Roadmap (features to be added)
## Development
### Must have
* [x] Fan control
* [x] Select GPU by name
* [x] Display fan speed per controller
* [x] Control fan policy
* [x] Select GPU by UUID (allows users to control more than 1 GPU individually that shares the same model - e.g. 2 RTXs 4080)
* [x] Run at startup with necessary permissions (Windows and Linux) - Windows already works
* [x] Power limit control
* [x] Temperature threshold control
* [x] Enable all controls
* [x] Help action must not require NVML initialization
### Can consider (nice to have)
* [ ] Logging to file option (with message size limit) -> user can spawn another instance with the same arguments and pass the `--dry-run` option as it should mirror the output of the privileged one
* [ ] Temperature curves (linear, quadratic, logarithmic...) -> might be unnecessary as users can generate all speed points elsewhere and just pass it as arguments
See [DEVELOPMENT](DEVELOPMENT.md) for guindance about development or contributions.
## Support
I will be supporting this program as long as I have NVIDIA GPUs (especially because I am also dogfooding it). Don't expect new features as it has everything currently I need, but you can suggest new features that you think is useful (note that the focus is energy and temperature control to increase **stability**). You can expect however bug fixes from me so my project remains compatible with the latest versions of NVML.
If I loose the need for this software (aka change my hardware), I will make sure to update this notice.
## Contribute
Just a few guidelines and style decisions:
* variable_name
* function_name
* ObjectOrClassName
* Other dependencies are DISALLOWED, I want to limit the dependencies as a security measure (just remember the xz incident). You are free to try to convince me, but your contribution will most likely be rejected
* Code should be testable, so please include unit tests to your code. If you think that certain parts are just too hard to make tests, include a justification
If I loose the need for this software (aka change my hardware), I will make sure to update this notice.

54
SERVICES_LINUX.md Normal file
View File

@@ -0,0 +1,54 @@
# Linux boot services
## Setting up boot services or tasks
> [!CAUTION]
> You should secure the files under an admin only folder, so only authorized programs can modify the scripts (and DON'T use SUID on Linux with this program)
This section will present some simple commands to setup services or tasks that start as admin and run the configured program with the configured settings.
### Linux (systemd / Crontab)
This section will show how to install a global (system wide) systemd service in Ubuntu and enable it, so every time the computer starts the control will resume their work. It also shows an alternative using crontabs.
#### Systemd service
1. Take a look at the systemd service at `linux_config/caioh-gpu-nvml-control.service`. Change the GPU name and the settings to the desired configuration (Note: you can use the UUID as well).
2. Copy the unit file into `/etc/systemd/system/` (needs root)
```bash
sudo cp ./linux_config/caioh-gpu-nvml-control.service /etc/systemd/system/
```
3. Enable the service (needs root)
```bash
sudo systemctl enable --now caioh-gpu-nvml-control.service
```
4. Troubleshoot if needed (get the stdout from the service)
```bash
sudo journalctl -u caioh-gpu-nvml-control.service
```
Reload systemd daemon
```bash
sudo systemctl daemon-reload
```
#### Crontab (contributed by user on Reddit: [Brockar](https://www.reddit.com/r/wayland/comments/1arjtxj/comment/my4yfio/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button) / [@brockar](https://github.com/brockar))
1. Edit root's crontab (this ensures that the command will run as root)
```bash
sudo crontab -e
```
2. Add the command (make the changes you want here)
```bash
@reboot /usr/bin/python3 -m caioh_nvml_gpu_control -n "GPU_NAME" -pl 290 -tl 65 -sp "0:50,36:55,40:75,45:100"
```

85
SERVICES_WINDOWS.md Normal file
View File

@@ -0,0 +1,85 @@
# Windows boot services
## Setting up boot services or tasks
> [!CAUTION]
> You should secure the files under an admin only folder, so only authorized programs can modify the scripts
This section will present some simple commands to setup services or tasks that start as admin and run the configured program with the configured settings.
But first, please check Microsoft's documentation:
* [Task scheduler](https://learn.microsoft.com/en-us/windows/win32/taskschd/task-scheduler-start-page)
* [Task scheduler command line](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/schtasks)
Since this program does not implement the service API, it will be using scheduled tasks to run at startup. There will be presented a manual method and one that only requires to import a pre-made configuration:
### Import and edit the task
* Take a look at the [xml task file](/windows_config/User%20NVIDIA%20GPU%20Control%20Task.xml) and make the necessary changes in the [command](https://github.com/HackTestes/NVML-GPU-Control/blob/packaging/windows_config/User%20NVIDIA%20GPU%20Control%20Task.xml#L45)
* In an administrator prompt, run the following command
```cmd
schtasks /create /xml "C:\path\to\task\file\User NVIDIA GPU Control Task.xml"
```
* Or you can use the GUI interface and import the xml (also needs to be running as admin)
![Task Scheduler import screenshot](MISSING_IMG)
### Manual setup with GUI
1. Make sure to have the script files at a path only accessible to admin users. This guide will be using `C:\Program Files\User_NVIDIA_GPU_Control\`
2. Open Task Scheduler as an admin (you might need to select a admin user)
3. Click on `create task` (do not confuse it for the create **simple** task)
![TaskScheduler_CreateTask](img/TaskScheduler_CreateTask.png)
4. General tab -> Write the service name. This guide will use: `User NVIDIA GPU Control Task`
5. General tab -> Write a description. This guide will use: `This task runs a daemon at startup responsible for controling NVIDIA GPUs' fans and power`
6. General tab -> Mark the box containing `Run whether the user is logged or not`
7. General tab -> Mark the box containing `Do not store password`
8. General tab -> Mark the box containing `Run with highest privileges`
![TaskScheduler_GeneralTab](img/TaskScheduler_GeneralTab.png)
9. Triggers tab -> Create a new trigger and change the `Begin the task` to `At Startup` (make sure to leave the Enabled box marked)
![TaskScheduler_TriggersTab](img/TaskScheduler_TriggersTab.png)
![TaskScheduler_TriggersTab_2](img/TaskScheduler_TriggersTab_2.png)
10. Actions tab -> Create a new action and select the `action` `Start a program`
11. Actions tab -> In the `Program/script` put the path of the python executable. This guide wil use `"C:\Program Files\Python312\python.exe"` (Note that some python versions may have a different directory name and make sure only admin users can change the executable and the folder) - the double quotes are necessary
12. Actions tab -> In the `Add arguments (optional)`, add the script path and the desired settings. This guide will use the following args: `"C:\Program Files\User_NVIDIA_GPU_Control\nvml_gpu_control.py" "fan-control" "-n" "NVIDIA GeForce RTX 4080" "-sp" "10:0,20:50,35:100"`
or
```
"C:\Program Files\User_NVIDIA_GPU_Control\nvml_gpu_control.py" "control-all" "-n" "NVIDIA GeForce RTX 4080" "-pl" "305" "-tl" "65" "-sp" "10:0,20:50,35:100"
```
13. Actions tab -> In the `Start in (optional)`, add the script path directory. This guide will use the following args: `C:\Program Files\User_NVIDIA_GPU_Control`
![TaskScheduler_ActionsTab](img/TaskScheduler_ActionsTab.png)
14. Conditions tab -> Leave all boxes UNmarked
![TaskScheduler_ConditionsTab](img/TaskScheduler_ConditionsTab.png)
15. Settings tab -> Mark the box in `Allow task to be run on demand`
16. Settings tab -> UNmark the box in `Stop task if it runs longer than`
17. Settings tab -> Mark the box in `If the running task does not end when requested, force it to stop`
18. Settings tab -> In the `If the task is already running, then the following rule applies`, select the `Do not start a new instance`
![TaskScheduler_SettingsTab](img/TaskScheduler_SettingsTab.png)