{"id":21991792,"url":"https://github.com/wiryonolau/gputweak","last_synced_at":"2026-02-25T10:43:14.469Z","repository":{"id":184351673,"uuid":"137430784","full_name":"wiryonolau/gputweak","owner":"wiryonolau","description":"GPU Tweak script","archived":false,"fork":false,"pushed_at":"2022-12-15T14:27:56.000Z","size":174,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-07-28T03:49:18.250Z","etag":null,"topics":["amdgpu","nvidia","overclock","ubuntu"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wiryonolau.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-06-15T02:17:07.000Z","updated_at":"2023-07-28T03:49:19.100Z","dependencies_parsed_at":"2023-07-28T04:15:12.638Z","dependency_job_id":null,"html_url":"https://github.com/wiryonolau/gputweak","commit_stats":null,"previous_names":["wiryonolau/gputweak"],"tags_count":1,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiryonolau%2Fgputweak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiryonolau%2Fgputweak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiryonolau%2Fgputweak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiryonolau%2Fgputweak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wiryonolau","download_url":"https://codeload.github.com/wiryonolau/gputweak/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227206386,"owners_count":17747734,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amdgpu","nvidia","overclock","ubuntu"],"created_at":"2024-11-29T20:11:37.445Z","updated_at":"2026-02-25T10:43:09.448Z","avatar_url":"https://github.com/wiryonolau.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Gputweak Script\n\nThis is a gputweak helper script using nvidia-smi, nvidia-settings and rocm-smi.  \nScript will be able to find GPU automatically and use the define tweak inside config/gputweak.json base on GPU product and vendor ID.  \n\n## Requirement\n\n- Ubuntu 16.04 or above\n- jq library installed ( apt-get install -y jq )\n- Install either official NVIDIA driver or AMDGPU driver, FGLRX is not supported.\n\n## Install\n\nThis will install script in /opt/gputweak and enable startup script\nNote that /etc/systemd/system/default.target will be change to script custom.target\n/etc/X11/xorg.conf will be created for dummy monitor and locked using chattr \n\n\n```\nsudo ./install.sh\n```\n\n## Usage\n\n```\nUsage: gputweak [-v|--verbose] [-h|--help] [OPTIONS]\n -v | --verbose   : output verbose\n -h | --help      : this message\n\n OPTIONS\n  --test           : Test mode, no tweak is run. Using\n                      NVIDIA  10de:1b81 10de:119d device\n                      AMD     1002:67df 1462:3417 device\n  --coolbits       : set NVIDIA coolbits, default is 12\n  --nvsmi          : set nvidia-smi executable path, default /usr/bin/nvidia-smi\n  --nvset          : set nvidia-settings executable path, default /usr/bin/nvidia-settings\n  --rocmsmi        : set rocm-smi executable path, default /usr/bin/rocm-smi\n  --reset          : reset and remove all tweak, will ignore other options\n  --config         : specify gputweak config file, overwrite default. check config/gputweak.json for example\n  --user           : read gputweak config file from /home/{user}/.gputweak/gputweak.json\n```\n\n## Run at startup\nCopy all file and folder inside config/systemd to /etc/systemd/system. \nIf you run install.sh above, you can skip this.\n\n```bash\nsudo cp -r config/systemd/* config/systemd/system\n```\n\nSet custom.target as default target then reboot\n\n```bash\nsudo rm -f /etc/systemd/system/default.target\nsudo ln -s /etc/systemd/system/custom.target /etc/systemd/system/default.target\n```\n\n## Create GPU tweak config\n\nYou can add more tweak config in config/gputweak.json. Below are the step\n\n1. Find your GPU ID check from your console using \"lspci -vnn\", then take note of the product and vendor id for both system and subsytem one.  \n![pci_id](https://raw.githubusercontent.com/wiryonolau/gputweak/master/img/pci_id.jpg)\n\n2. Then add another json object inside the config with this format\n```\n[\n    {\n        \"description\": \"Put the description of your GPU here\" (optional),\n        \"driver\" : \"specify the driver type, either amdgpu or nvidia, the script have to use this value (required)\",\n        \"system_id\": \"see image above on how to obtain, if not available use 0000:0000 (required)\",\n        \"subsystem_id\": \"see image above on how to obtain, if not available use 0000:0000 (required)\",\n        \"tweaks\" : [\n            \"a list of tweak you want to run (required)\"\n        ]\n    }\n]\n```\n\nExample tweak for AMDGPU, setting fan and core clock\n```\n[\n    {\n        \"system_id\" : \"...\"\n        \"subsystem_id\" : \"...\"\n        \"tweaks\" : [      \n            \"@ROCSMI@ -d @GPUID@ --setfan 180\",\n            \"@ROCSMI@ -d @GPUID@ --setsclk 3\"\n        ]\n    }\n]\n```\n\nExample tweak for NVIDIA\n```\n[\n    {\n        \"system_id\" : \"...\"\n        \"subsystem_id\" : \"...\"\n        \"tweaks\" : [\n            \"@NVSET@ -a [gpu:0]/GPUFanControlState=1\",\n            \"@NVSET@ -a [fan:0]/GPUTargetFanSpeed=70\",\n            \"@NVSET@ -a [gpu:0]/GPUPowerMizerMode=1\",\n            \"@NVSET@ -a [gpu:0]/GPUGraphicsClockOffset[3]=-200\",\n            \"@NVSET@ -a [gpu:0]/GPUMemoryTransferRateOffset[3]=450\",\n            \"@NVSMI@ -i @PCI_BUS@ -pm 1\",\n            \"@NVSMI@ -i @PCI_BUS@ -pl 100\"\n        ]\n    }\n]\n```\n\nPredefine variable for tweaks are\n- @NVSMI@ : will be replace by nvidia-smi executable path \n- @NVSET@ : will be replace by nvidia-settings executable path\n- @PCI_BUS@ : will be replace by GPU pci bus address ( for NVIDIA card )\n- @ROCSMI@ : will be replace by rocm-smi executable path\n- @GPUID@ : will be replace by GPU id base on pci bus ( for AMD card )\n\n3. Run the script directly\n\n```\ngputweak -v\n```\n\n## Notes\nThere is no safety mechanism when deploying tweak, so it's best to check the maximum clock, memclock, fan, etc before run this automatically.  \nFor AMD card currently there is no overclock mechanism available in Linux, you still require to update the BIOS directly.  \nScript can be run manually if you need to reset or apply or test new setting.\n\n## Disclaimer\nUse this script at your own risk. We're not responsible for any damage this script cause to your system / GPU.\n\n## Donate\nDonation are welcome \n\nBTC - bc1qur8aeernt2s7982sffyz7yv6882vgewsqdkyjg ( Segwit )  \nBTC - 3Kcs5hWVQRUGtJKv3DjKbkzbGTEtFEQkUx ( Compatible )  \nETH - 0x9beb9B182a273Da689b08228385137440fEb8D6B  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiryonolau%2Fgputweak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwiryonolau%2Fgputweak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiryonolau%2Fgputweak/lists"}