Skip to content

feat: dj with the ryzen_smu kernel module on a few systems and I have a patch that improves monitoring support for newer/less-covered PM tables. - #408

Open
inode64 wants to merge 6 commits into
FlyGoat:masterfrom
inode64:feature/Dragon-Range
Open

feat: dj with the ryzen_smu kernel module on a few systems and I have a patch that improves monitoring support for newer/less-covered PM tables.#408
inode64 wants to merge 6 commits into
FlyGoat:masterfrom
inode64:feature/Dragon-Range

Conversation

@inode64

@inode64 inode64 commented Jul 3, 2026

Copy link
Copy Markdown

Tested systems:

  • Dragon Range / Raphael-compatible system
    • PM table: 0x540104
    • SMU FW: 4.84.4.0
  • AMD EPYC 4344P
    • Family/model: Zen 4, model 97
    • PM table: 0x540104
    • SMU FW: 84.79.225
  • AMD Ryzen 5 3400G / Picasso
    • PM table: 0x1e0004
    • SMU FW: 4.30.92.0

Main changes:

  • Added support for reading pm_table_version and pm_table_size from the ryzen_smu sysfs interface.
  • Added a fallback path for PM table version/address handling when using the kernel module on families where the usual SMU table messages are not available.
  • Added SMU firmware version reporting using SMU message 0x2 with arg0 = 1.
  • Fixed PM table initialisation for 0x540104: offset 0x0 is legitimately zero on this table, so the empty-table check now uses offset 0x8.
  • Added monitored values for 0x540104, including:
    • fast PPT limit/value
    • socket power
    • SoC voltage
    • FCLK
    • MEM clock
    • Tctl limit/value
    • VDD TDC value
    • per-core power, voltage, temperature, requested clock, effective clock, C0, CC1 and C6 residency
  • Added conservative VDD TDC/EDC limit detection for 0x540104:
    • TDC LIMIT VDD from 0x20 when the value is plausible
    • EDC LIMIT VDD from 0xF4 when the value is plausible
    • sentinel/unlimited values like 1000A are hidden instead of displayed as real limits
  • Improved Tctl reporting for 0x540104:
    • Dragon Range/Raphael systems track Tctl at 0x2C
    • EPYC 4004 tracks the real loaded Tctl at 0xF8
    • the code now uses the higher plausible value, matching k10temp on the EPYC system
  • Added Picasso 0x1e0004 monitoring improvements:
    • fixed Tctl value using the hotter core from the later temperature block
    • added per-core power, voltage, temperature and clock
    • added GFX clock
    • added MEM clock
  • Made the --info output cleaner:
    • extended values are only printed when the getter returns a valid value
    • per-core columns are dynamic, so unsupported columns are not shown as nan
  • Added portable x86_64 build options:
    • ENABLE_IPO=OFF
    • STRIP_X86_ISA_NOTE=ON
    • this avoids binaries being rejected on older x86_64 CPUs because of an overly strict .note.gnu.property ISA marker

Validation:

  • The portable binary was tested remotely on:
    • Ryzen 5 3400G / Picasso
    • EPYC 4344P / PM table 0x540104
  • On the EPYC 4344P, loaded k10temp reported around 82.8-83.1 C, and RyzenAdj now reports THM VALUE CORE 83.062, matching the kernel sensor.
  • On Picasso, the new per-core table and corrected Tctl were validated against sensors, cpufreq and PM table dumps.

Some values are intentionally still hidden as nan because I could not validate stable offsets yet, especially STAPM/slow PPT on 0x540104 and some SoC/EDC value fields.

inode64 added 6 commits July 4, 2026 00:19
…ve a patch that improves monitoring support for newer/less-covered PM tables.

  Tested systems:

  - Dragon Range / Raphael-compatible system
    - PM table: `0x540104`
    - SMU FW: `4.84.4.0`
  - AMD EPYC 4344P
    - Family/model: Zen 4, model 97
    - PM table: `0x540104`
    - SMU FW: `84.79.225`
  - AMD Ryzen 5 3400G / Picasso
    - PM table: `0x1e0004`
    - SMU FW: `4.30.92.0`

  Main changes:

  - Added support for reading `pm_table_version` and `pm_table_size` from the `ryzen_smu` sysfs interface.
  - Added a fallback path for PM table version/address handling when using the kernel module on families where the usual SMU table messages are not available.
  - Added SMU firmware version reporting using SMU message `0x2` with `arg0 = 1`.
  - Fixed PM table initialization for `0x540104`: offset `0x0` is legitimately zero on this table, so the empty-table check now uses offset `0x8`.
  - Added monitored values for `0x540104`, including:
    - fast PPT limit/value
    - socket power
    - SoC voltage
    - FCLK
    - MEM clock
    - Tctl limit/value
    - VDD TDC value
    - per-core power, voltage, temperature, requested clock, effective clock, C0, CC1 and C6 residency
  - Added conservative VDD TDC/EDC limit detection for `0x540104`:
    - `TDC LIMIT VDD` from `0x20` when the value is plausible
    - `EDC LIMIT VDD` from `0xF4` when the value is plausible
    - sentinel/unlimited values like `1000A` are hidden instead of displayed as real limits
  - Improved Tctl reporting for `0x540104`:
    - Dragon Range/Raphael systems track Tctl at `0x2C`
    - EPYC 4004 tracks the real loaded Tctl at `0xF8`
    - the code now uses the higher plausible value, matching `k10temp` on the EPYC system
  - Added Picasso `0x1e0004` monitoring improvements:
    - fixed Tctl value using the hotter core from the later temperature block
    - added per-core power, voltage, temperature and clock
    - added GFX clock
    - added MEM clock
  - Made the `--info` output cleaner:
    - extended values are only printed when the getter returns a valid value
    - per-core columns are dynamic, so unsupported columns are not shown as `nan`
  - Added portable x86_64 build options:
    - `ENABLE_IPO=OFF`
    - `STRIP_X86_ISA_NOTE=ON`
    - this avoids binaries being rejected on older x86_64 CPUs because of an overly strict `.note.gnu.property` ISA marker

  Validation:

  - The portable binary was tested remotely on:
    - Ryzen 5 3400G / Picasso
    - EPYC 4344P / PM table `0x540104`
  - On the EPYC 4344P, loaded `k10temp` reported around `82.8-83.1 C`, and RyzenAdj now reports `THM VALUE CORE 83.062`, matching the kernel sensor.
  - On Picasso, the new per-core table and corrected Tctl were validated against `sensors`, `cpufreq` and PM table dumps.

  Some values are intentionally still hidden as `nan` because I could not validate stable offsets yet, especially STAPM/slow PPT on `0x540104` and some SoC/EDC value fields.
* Ryzen AI 9 HX 370, Strix Point
* Ryzen 5 3400G, Picasso
* Ryzen 5 7600X, Raphael
* EPYC 4344P
* EPYC 4584PX
* EPYC 4244P
* EPYC 4465P, Fire Range
* Ryzen 5 PRO 3600, Matisse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant