• Stars
    star
    241
  • Rank 167,643 (Top 4 %)
  • Language
    C
  • License
    GNU General Publi...
  • Created about 9 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Set P-State voltages and clock speeds on recent AMD CPUs on Linux.

amdctl

Set P-State voltages and clock speeds on recent AMD CPUs on Linux.

Disclaimer:

This software can damage your hardware, use at your own risk.

Description:

Tool for changing voltages and clock speeds for AMD processors with control over every power state and CPU core.

Compilation:

You can compile with the program make.

Usage:

Make the binary executable chmod +x amdctl.
Run the program for a list of options, you can type ./amdctl to run it.
./amdctl -x to get a description of the various words used in the program.

Undervolting:

Undervolting is done by increasing the value of the CpuVid field for a specific P-state.
This can be done by invoking 'sudo /path/to/amdctl -pP -vV' in console, where P is the P-state of which the CpuVid you want to change and V is the value you want the CpuVid field to have.
For example, 'sudo /path/to/amdctl -p1 -v25' will change the value of the CpuVid field of P-state #1 to 25.
This applies the undervolt to all cores. You can specify a core by using the -c flag.

Supported CPU Families:

AMD CPU family's 10h(K10), 11h(Turion), 12h(Fusion), 14h (Bobcat), 15h(Bulldozer), 16h(Jaguar), 17h(Zen, Zen+, Zen 2), 19h(Zen 3).
This would be most AMD CPU's between 2007 and 2021.

You can find your CPU family by typing cat /proc/cpuinfo in a terminal, the values there are in decimal.
10h is equivalent to 16, 16h 22 for example. See https://en.wikipedia.org/wiki/List_of_AMD_CPU_microarchitectures for a table with all AMD CPU families.

The program will check if your CPU is supported when run.

Unsupported CPU Families:

AMD CPU family 9h(K9) and earlier.
AMD 13h, I could not find any info on this, so I assume this CPU family does not exist.
AMD 18h(EPYC / Hygon Dhyana), no public documentation available ?
Anything newer than 19h (for now).

Requirements:

  • Root access.
  • Msr kernel module.

To manually load the msr module: sudo modprobe msr
To automatically load the msr module see the arch wiki.

On Kernel's 5.9 and higher, userspace writes to MSR are restricted, for now (in the future this may become impossible) you can allow writing to MSR from userspace using one of the following methods:

  • Using amdctl: Pass the -m option: sudo ./amdctl -m -g
  • After the kernel is loaded (runtime): sudo bash -c "echo on > /sys/module/msr/parameters/allow_writes"
  • When loading the kernel: Add msr.allow_writes=on to kernel parameters : https://wiki.archlinux.org/title/kernel_parameters

References:

https://developer.amd.com/resources/developer-guides-manuals/ https://wiki.archlinux.org/index.php/K10ctl http://sourceforge.net/projects/k10ctl/ https://web.archive.org/web/20090914081440/http://www.ztex.de/misc/k10ctl.e.html https://01.org/msr-tools https://en.wikipedia.org/wiki/List_of_AMD_CPU_microarchitectures http://users.atw.hu/instlatx64/

More Repositories

1

reshade-steam-proton

Easy setup and updating of ReShade on Linux for games using wine or proton.
Shell
387
star
2

linux_intel_display_overclocking

Guide for overclocking displays (monitors) on Linux with Intel GPU's.
77
star
3

cvt_modeline_calculator_12

CVT (Coordinated Video Timings) modeline calculator with CVT v1.2 timings.
C
74
star
4

mpv_scripts

Various lua scripts for the http://mpv.io video player.
Lua
65
star
5

kwin-effect-shaders

Desktop effect for KDE Plasma to apply GLSL shaders. Alternative to vkBasalt or ReShade when they are unsupported.
C++
40
star
6

nvidia-control-linux

Bash script to control clock speed, memory speed, power limit, user defined automatic fan control, LED brightness and power state for Nvidia graphics cards on Linux. (allows overcloking / undercloking)
Shell
20
star
7

Newznab-Blacklist

Blacklist for Newznab.
PHP
19
star
8

eso-linux-launcher

Launcher for Elder Scrolls Online on Linux with a addon updater and a TTC price table updater.
Shell
13
star
9

mkvrg

Apply replaygain tags to matroska files without remuxing (gain is calculated using ffmpeg and tags are applied using mkvpropedit).
Python
9
star
10

polproxy

This is a proxy for poloniex.com and gunbot on Linux (to prevent 422 errors).
Python
8
star
11

rogext

Gets data from the ROG_EXT module (from overlay.live) through I2C on Asus ROG motherboards.
C++
7
star
12

kwin-effect-shaders_gui

GUI to configure https://github.com/kevinlekiller/kwin-effect-shaders
C++
4
star
13

kwin-effect-shaders_shaders

The GLSL shaders for https://github.com/kevinlekiller/kwin-effect-shaders
GLSL
4
star
14

Hyperion_Grabber_X11_QT

Hyperion image grabber for X11 / Linux.
C++
4
star
15

simple_php_yenc_decode

Basic yEnc decoder extension for PHP5 written in c++ using swig.
C++
4
star
16

cppnntp

Work in progress Usenet / NNTP c++ program
C++
4
star
17

Python-NNTPLIB-OVER-Compression

Really quick implementation of header compression in python 3.3's nntplib.
Python
3
star
18

shell_scripts

Various shell scripts written over the years.
Shell
3
star
19

eml-crypt

Simple bash script to decrypt or re-encrypt eml (email) files using PGP.
Shell
1
star