Skip to main content

Uplift Power Play

Project description

UPP

UPP: Uplift Power Play

A tool for parsing, dumping and modifying data in Radeon PowerPlay tables

Introduction

UPP is able to parse and modify binary data structures of PowerPlay tables commonly found on certain AMD Radeon GPUs. Drivers on recent AMD GPUs allow PowerPlay tables to be dynamically modified on runtime, which may be known as "soft" PowerPlay table. On Linux, the PowerPlay table is by default found at: /sys/class/drm/card0/device/pp_table.

Alternatively, one can use this tool to get PowerPlay data by:

  • Extracting PowerPlay table from Video ROM image (see extract command)
  • Importing "Soft PowerPlay" table from Windows registry, directly from offline Windows/System32/config/SYSTEM file on disk, so it would work from Linux distro that has acces to mounted Windows partition (path to SYSTEM registry file is specified with --from-registry option)

This tool currently supports parsing and modifying PowerPlay tables found on the following AMD GPU families:

  • Polaris
  • Vega
  • Radeon VII
  • Navi 10
  • Navi 12 (PRO V520)
  • Navi 14
  • Navi 21 (Sienna Cichlid)
  • Navi 22 (Navy Flounder)
  • Navi 23 (Dimgrey Cavefish)

Note: iGPUs found in many recent AMD APUs are using completely different PowerPlay control methods, this tool does not support them.

WARNING: Authors of this tool are in no way responsible for any damage that may happen to your expansive graphics card if you choose to modify card voltages, power limits, or any other PowerPlay parameters. Always remember that you are doing it entierly on your own risk!

If you have bugs to report or features to request please create an issue on: https://github.com/sibradzic/upp

Requirements

Python 3.6+, click library. Optionally, for reading "soft" PowerPlay table from Windows registry: python-registry. Should work on Windows as well (testers wanted).

Usage

At its current form this is a CLI only tool. Getting help:

upp --help

or

upp <command> --help

Upp will only work by specifying a command which tells it what to do to one's Radeon PowerPlay table data. Currently available commands are:

  • dump - Dumps all PowerPlay data to console
  • extract - Extracts PowerPlay data from full VBIOS ROM image
  • inject - Injects PowerPlay data from file into VBIOS ROM image
  • get - Retrieves current value of one or multiple PowerPlay parametter(s)
  • set - Sets value to one or multiple PowerPlay parameters
  • version - Shows UPP version

So, an usage pattern would be like this:

upp [OPTIONS] COMMAND [ARGS]...

Some generic options applicable to all commands may be used, but please note that they have to be specified before an actual command:

-p, --pp-file <filename>        Input/output PP table file.
-f, --from-registry <filename>  Import PP_PhmSoftPowerPlayTable from Windows
-d, --debug / --no-debug        Debug mode.
-h, --help                      Show help.

Dumping all data:

The dump command de-serializes PowerPlay binary data into a human-readable text output. For example:

upp dump

In standard mode all data will be dumped to console, where data tree hierarchy is indicated by indentation. In raw mode a table showing all hex and binary data, as well as variable names and values, will be dumped.

Extracting PowerPlay table from Video ROM image:

Use extract command for this. The source video ROM binary must be specified with -r/--video-rom parameter, and extracted PowerPlay table will be saved into file specified with generic -p/--pp-file option. For example:

upp --pp-file=extracted.pp_table extract -r VIDEO.rom

Default output file name will be an original ROM file name with an additional .pp_table extension.

Injecting PowerPlay data from file into VBIOS ROM image:

Use inject command for this. The input video ROM binary must be specified with -i/--input-rom parameter, and the output ROM can be specified with an optional -o/--output-rom parameter. For example:

upp -p modded.pp_table inject -i original.rom -o modded.rom

WARNING: Modified vROM image is probalby not going to work if flashed as is to your card, due to ROM signature checks on recent Radeon cards. Authors of this tool are in no way responsible for any damage that may happen to your expansive graphics card if you choose to flash the modified video ROM, you are doing it entierly on your own risk.

Getting PowerPlay table parameter value(s):

The get command retrieves current value of one or multiple PowerPlay table parameter value(s). The parameter variable path must be specified in /<param> notation, for example:

upp get smc_pptable/FreqTableGfx/1 smc_pptable/FreqTableGfx/2
1850
1400

The order of the output values will match the order of the parameter variable paths specified.

Setting PowerPlay table parameter value(s):

The set command sets value to one or multiple PowerPlay table parameter(s). The parameter path and value must be specified in /<param>=<value> notation, for example:

upp -p /tmp/custom-pp_table set --write  \
  smc_pptable/SocketPowerLimitAc/0=100   \
  smc_pptable/SocketPowerLimitDc/0=100   \
  smc_pptable/FanStartTemp=100           \
  smc_pptable/FreqTableGfx/1=1550

Note the --write parameter, which has to be specified to actually commit changes to the PowerPlay table file.

Getting upp version

upp version

Running as sudo

Note that if you need to run upp deployed with pip in --user mode with sudo, you'll need to add some parameters to sudo command to make user env available to super-user. For example:

sudo -E env "PATH=$PATH" upp --help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

upp-0.1.6.tar.gz (72.9 kB view details)

Uploaded Source

Built Distribution

upp-0.1.6-py3-none-any.whl (80.8 kB view details)

Uploaded Python 3

File details

Details for the file upp-0.1.6.tar.gz.

File metadata

  • Download URL: upp-0.1.6.tar.gz
  • Upload date:
  • Size: 72.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.5

File hashes

Hashes for upp-0.1.6.tar.gz
Algorithm Hash digest
SHA256 ae9d000ba05d646f5b3b59ad2bdee92ae6686eb1a22092fb0bbe14086d7b4223
MD5 1aa49d6c0fdbdec01d573d1edd7573e9
BLAKE2b-256 01ed1e7243575b7424a461a4a623e6c559fd8fb01382081cfe523b86ffda83e1

See more details on using hashes here.

Provenance

File details

Details for the file upp-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: upp-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 80.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.5

File hashes

Hashes for upp-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 37b8ce21ba63003af5d9faad1e70a6a088a8d1a3b712649e5b22511d8f0687db
MD5 b3c2f774f74329266c31e2dc9345ea98
BLAKE2b-256 b3a7096810c6ecc3713fff7deca8d3a5ae15e8fffda3e1cca8df03aa073fc12a

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page