[Bug 1928183] Re: turbostat doesn't work with AMD Cezanne APUs

2021-05-23 Thread Po-Hsu Lin
This patch will be applied via stable update, bug 1928857

** Changed in: linux (Ubuntu)
   Status: Confirmed => Fix Released

** Changed in: linux (Ubuntu Hirsute)
   Status: Incomplete => Fix Committed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1928183

Title:
  turbostat doesn't work with AMD Cezanne APUs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1928183/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1928183] Re: turbostat doesn't work with AMD Cezanne APUs

2021-05-23 Thread Po-Hsu Lin
https://kernel.ubuntu.com/git/ubuntu/ubuntu-hirsute.git/commit/?h
=master-next=0f179bc3cbf3f0c94213c660d53ac72512448593

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1928183

Title:
  turbostat doesn't work with AMD Cezanne APUs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1928183/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1928183] Re: turbostat doesn't work with AMD Cezanne APUs

2021-05-20 Thread Po-Hsu Lin
Hi David,

I found a laptop with AMD Ryzen 5 APU and gave it a try, before this
patch turbostat will terminate with return code 243:

Welcome to Ubuntu Impish Indri (development branch) (GNU/Linux 
5.11.0-16-generic x86_64)
$ sudo turbostat 
turbostat version 20.09.30 - Len Brown 
CPUID(0): AuthenticAMD 0x10 CPUID levels; 0x8020 xlevels; 
family:model:stepping 0x17:60:1 (23:96:1)
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: 20 usec (default)
current_driver: acpi_idle
current_governor: menu
current_governor_ro: menu
cpu4: POLL: CPUIDLE CORE POLL IDLE
cpu4: C1: ACPI FFH MWAIT 0x0
cpu4: C2: ACPI IOPORT 0x414
cpu4: C3: ACPI IOPORT 0x415
cpu4: cpufreq driver: acpi-cpufreq
cpu4: cpufreq governor: schedutil
cpufreq boost: 1
cpu0: MSR_RAPL_PWR_UNIT: 0x000a1003 (0.125000 Watts, 0.15 Joules, 0.000977 
sec.)
$ echo $?
243

After installing debs from 
https://people.canonical.com/~phlin/kernel/lp-1928183-turbostat-cezanne/ and 
reboot to 5.11.0-18, the turbostat command seems to be working (not terminate 
early with 243):
$ sudo turbostat 
turbostat version 20.09.30 - Len Brown 
CPUID(0): AuthenticAMD 0x10 CPUID levels; 0x8020 xlevels; 
family:model:stepping 0x17:60:1 (23:96:1)
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: 20 usec (default)
current_driver: acpi_idle
current_governor: menu
current_governor_ro: menu
cpu4: POLL: CPUIDLE CORE POLL IDLE
cpu4: C1: ACPI FFH MWAIT 0x0
cpu4: C2: ACPI IOPORT 0x414
cpu4: C3: ACPI IOPORT 0x415
cpu4: cpufreq driver: acpi-cpufreq
cpu4: cpufreq governor: schedutil
cpufreq boost: 1
cpu0: MSR_RAPL_PWR_UNIT: 0x000a1003 (0.125000 Watts, 0.15 Joules, 0.000977 
sec.)
CoreCPU Avg_MHz Busy%   Bzy_MHz TSC_MHz IRQ POLLC1  C2  
C3  POLL%   C1% C2% C3% CorWatt PkgWatt
-   -   2   0.0819203716542 22  67  0   
457 0.000.060.0099.81   0.013.66
0   0   2   0.101873371750  0   3   0   
48  0.000.040.0099.84   0.003.66
0   1   0   0.031860371715  0   0   0   
15  0.000.000.0099.93
1   2   1   0.042759371728  0   2   0   
26  0.000.010.0099.91   0.00
1   3   0   0.022636371712  1   1   0   
10  0.000.010.0099.93
2   4   1   0.023079371722  1   6   0   
15  0.000.010.0099.92   0.00
2   5   1   0.042790371730  0   13  0   
20  0.000.370.0099.55
4   6   2   0.141738371774  4   12  0   
60  0.000.070.0099.79   0.00
4   7   2   0.101747371748  4   9   0   
35  0.020.050.0099.82
5   8   1   0.042305371719  0   0   0   
19  0.000.000.0099.93   0.00
5   9   2   0.091876371746  3   5   0   
38  0.000.040.0099.84
6   10  2   0.092114371750  4   7   0   
39  0.020.070.0099.81   0.00
6   11  5   0.3116573717148 5   9   0   
132 0.010.080.0099.65

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1928183

Title:
  turbostat doesn't work with AMD Cezanne APUs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1928183/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1928183] Re: turbostat doesn't work with AMD Cezanne APUs

2021-05-20 Thread David Bartley
Nope, still didn't work :(. I wonder if there was some subsequent patch
as well?  The version I have working is built off of master.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1928183

Title:
  turbostat doesn't work with AMD Cezanne APUs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1928183/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1928183] Re: turbostat doesn't work with AMD Cezanne APUs

2021-05-20 Thread Po-Hsu Lin
Hum...
yes this kernel contains 5.11.0-18 from the master-next branch + the commit 
mentioned in your bug description:

ubuntu-hirsute [master-next]$ git log --oneline 
d96cbcb tools/power/turbostat: Fix turbostat for AMD Zen CPUs
8c01482 UBUNTU: Ubuntu-5.11.0-18.19

commit d96cbcb71e2a47f240dcadfc498db278fb2a0b56
Author: Bas Nieuwenhuizen 
Date:   Wed Apr 28 17:09:03 2021 +0800

tools/power/turbostat: Fix turbostat for AMD Zen CPUs

BugLink: https://bugs.launchpad.net/bugs/1928183

It was reported that on Zen+ system turbostat started exiting,
which was tracked down to the MSR_PKG_ENERGY_STAT read failing because
offset_to_idx wasn't returning a non-negative index.

This patch combined the modification from Bingsong Si and
Bas Nieuwenhuizen and addd the MSR to the index system as alternative for
MSR_PKG_ENERGY_STATUS.

Fixes: 9972d5d84d76 ("tools/power turbostat: Enable accumulate RAPL 
display")
Reported-by: youling257 
Tested-by: youling257 
Tested-by: Kurt Garloff 
Tested-by: Bingsong Si 
Tested-by: Artem S. Tashkinov 
Co-developed-by: Bingsong Si 
Co-developed-by: Terry Bowman 
Signed-off-by: Bas Nieuwenhuizen 
Reviewed-by: Chen Yu 
Signed-off-by: Len Brown 
(cherry picked from commit 301b1d3a9104f4f3a8ab4171cf88d0f55d632b41)
Signed-off-by: Po-Hsu Lin 

BTW it looks like you will need to install more than just linux-tools-common 
deb. On a 21.04 clean install, if I just install linux-tools-common the 
turbostat command will complain about:
$ turbostat
WARNING: turbostat not found for kernel 5.11.0-17

  You may need to install the following packages for this specific kernel:
linux-tools-5.11.0-17-generic
linux-cloud-tools-5.11.0-17-generic

I will have to install 5.11.0-18 kernel/header/module/module-extras debs and 
other two tools-5.11 deb files to make it work on 5.11.0-18
Can you give it a try?
Thanks

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1928183

Title:
  turbostat doesn't work with AMD Cezanne APUs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1928183/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1928183] Re: turbostat doesn't work with AMD Cezanne APUs

2021-05-19 Thread David Bartley
Nope, still doesn't work (specifically after installing the linux-tools-
common deb).  I'm assuming that just included the cherry-pick mentioned
earlier?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1928183

Title:
  turbostat doesn't work with AMD Cezanne APUs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1928183/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1928183] Re: turbostat doesn't work with AMD Cezanne APUs

2021-05-19 Thread Po-Hsu Lin
Hello,
thanks for the bug report, can you give this 5.11 Hirsute kernel a try?
https://people.canonical.com/~phlin/kernel/lp-1928183-turbostat-cezanne/

** Also affects: linux (Ubuntu Hirsute)
   Importance: Undecided
   Status: New

** Changed in: linux (Ubuntu Hirsute)
   Status: New => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1928183

Title:
  turbostat doesn't work with AMD Cezanne APUs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1928183/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs