I used to run this: turbostat --quiet --num_iterations 1 --interval 1 --show PkgWatt --Summary to get my Ryzen 3700X power use. With turbostat version 20.09.30 this command doesn't return anything at all. Also, turbostat used to run indefinitely by default and report all the values, now it just exits: # turbostat turbostat version 20.09.30 - Len Brown <lenb@kernel.org> CPUID(0): AuthenticAMD 0x10 CPUID levels; 0x80000020 xlevels; family:model:stepping 0x17:71:0 (23:113:0) CPUID(1): SSE3 MONITOR - - - TSC MSR - HT - CPUID(6): APERF, No-TURBO, No-DTS, No-PTM, No-HWP, No-HWPnotify, No-HWPwindow, No-HWPepp, No-HWPpkg, No-EPB CPUID(7): No-SGX RAPL: 234 sec. Joule Counter Range, at 280 Watts /dev/cpu_dma_latency: 2000000000 usec (default) current_driver: acpi_idle current_governor: menu current_governor_ro: menu cpu2: POLL: CPUIDLE CORE POLL IDLE cpu2: C1: ACPI FFH MWAIT 0x0 cpu2: C2: ACPI IOPORT 0x414 cpu2: cpufreq driver: acpi-cpufreq cpu2: cpufreq governor: ondemand cpufreq boost: 0 cpu0: MSR_RAPL_PWR_UNIT: 0x000a1003 (0.125000 Watts, 0.000015 Joules, 0.000977 sec.) Why have you completely broken the utility?
Why have you completely broken the turbostat utility?
From -h > If no COMMAND is specified, turbostat wakes every 5-seconds to print > statistics, until interrupted. # turbostat turbostat version 20.09.30 - Len Brown <lenb@kernel.org> CPUID(0): AuthenticAMD 0x10 CPUID levels; 0x80000020 xlevels; family:model:stepping 0x17:71:0 (23:113:0) CPUID(1): SSE3 MONITOR - - - TSC MSR - HT - CPUID(6): APERF, No-TURBO, No-DTS, No-PTM, No-HWP, No-HWPnotify, No-HWPwindow, No-HWPepp, No-HWPpkg, No-EPB CPUID(7): No-SGX RAPL: 234 sec. Joule Counter Range, at 280 Watts /dev/cpu_dma_latency: 2000000000 usec (default) current_driver: acpi_idle current_governor: menu current_governor_ro: menu cpu0: POLL: CPUIDLE CORE POLL IDLE cpu0: C1: ACPI FFH MWAIT 0x0 cpu0: C2: ACPI IOPORT 0x414 cpu0: cpufreq driver: acpi-cpufreq cpu0: cpufreq governor: ondemand cpufreq boost: 0 cpu0: MSR_RAPL_PWR_UNIT: 0x000a1003 (0.125000 Watts, 0.000015 Joules, 0.000977 sec.) [root@zen ~]# echo $? 243
Downgraded to turbostat from kernel 5.8, it works just fine.
Len? Are you still there?
It's been three weeks, how can I get your attention please?
CC'ing Borislav.
Yah, that thing needs some more testing on AMD. I believe something like the attached patch should work but someone needs to audit this thing on AMD and verify it works properly.
Created attachment 296423 [details] test fix
(In reply to Borislav Petkov from comment #8) > Created attachment 296423 [details] > test fix Thanks, the patch works! Please, if possible, push it to 5.12/5.11 stable.
This looks like the proper patch: https://lkml.kernel.org/r/20210419195812.147710-1-terry.bowman@amd.com It would be cool if you could test it and give a Tested-by. Thx.
(In reply to Borislav Petkov from comment #10) > This looks like the proper patch: > > https://lkml.kernel.org/r/20210419195812.147710-1-terry.bowman@amd.com > > It would be cool if you could test it and give a Tested-by. > > Thx. patch -p5 < patch-amd.c patching file turbostat.c Hunk #1 FAILED at 291. Hunk #2 succeeded at 320 with fuzz 2. Hunk #3 succeeded at 349 with fuzz 2. Hunk #4 succeeded at 368 with fuzz 2. Hunk #5 FAILED at 3317. Hunk #6 FAILED at 3326. Hunk #7 FAILED at 5393. 4 out of 7 hunks FAILED -- saving rejects to file turbostat.c.rej No idea how to apply it. I'm using turbostat from kernel 5.11 (5.12 has not had changes to it).
Will be fixed in 5.13.