Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Ryzen 5 strange frequency states

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
22 posts • Page 1 of 1
Author
Message
dumi
n00b
n00b
User avatar
Posts: 30
Joined: Wed Mar 17, 2004 11:11 pm
Location: Czech Republic

Ryzen 5 strange frequency states

  • Quote

Post by dumi » Mon May 21, 2018 8:03 pm

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

Code: Select all

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.
Top
Ant P.
Watchman
Watchman
Posts: 6920
Joined: Sat Apr 18, 2009 7:18 pm
Contact:
Contact Ant P.
Website

  • Quote

Post by Ant P. » Tue May 22, 2018 3:15 am

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.
Top
dumi
n00b
n00b
User avatar
Posts: 30
Joined: Wed Mar 17, 2004 11:11 pm
Location: Czech Republic

  • Quote

Post by dumi » Tue May 22, 2018 4:15 am

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.
Top
dumi
n00b
n00b
User avatar
Posts: 30
Joined: Wed Mar 17, 2004 11:11 pm
Location: Czech Republic

  • Quote

Post by dumi » Tue May 22, 2018 6:38 pm

cpupower output before disconnection AC adapter

Code: Select all

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: Select all

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: Select all


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: Select all

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.
Top
dumi
n00b
n00b
User avatar
Posts: 30
Joined: Wed Mar 17, 2004 11:11 pm
Location: Czech Republic

  • Quote

Post by dumi » Tue May 22, 2018 6:58 pm

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.
Top
Goshanecr
Apprentice
Apprentice
User avatar
Posts: 158
Joined: Wed Aug 17, 2005 7:58 am
Location: Russia
Contact:
Contact Goshanecr
Website

  • Quote

Post by Goshanecr » Tue May 22, 2018 7:52 pm

Maybe there is a BIOS update for Your laptop?
Top
dumi
n00b
n00b
User avatar
Posts: 30
Joined: Wed Mar 17, 2004 11:11 pm
Location: Czech Republic

  • Quote

Post by dumi » Wed May 23, 2018 7:00 am

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.
Top
Anon-E-moose
Watchman
Watchman
User avatar
Posts: 6566
Joined: Fri May 23, 2008 7:31 pm
Location: Dallas area

  • Quote

Post by Anon-E-moose » Wed May 23, 2018 9:56 am

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.
UM780 xtx, 6.18 zen kernel, gcc 15, openrc, wayland
minixforum m1-s1 max -- same software as above but used for ai learning


Zealots are gonna be zealots, just like haters are gonna be haters
Top
dumi
n00b
n00b
User avatar
Posts: 30
Joined: Wed Mar 17, 2004 11:11 pm
Location: Czech Republic

  • Quote

Post by dumi » Wed May 23, 2018 11:20 am

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.
Top
Anon-E-moose
Watchman
Watchman
User avatar
Posts: 6566
Joined: Fri May 23, 2008 7:31 pm
Location: Dallas area

  • Quote

Post by Anon-E-moose » Wed May 23, 2018 11:51 am

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.
UM780 xtx, 6.18 zen kernel, gcc 15, openrc, wayland
minixforum m1-s1 max -- same software as above but used for ai learning


Zealots are gonna be zealots, just like haters are gonna be haters
Top
dumi
n00b
n00b
User avatar
Posts: 30
Joined: Wed Mar 17, 2004 11:11 pm
Location: Czech Republic

  • Quote

Post by dumi » Wed May 23, 2018 12:11 pm

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.
Top
dumi
n00b
n00b
User avatar
Posts: 30
Joined: Wed Mar 17, 2004 11:11 pm
Location: Czech Republic

  • Quote

Post by dumi » Wed May 23, 2018 12:54 pm

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.
Top
krinn
Watchman
Watchman
User avatar
Posts: 7476
Joined: Fri May 02, 2003 6:14 am

  • Quote

Post by krinn » Wed May 23, 2018 4:21 pm

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
Top
Anon-E-moose
Watchman
Watchman
User avatar
Posts: 6566
Joined: Fri May 23, 2008 7:31 pm
Location: Dallas area

  • Quote

Post by Anon-E-moose » Wed May 23, 2018 4:23 pm

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.
UM780 xtx, 6.18 zen kernel, gcc 15, openrc, wayland
minixforum m1-s1 max -- same software as above but used for ai learning


Zealots are gonna be zealots, just like haters are gonna be haters
Top
dumi
n00b
n00b
User avatar
Posts: 30
Joined: Wed Mar 17, 2004 11:11 pm
Location: Czech Republic

  • Quote

Post by dumi » Thu May 24, 2018 4:26 am

There is nothing about power saving, frequency changing in bios. :-/
Software is like sex.
It's better when it's free.
Top
dumi
n00b
n00b
User avatar
Posts: 30
Joined: Wed Mar 17, 2004 11:11 pm
Location: Czech Republic

  • Quote

Post by dumi » Sun May 27, 2018 6:23 am

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.
Top
virtguru
Tux's lil' helper
Tux's lil' helper
Posts: 148
Joined: Sat Aug 14, 2010 4:32 pm
Location: The Greatest Country in the World

  • Quote

Post by virtguru » Wed May 30, 2018 11:48 am

have you tried using maxcstate option on kernel command line ?
Vaguely remember earlier issues with ryzen and cstates.
Top
dumi
n00b
n00b
User avatar
Posts: 30
Joined: Wed Mar 17, 2004 11:11 pm
Location: Czech Republic

  • Quote

Post by dumi » Thu May 31, 2018 1:16 pm

thank for suggestion.

i tried

Code: Select all

processor.max_cstate=1 intel_idle.max_cstate=0
and

Code: Select all


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.
Top
theotherjoe
Guru
Guru
Posts: 393
Joined: Sat Nov 22, 2003 12:50 am

  • Quote

Post by theotherjoe » Thu May 31, 2018 3:23 pm

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
Top
dumi
n00b
n00b
User avatar
Posts: 30
Joined: Wed Mar 17, 2004 11:11 pm
Location: Czech Republic

  • Quote

Post by dumi » Thu May 31, 2018 7:59 pm

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.
Top
dumi
n00b
n00b
User avatar
Posts: 30
Joined: Wed Mar 17, 2004 11:11 pm
Location: Czech Republic

  • Quote

Post by dumi » Tue Jun 05, 2018 7:10 am

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.
Top
dumi
n00b
n00b
User avatar
Posts: 30
Joined: Wed Mar 17, 2004 11:11 pm
Location: Czech Republic

  • Quote

Post by dumi » Tue Jun 05, 2018 8:27 am

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.
Top
Post Reply

22 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic