Jump to content
Squazz

Zenstates (Fixing the problem where gen1 Ryzen won't boost in unRaid)

17 posts in this topic Last Reply

Recommended Posts

I had quite some problems with my speed and Cinebench score of my Ryzen 1700.

 

The first step is to use the plugin "TipsAndTweaks" to change the "CPU Scaling Guvenor" to "On Demand". In my case it was set to "Power Save" as default. This moved my from about 550 to 1170 in CineBench. A noticeable change.

 

Looking at the at terminal with the following command, it was wasy to see that my Ryzen 1700 just wouldn't boost properly when using Cinebench:

Quote

watch -n 1 grep MHz /proc/cpuinfo

To fix this

Download zenstates from https://github.com/r4m0n/ZenStates-Linux/blob/master/zenstates.py
Save the script in a share under the name zenstates.py (I chose /mnt/user/appdata)


Use NerdPack to install python (Needed for executing the python script)

 

I used the UserScripts plugin to set up this script. Running every time that my array starts.
I got the script from @david279 (He also made an Excel sheel to calculate the value to enter for difference zenstate entries https://docs.google.com/spreadsheets/d/1icKFa0COFFpIKmkXOXVUrTt7mnMqdYYLbtRiedat5zs/edit?usp=drivesdk)

Quote

### The 1700x only seems to support P0/1/2
## P0 = 3.900GHz, 1.3500v
/mnt/user/appdata/zenstates.py -p 0 -f 9C -d 8 -v 1C #Maximum power

## P1 = 3.600GHz, 1.3000v
#/mnt/user/appdata/zenstates.py -p 1 -f 90 -d 8 -v 20

## P2 = 2.200GHz, 0.8000v

#/mnt/user/appdata/zenstates.py -p 2 -f 84 -d C -v 6A #BaseClock

I only apply for P0 as that is the only state I'm interested in. The rest is up to CPU to downclock itself


After all of these changes, CineBench score jumped from 550 to 1420. So I'd said everything worked out just fine :)

 

I hope this can help somebody else with the same or similar problems.

Edited by Squazz

Share this post


Link to post

I'll try this out. But could you provide some more information if you have disabled the C states in the BIOS and in unRAID itself? I've, because unRAID wasn't stable with them enabled.

 

cheers

Edited by pappaq

Share this post


Link to post
3 hours ago, pappaq said:

I'll try this out. But could you provide some more information if you have disabled the C states in the BIOS and in unRAID itself? I've, because unRAID wasn't stable with them enabled.

 

cheers

I have C-states disabled in BIOS.

 

I've been thinking about expanding my "build log" by providing information on how my BIOS is set up. Maybe I should do that if that's not something that well documented in other posts on the forum.

 

Edited by Squazz

Share this post


Link to post

Nice build! Mine looks nearly the same. But the system has an absurd amount of idle power consumption...with all HDDs spun down the system still draws 100W from the wall...that seems too much. I expected around 50-60 with my GTX970 in idle. Do you have data to compare?

Share this post


Link to post
On 10/18/2018 at 12:21 PM, pappaq said:

Nice build! Mine looks nearly the same. But the system has an absurd amount of idle power consumption...with all HDDs spun down the system still draws 100W from the wall...that seems too much. I expected around 50-60 with my GTX970 in idle. Do you have data to compare?

If you look in the thread I have the following:

 

On 6/6/2018 at 8:31 PM, Squazz said:

Power readings

190w - Startup peak

100w - Watching movie (all drives but one spun down)

130w - Idle (Win10 Desktop open)

170w - Light use (Wathing Netflix on win10 VM)

350w - Gaming

 

But let's talk in private messages and not spam this thread ;)

Share this post


Link to post
On 10/14/2018 at 10:58 AM, Squazz said:

I had quite some problems with my speed and Cinebench score of my Ryzen 1700.

 

The first step is to use the plugin "TipsAndTweaks" to change the "CPU Scaling Guvenor" to "On Demand". In my case it was set to "Power Save" as default. This moved my from about 550 to 1170 in CineBench. A noticeable change.

 

Looking at the at terminal with the following command, it was wasy to see that my Ryzen 1700 just wouldn't boost properly when using Cinebench:

To fix this

Download zenstates from https://github.com/r4m0n/ZenStates-Linux/blob/master/zenstates.py
Save the script in a share under the name zenstates.py (I chose /mnt/user/appdata)


Use NerdPack to install python (Needed for executing the python script)

 

I used the UserScripts plugin to set up this script. Running every time that my array starts.
I got the script from @david279

I only apply for P0 as that is the only state I'm interested in. The rest is up to CPU to downclock itself


After all of these changes, CineBench score jumped from 550 to 1420. So I'd said everything worked out just fine :)

 

I hope this can help somebody else with the same or similar problems.

Thanks for this, now I am boosting to 3.9 on my 1700 (not x).

I obviously want to boost to 3.7 not 3.9 so how do I go about changing the parameters to reflect this?

Share this post


Link to post

I have a Excel sheet that helps do the calculate for zenstates. I'm at work right so I can't upload it but if you look at the git for zenstates it may be on there.

Sent from my SM-G955U using Tapatalk

Share this post


Link to post

I've been finally trying this out and everytime I try to launch the script I get a "Permission denied" back for every execution line.

Quote

Script location: /tmp/user.scripts/tmpScripts/Ryzen_P-States/script
Note that closing this window will abort the execution of this script
/tmp/user.scripts/tmpScripts/Ryzen_P-States/script: line 4: /mnt/user/Pool/zenstates.py: Permission denied
/tmp/user.scripts/tmpScripts/Ryzen_P-States/script: line 7: /mnt/user/Pool/zenstates.py: Permission denied
/tmp/user.scripts/tmpScripts/Ryzen_P-States/script: line 10: /mnt/user/Pool/zenstates.py: Permission denied

Does anyone know what I am doing wrong here?

Edited by pappaq

Share this post


Link to post

Do you have python installed?  And did you make zenstates.py executable?  ( chmod +x /mnt/user/Pool/zenstates.py )

Edited by Squid

Share this post


Link to post
16 minutes ago, Squid said:

Do you have python installed?  And did you make zenstates.py executable?  ( chmod +x /mnt/user/Pool/zenstates.py )

I've made zenstates.py executable but now I get

Quote

Script location: /tmp/user.scripts/tmpScripts/Zenstates/script
Note that closing this window will abort the execution of this script
/tmp/user.scripts/tmpScripts/Zenstates/script: /mnt/user/Pool/zenstates.py: /usr/bin/python^M: bad interpreter: No such file or directory

back! And zenstates.py is located there.

Share this post


Link to post
6 minutes ago, pappaq said:

/usr/bin/python^M: bad interpreter: No such file or directory

Install CA Cfg Editor.  Load /mnt/user/Pool/zenstates.py  switch the Line endings from CRLF to LF (bottom left).  Or, re-edit the file using Notepad++ (not Notepad) and do the same thing under Edit, EOL Conversion

Share this post


Link to post
On 11/4/2018 at 3:35 PM, Squid said:

Install CA Cfg Editor.  Load /mnt/user/Pool/zenstates.py  switch the Line endings from CRLF to LF (bottom left).  Or, re-edit the file using Notepad++ (not Notepad) and do the same thing under Edit, EOL Conversion

You sir, are a genius! Thank you so much! Works like a charm!

Edited by pappaq

Share this post


Link to post

I have also tried to use this script, when I load the Userscripts to run it gives me this error 

 

Quote

Script location: /tmp/user.scripts/tmpScripts/Zenstates718990123/script
Note that closing this window will abort the execution of this script
usage: script [-h] [-l] [-p {0,1,2,3,4,5,6,7}] [--enable] [--disable] [-f FID]
[-d DID] [-v VID] [--c6-enable] [--c6-disable]
script: error: unrecognized arguments: 

Thank you for any help 

Share this post


Link to post

hi guys, i am from germany, with the high energy costs 

i would be very glad to see an usefull guide to this....

tried it, but first stocked on the different python versions (seems like 3.6 worked for me, 2.7 not) 
...then i recalculated the tables for my ryzen 1600 and my experiences with my cpu ... 
yet, there´s no effect for now... could you write a short tutorial for the 1.gen ryzen users?

i familar with python, but I don't want to spend the time on every script... like most of us ... cause it is a function that should propertly run

 

thanks for the ingenious work that many have already done * but please make it a little more accessible (...for me ;)) 

 

Edit: cause I don't know where my mistake is....

Edited by Kyruss86

Share this post


Link to post

Works perfectly!

 

The only "problem" is: now every core of my Ryzen 1700 boosts up to 3.7GHz, isn't Turbo Boost supposed to only boost one core up top 3.7GHz or alternatively every core to 3.2GHz?

 

By the way, I'm using the first 6 cores for my gaming and daily vm (these are isolated in unraid) and the last two are available to everything else (unraid itself, docker and so on)... does it matter which cores I isolate for my vms? 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.