Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Ryzen 5 strange frequency states
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
dumi
n00b
n00b


Joined: 17 Mar 2004
Posts: 19
Location: Czech Republic

PostPosted: Mon May 21, 2018 8:03 pm    Post subject: Ryzen 5 strange frequency states Reply with quote

Hi, a bought new acer Nitro 5 notebook with Ryzen CPU (see below).
Code:

AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx


I'm using gentoo linux for more than ten years, bud now i'm in corner.

I try to use kernel gentoo-sources-4.9.x, it works fine (but it has no support for VEGA graphics), CPU reports frequency 2.0Ghz (right), when i disconnect AC adaptor frequency falls down ti 1.6Ghz, it;s ok, when i plugin AC adaptor back frequency returns to 2.0Ghz and remain stable.

Because of missing vega support i try to build kernel gentoo-sources-4.16.9, vega works fine, but cpu frequency behaves strange.

It is not stable on 2.0GHz bud every core has different frequency at freq fluctuate between about 1300 - 3800 MHz. When i disconnect AC adapter freq falls down to 399MHz on all cores and remain here stable until reboot. After connection AC adapter back nothning changes. Frequency realy falls down, i try some test with compiling software and procesing power is enormly low.

I try lot of settings in kernel, but without success.

Any ideas what to do?

Thank.
_________________
Software is like sex.
It's better when it's free.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5214

PostPosted: Tue May 22, 2018 3:15 am    Post subject: Reply with quote

Can you install/run "cpupower frequency-info" and post the output before and after unplugging the AC? It sounds like some power management script is setting the cpu to powersave, which is more or less useless on a modern system.
Back to top
View user's profile Send private message
dumi
n00b
n00b


Joined: 17 Mar 2004
Posts: 19
Location: Czech Republic

PostPosted: Tue May 22, 2018 4:15 am    Post subject: Reply with quote

Thanks for reply.

i'm not having notebook with me, i will post output later.

But kernel is without cpufreq drivers, cpupower reports no frequency info.

i tried install all kernel cpufreq drivers with no change, without the drivers too. I think cpufrequency scaling is not the problem. With older kernel it works fine with same software installed.
_________________
Software is like sex.
It's better when it's free.
Back to top
View user's profile Send private message
dumi
n00b
n00b


Joined: 17 Mar 2004
Posts: 19
Location: Czech Republic

PostPosted: Tue May 22, 2018 6:38 pm    Post subject: Reply with quote

cpupower output before disconnection AC adapter

Code:

dumidek ~ # cpupower frequency-info
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  hardware limits: 1.60 GHz - 2.00 GHz
  available frequency steps: 2.00 GHz, 1.70 GHz, 1.60 GHz
  available cpufreq governors: performance
  current policy: frequency should be within 1.60 GHz and 2.00 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 2.00 GHz (asserted by call to hardware).
  boost state support:
    Supported: no
    Active: no
    Boost States: 0
    Total States: 3
    Pstate-P0:  2600MHz
    Pstate-P1:  2700MHz
    Pstate-P2:  2400MHz


Cpu frequency reported by /proc/cpuinfo

Code:

dumidek ~ # cat /proc/cpuinfo |grep MHz
cpu MHz      : 3089.260
cpu MHz      : 3090.212
cpu MHz      : 3133.338
cpu MHz      : 3133.347
cpu MHz      : 3142.518
cpu MHz      : 3142.525
cpu MHz      : 3102.502
cpu MHz      : 3102.623


After disconection and reconection AC adapter:

Code:


dumidek ~ # cpupower frequency-info
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  hardware limits: 1.60 GHz - 2.00 GHz
  available frequency steps: 2.00 GHz, 1.70 GHz, 1.60 GHz
  available cpufreq governors: performance
  current policy: frequency should be within 1.60 GHz and 2.00 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 2.00 GHz (asserted by call to hardware).
  boost state support:
    Supported: no
    Active: no
    Boost States: 0
    Total States: 3
    Pstate-P0:  2600MHz
    Pstate-P1:  2700MHz
    Pstate-P2:  2400MHz


Code:

dumidek ~ # cat /proc/cpuinfo |grep MHz
cpu MHz      : 399.263
cpu MHz      : 399.265
cpu MHz      : 399.263
cpu MHz      : 399.264
cpu MHz      : 399.265
cpu MHz      : 399.263
cpu MHz      : 399.263
cpu MHz      : 399.262


Computer realy slow down, so freq is realy changed...

I don't know what to do with this, only restart help.[/code]
_________________
Software is like sex.
It's better when it's free.
Back to top
View user's profile Send private message
dumi
n00b
n00b


Joined: 17 Mar 2004
Posts: 19
Location: Czech Republic

PostPosted: Tue May 22, 2018 6:58 pm    Post subject: Reply with quote

I have new information.

On first boot (after pressing power button, notebook in off state), system boots with low frequency (no matter if adapter is connected). I need to reboot it to get full frequency, Power off and turn on doesnt help. Only reset.

Strange is, that is not needed to boot the system, reset on grub loader screen help too.

Summary:

1] turn On PC
2] booting system
3] frequency low
4] reboot
5] booting system
6[ frequency high (but floating)

OR

1] turn on PC
2] pres ctrl+alt+delete (reboot) on grub screen
3] booting system
4] frequency high (but floating)

Very strange for me. It's look like it is a hardware issue, and the old kernel can fix it, but old kernel does not suppor VEGA so it is unusable for me :(
_________________
Software is like sex.
It's better when it's free.
Back to top
View user's profile Send private message
Goshanecr
Apprentice
Apprentice


Joined: 17 Aug 2005
Posts: 158
Location: Russia

PostPosted: Tue May 22, 2018 7:52 pm    Post subject: Reply with quote

Maybe there is a BIOS update for Your laptop?
Back to top
View user's profile Send private message
dumi
n00b
n00b


Joined: 17 Mar 2004
Posts: 19
Location: Czech Republic

PostPosted: Wed May 23, 2018 7:00 am    Post subject: Reply with quote

I didnt found anything about bios update on this model :-/

Today i will test this on debian live CD.
_________________
Software is like sex.
It's better when it's free.
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3328
Location: Dallas area

PostPosted: Wed May 23, 2018 9:56 am    Post subject: Reply with quote

I've noticed screwy frequency results being posted since I've upgraded to 4.14 kernel.
I don't think the cpu is behaving badly, it's the reporting (from the kernel) that's screwy.

Not sure if that is what's going on with your system.
_________________
Asus m5a99fx, FX 8320 - nouveau & radeon, oss4
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
4.14.62 kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 4.9.4 & 7.3.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
dumi
n00b
n00b


Joined: 17 Mar 2004
Posts: 19
Location: Czech Republic

PostPosted: Wed May 23, 2018 11:20 am    Post subject: Reply with quote

screwy frequency isnt problem, computing power is good. But iuf i disconnect AC adapter frequency drop tro 398MHz and computer works very slowly, so frequency realy drops to this value. :(
_________________
Software is like sex.
It's better when it's free.
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3328
Location: Dallas area

PostPosted: Wed May 23, 2018 11:51 am    Post subject: Reply with quote

why are you using the performance governor instead of either ondemand or conservative ?



The drop in cpu freq drop may be bios related, because that cpu isn't supposed to run at that low frequency.
--> hardware limits: 1.60 GHz - 2.00 GHz <--
or it's some screwy bug between the governors, cpupower and the bios.

Edit to add: the only thing I can recommend is to not use cpupower to change things and see if the problem persists.
_________________
Asus m5a99fx, FX 8320 - nouveau & radeon, oss4
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
4.14.62 kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 4.9.4 & 7.3.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
dumi
n00b
n00b


Joined: 17 Mar 2004
Posts: 19
Location: Czech Republic

PostPosted: Wed May 23, 2018 12:11 pm    Post subject: Reply with quote

performance governor isnt problem, same happens if i use userspace, ondemand etc.

I try to install all of them, disable cpufreq support, no change. i think problem isn't in frequency scaling. With complete disabled cpu scaling problem persist. May the bios/efi relatet problem as you said. But kernel version matter becaus on 4.9.x all works perfect :(
_________________
Software is like sex.
It's better when it's free.
Back to top
View user's profile Send private message
dumi
n00b
n00b


Joined: 17 Mar 2004
Posts: 19
Location: Czech Republic

PostPosted: Wed May 23, 2018 12:54 pm    Post subject: Reply with quote

new information:

on kernel 4.19. /proc/cpuinfo returns:

[code] address sizes: 43 bits physical, 48 bits virtual[/code]

onkernel 4.9 returns
[code]address sizes: 48 bits physical, 48 bits virtual[/code]

maybe it can help to discover where is problem...
_________________
Software is like sex.
It's better when it's free.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 6839

PostPosted: Wed May 23, 2018 4:21 pm    Post subject: Reply with quote

For what is it worth (maybe just to know you are not alone?) see https://forums.gentoo.org/viewtopic-t-1076990.html
why that link?
ryzen 5
work with 4.9
fail with 4.15 (and you 4.19)
Must be a regression then
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3328
Location: Dallas area

PostPosted: Wed May 23, 2018 4:23 pm    Post subject: Reply with quote

I would check the bios settings and see if one of them isn't causing the problem.

I have an acer and there isn't much that can be changed in the bios, BUT I did glance at asus swift 3 and it does have some settings for powersaving, etc.
Play around with them.
_________________
Asus m5a99fx, FX 8320 - nouveau & radeon, oss4
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
4.14.62 kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 4.9.4 & 7.3.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
dumi
n00b
n00b


Joined: 17 Mar 2004
Posts: 19
Location: Czech Republic

PostPosted: Thu May 24, 2018 4:26 am    Post subject: Reply with quote

There is nothing about power saving, frequency changing in bios. :-/
_________________
Software is like sex.
It's better when it's free.
Back to top
View user's profile Send private message
dumi
n00b
n00b


Joined: 17 Mar 2004
Posts: 19
Location: Czech Republic

PostPosted: Sun May 27, 2018 6:23 am    Post subject: Reply with quote

Yesterday i tried kernels 4.14.33 and 4.14.44 from gentoo-sources and git-sources-4.17.0-rc6. same problem.

Seems to kernel 4.9 is last in gentoo portage which works as expected, but without vega support is useless for me.
_________________
Software is like sex.
It's better when it's free.
Back to top
View user's profile Send private message
virtguru
Tux's lil' helper
Tux's lil' helper


Joined: 14 Aug 2010
Posts: 140
Location: Eire

PostPosted: Wed May 30, 2018 11:48 am    Post subject: Reply with quote

have you tried using maxcstate option on kernel command line ?
Vaguely remember earlier issues with ryzen and cstates.
Back to top
View user's profile Send private message
dumi
n00b
n00b


Joined: 17 Mar 2004
Posts: 19
Location: Czech Republic

PostPosted: Thu May 31, 2018 1:16 pm    Post subject: Reply with quote

thank for suggestion.

i tried

Code:

processor.max_cstate=1 intel_idle.max_cstate=0


and

Code:


processor.max_cstate=0


Nothing helps. but on first try, CPU fan was going on 100% (temperature was normal).

:( :( :(
_________________
Software is like sex.
It's better when it's free.
Back to top
View user's profile Send private message
theotherjoe
Guru
Guru


Joined: 22 Nov 2003
Posts: 366

PostPosted: Thu May 31, 2018 3:23 pm    Post subject: Reply with quote

dumi,
I had some strange things going on with a new ryzen 5 1600 cpu which
could be narrowed down to the age of my PSU and the C6 power state.
during the process of chasing the error I came across the following
python script. maybe it can be of help for you too:

https://github.com/r4m0n/ZenStates-Linux
Back to top
View user's profile Send private message
dumi
n00b
n00b


Joined: 17 Mar 2004
Posts: 19
Location: Czech Republic

PostPosted: Thu May 31, 2018 7:59 pm    Post subject: Reply with quote

theotherjoe

thanks for link. i tried to disable all states except P0, no change, after unpluging AC adaptor frequency drops to 399MHz, setting every P state that is enabled didnt help :-/

very strange think..
_________________
Software is like sex.
It's better when it's free.
Back to top
View user's profile Send private message
dumi
n00b
n00b


Joined: 17 Mar 2004
Posts: 19
Location: Czech Republic

PostPosted: Tue Jun 05, 2018 7:10 am    Post subject: Reply with quote

i do some test:
last kernel that work fine is 4.14
4.15-rc1 behaves as descripted above, after disconnecting adapter CPU freq drops down and reboot is needed..
_________________
Software is like sex.
It's better when it's free.
Back to top
View user's profile Send private message
dumi
n00b
n00b


Joined: 17 Mar 2004
Posts: 19
Location: Czech Republic

PostPosted: Tue Jun 05, 2018 8:27 am    Post subject: Reply with quote

amazing....

i reset bios settings do default and press button to disconnect notebook battery and after new boot frequency behaves correctly :(

maybe some bad was stuck somewhere in computer memory which persist power off and reboots, bios is set exactly the same as was...
_________________
Software is like sex.
It's better when it's free.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum