You are not logged in.

#26 2013-06-13 11:20:44

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: mprime-phc-setup - find best vids for undervolting, without crashing

orschiro wrote:

Can it be a problem with your script?

Nope. Nothing in the test loop can change the frequency.

cpupower reports me the correct frequency:

That doesn’t mean anything; if you have something that dynamically changes the frequency running, then simply running a command may make it go to the top frequency.

Offline

#27 2013-06-13 22:03:44

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: mprime-phc-setup - find best vids for undervolting, without crashing

stqn wrote:
graysky wrote:

Seems like a nice idea but be aware that mprime is the end-all in determining stability.  In fact, depending on how the voltage is controlled by the BIOS, a minimal vcore setting that leads to stable priming may not be stable for other tasks that don't require the full vcore such as compiling or x264 encoding since they are not as demanding.  For more, see: https://wiki.archlinux.org/index.php/St … g_Programs

This wiki entry does not mention which cpu governor was used, and if the frequency was fixed or not… Does that machine change CPU voltage for a given fixed frequency depending on load?

Edit: clarification.

This is using either the deprecated acpi_cpufreq module or the pstate driver; the frequency was not fixed.  This machine's BIOS manages the CPU voltage automatically and it is variable depending on load.  In principal, it doesn't matter if the BIOS is modulating the vcore (recommended), or if the user fixes the vcore (discouraged): some programs (x264 and gcc) will be less demanding on vcore to support a stable system which is why using some that more demanding and less demanding is critical.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#28 2013-06-17 07:12:26

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: mprime-phc-setup - find best vids for undervolting, without crashing

stqn wrote:
orschiro wrote:

Can it be a problem with your script?

Nope. Nothing in the test loop can change the frequency.

cpupower reports me the correct frequency:

That doesn’t mean anything; if you have something that dynamically changes the frequency running, then simply running a command may make it go to the top frequency.

I tried using the performance governor as this one would not change the frequency. However, then your script does not work as it requires the userspace governor to be loaded.

I am running out of ideas.

Offline

#29 2013-07-17 09:12:14

OdinEidolon
Member
From: Belluno - Italy
Registered: 2011-01-31
Posts: 498

Re: mprime-phc-setup - find best vids for undervolting, without crashing

With the notebook in sig, and using powerdown as power saving tool (should not adjust frequency dynamically, just when the power state changes):

└──>  sudo bash mprime-phc-setup

Warning: this might crash your computer or applications.
Please save all your work and don't do anything while the test is running.
You can stop the test at any time with CTRL-C.
Press RETURN to go on or CTRL-C to cancel.

Switching to the userspace governor. ondemand will be restored later.
Estimated time to completion: between 19 min and 45 min

Testing frequency 0 (2534000)…
Default vid: 43
Trying vid 42 for 20 seconds
.
ERROR: Wrong frequency! (2533000 instead of 2534000)
cpu0/cpufreq/scaling_governor = userspace
cpu1/cpufreq/scaling_governor = userspace
cpu0/cpufreq/cpuinfo_cur_freq = 2533000
cpu1/cpufreq/cpuinfo_cur_freq = 2533000
cpu0/cpufreq/scaling_cur_freq = 2533000
cpu1/cpufreq/scaling_cur_freq = 2533000
cpu0/cpufreq/phc_vids = 42 36 23 17 
cpu1/cpufreq/phc_vids = 42 36 23 17 

Restoring state…

Hardware: 2016 Dell XPS15 - matte FullHD - i5-6300HQ - 32GB DDR4 - Nvidia GTX960M - Samsung 840EVO 250GB SSD - 56Wh
Software: Plasma 5 - rEFInd - linux-ck - preload - prelink - verynice - psd - bumblebee

Offline

#30 2013-07-17 09:33:44

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: mprime-phc-setup - find best vids for undervolting, without crashing

This is related to the Intel pstate driver which is automatically adjusting the frequency. I have no idea how to disable that temporarily.

Offline

#31 2013-07-17 09:52:45

OdinEidolon
Member
From: Belluno - Italy
Registered: 2011-01-31
Posts: 498

Re: mprime-phc-setup - find best vids for undervolting, without crashing

orschiro wrote:

This is related to the Intel pstate driver which is automatically adjusting the frequency. I have no idea how to disable that temporarily.

mmmh, are you sure? It's an old Core2Duo, as per sig. The pstate driver does apply only for SandyBridge right now iirc, but I may be wrong of course.


Hardware: 2016 Dell XPS15 - matte FullHD - i5-6300HQ - 32GB DDR4 - Nvidia GTX960M - Samsung 840EVO 250GB SSD - 56Wh
Software: Plasma 5 - rEFInd - linux-ck - preload - prelink - verynice - psd - bumblebee

Offline

#32 2013-07-17 09:58:08

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: mprime-phc-setup - find best vids for undervolting, without crashing

Not completely sure. But on my old Core2Duo I have the same frequency control since the introduction of the pstate driver.

Offline

#33 2013-07-17 15:19:45

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: mprime-phc-setup - find best vids for undervolting, without crashing

OdinEidolon wrote:
orschiro wrote:

This is related to the Intel pstate driver which is automatically adjusting the frequency. I have no idea how to disable that temporarily.

mmmh, are you sure? It's an old Core2Duo, as per sig. The pstate driver does apply only for SandyBridge right now iirc, but I may be wrong of course.

Here are the CPUs that the pstate driver applies to:
https://github.com/torvalds/linux/blob/ … ate.c#L518

Based on my research (couldn’t find an official table for the model numbers)…
0x2a is Intel Core i7-2600K Sandy Bridge
0x2d is Intel(R) Core(TM) i7-3930K
0x3a is Ivy Bridge.

So the pstate driver should not load on older CPUs.

OdinEidolon wrote:
ERROR: Wrong frequency! (2533000 instead of 2534000)

That’s a pretty thin difference. I don’t know what’s causing it, but I guess the error detection could be changed to allow for a 1% difference…

Offline

#34 2013-07-17 15:21:19

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: mprime-phc-setup - find best vids for undervolting, without crashing

Good idea! Will you update the script accordingly?

Offline

#35 2013-07-17 15:39:26

OdinEidolon
Member
From: Belluno - Italy
Registered: 2011-01-31
Posts: 498

Re: mprime-phc-setup - find best vids for undervolting, without crashing

I'm not sure that would be the right solution of the problem.
On my system I have 4 states: 2534, 2533, 1600 and 800. (Values in MHz).
The standard voltages IDs between the first two states are very different: 43 vs 36.
I don't know why this is so, but I guess the guys at Intel did so with a reason.


Hardware: 2016 Dell XPS15 - matte FullHD - i5-6300HQ - 32GB DDR4 - Nvidia GTX960M - Samsung 840EVO 250GB SSD - 56Wh
Software: Plasma 5 - rEFInd - linux-ck - preload - prelink - verynice - psd - bumblebee

Offline

#36 2013-07-19 02:22:45

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: mprime-phc-setup - find best vids for undervolting, without crashing

OdinEidolon wrote:

On my system I have 4 states: 2534, 2533, 1600 and 800. (Values in MHz).
The standard voltages IDs between the first two states are very different: 43 vs 36.

That makes absolutely no sense to me.
I’m sorry but I have no idea about what’s causing your problems.

Offline

#37 2013-07-19 07:43:59

OdinEidolon
Member
From: Belluno - Italy
Registered: 2011-01-31
Posts: 498

Re: mprime-phc-setup - find best vids for undervolting, without crashing

stqn wrote:
OdinEidolon wrote:

On my system I have 4 states: 2534, 2533, 1600 and 800. (Values in MHz).
The standard voltages IDs between the first two states are very different: 43 vs 36.

That makes absolutely no sense to me.
I’m sorry but I have no idea about what’s causing your problems.

This is the standard setup for the P8700, who knows why?
I'll try to investigate further if I get some time. Thanks by the way.


Hardware: 2016 Dell XPS15 - matte FullHD - i5-6300HQ - 32GB DDR4 - Nvidia GTX960M - Samsung 840EVO 250GB SSD - 56Wh
Software: Plasma 5 - rEFInd - linux-ck - preload - prelink - verynice - psd - bumblebee

Offline

#38 2013-07-19 14:51:07

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: mprime-phc-setup - find best vids for undervolting, without crashing

OdinEidolon wrote:

This is the standard setup for the P8700, who knows why?

Now that I have your CPU model, I searched for it and found interesting comments on Undervolting in Ubuntu 10.04 (Lucid) LTS:

byte wrote:

i’ve core2duo P8700, it seems that test doesnt run correctly, he just passes all VIDs to 0 without any errors, once he gave an error on the second multiplyer..

Tyler wrote:

My first VID went all the way down to zero without crashing, the script came back and said it didn’t trust this, and set it back to default value.
Values are: 45 23 4 4 4

mihai007 wrote:

I made the script that way because:
If you do cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies and check you will see that the first frequency is not 2000000. It is a little higher. In my case, a 2.4Ghz CPU my first one is 2401000 instead of 2400000. I do not know why this happens on some CPU’s but if this happens it means that the first frequency does not count as the cpu completely ignores the 45 value in your case. Only the second one is correct. By those values, undervolting went perfectly when in full load. For the other values the CPU will not use 4, will use higher values, maybe 15 which is the hardware limit but it does not matter, will use the minimum available. So instead of 45 you could insert any value since it is completely ignored anyway.
I made this extra case to the script because since this happens on some cpu’s, when the script starts with the second value will start from the last previous value which would crash your pc instantly (would mean 4 instead of 23)

Tyler wrote:

That makes sense, I noticed how it was taking the last number tested. Also my frequencies are:
2001000 2000000 1600000 1200000 800000

Pete wrote:

Since my warranty for a HP dv6799eg special edition (Intel T8100) is gone, I tried it and guess what? Something went … not exactly right.
The script went (on governor 2101MHz) down to VID 0.

So it looks like a fix could be to check if the first frequency is 1 MHz higher than the second one, and in that case just ignore the first one.

Offline

#39 2013-07-19 17:40:23

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: mprime-phc-setup - find best vids for undervolting, without crashing

Please try the new version.

Offline

#40 2013-07-21 08:27:11

OdinEidolon
Member
From: Belluno - Italy
Registered: 2011-01-31
Posts: 498

Re: mprime-phc-setup - find best vids for undervolting, without crashing

I've not tested it to the end of the test yet, but it starts and runs OK. I only have one small problem that may be totally unrelated with the script.

When I open your link in Firefox or Chromium some of the characters are corrupted. So if I copy the script manually from the browser and paste it in a new text file, I get a non-working script.

I have to wget it, then it works. Then if I read it with Kate I have the same corruption, for example, 1st line:

so that mprime doesn’t find errors.

This is probably an encoding problem and me being stupid. This also happened with the previous version.

EDIT: yes, it has to be viewed in UTF-8 and not in ISO-8859. Sorry.

REEDIT: I also confirm that even under the harshest of the mprime / stress sessions the frequency does not go to 2534MHz but it stays at 2533.
I also noticed that powertop states my frequencies are: 0.8,1.6, 2.54, "Turbo mode". "Turbo mode" is always 0.0% in powertop, I never noticed it before.

Last edited by OdinEidolon (2013-07-21 08:31:27)


Hardware: 2016 Dell XPS15 - matte FullHD - i5-6300HQ - 32GB DDR4 - Nvidia GTX960M - Samsung 840EVO 250GB SSD - 56Wh
Software: Plasma 5 - rEFInd - linux-ck - preload - prelink - verynice - psd - bumblebee

Offline

#41 2013-07-21 13:31:14

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: mprime-phc-setup - find best vids for undervolting, without crashing

OdinEidolon wrote:

When I open your link in Firefox or Chromium some of the characters are corrupted. So if I copy the script manually from the browser and paste it in a new text file, I get a non-working script.

I have to wget it, then it works. Then if I read it with Kate I have the same corruption, for example, 1st line:

so that mprime doesn’t find errors.

Yes indeed I use a couple unicode characters. I thought everyone was using utf8 now, but looks like I was wrong. I’m surprised that it makes the script fail though as these should only show up in comments and strings… :-/
Right-click -> "Save as" saves a corrupted file too?

Edit: I have removed the unicode characters from the script so it should be fine now (use the link in the first post to download the latest version.)

Last edited by stqn (2013-07-21 22:55:39)

Offline

#42 2013-07-22 07:27:13

OdinEidolon
Member
From: Belluno - Italy
Registered: 2011-01-31
Posts: 498

Re: mprime-phc-setup - find best vids for undervolting, without crashing

stqn wrote:
OdinEidolon wrote:

When I open your link in Firefox or Chromium some of the characters are corrupted. So if I copy the script manually from the browser and paste it in a new text file, I get a non-working script.

I have to wget it, then it works. Then if I read it with Kate I have the same corruption, for example, 1st line:

so that mprime doesn’t find errors.

Yes indeed I use a couple unicode characters. I thought everyone was using utf8 now, but looks like I was wrong. I’m surprised that it makes the script fail though as these should only show up in comments and strings… :-/
Right-click -> "Save as" saves a corrupted file too?

Edit: I have removed the unicode characters from the script so it should be fine now (use the link in the first post to download the latest version.)

Yeah really it surprised me too, but copying the text manually from one of the two mentioned browsers lead to encoding errors also in the middle of the script. I really don't know why.
Now it works with all the methods, both wgetting, right-clicking and copying plaintext.

Thanks, it's really a good script and my vids are now
43 27 1 0
from
43 36 23 17
(script suggested 2 2 as last vids, I think that since it won't go lower than 0 it was not necessary to add the 2 points for stability, especially in the lowest frequency, since an upper frequency had already proved 0 to be OK)


Hardware: 2016 Dell XPS15 - matte FullHD - i5-6300HQ - 32GB DDR4 - Nvidia GTX960M - Samsung 840EVO 250GB SSD - 56Wh
Software: Plasma 5 - rEFInd - linux-ck - preload - prelink - verynice - psd - bumblebee

Offline

#43 2013-07-22 14:43:48

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: mprime-phc-setup - find best vids for undervolting, without crashing

Great, thanks for the feedback. Glad it’s working, at last!

OdinEidolon wrote:

(script suggested 2 2 as last vids, I think that since it won't go lower than 0 it was not necessary to add the 2 points for stability, especially in the lowest frequency, since an upper frequency had already proved 0 to be OK)

Well there’s nothing to tell if your 3rd frequency (VID 1) will be stable, but the fourth could probably be reduced from VID 2 indeed. In fact that’s also what I did for my Core i3 that gets 2 2 2 2 2 2 … 2 2 as VIDs smile. I changed it to 2 2 2 2 … 1 1 … 0 0.

But then according to the blog post of the author of linux-phc-optimize and the comments there, some processors have a hidden minimum VID above 0. I’m not sure but by looking at the fan speed during the test, as the VID is reduced, I can not see the fan getting slower starting at about VID 8. So maybe it doesn’t matter if I set 0, 1, 5 or 8 and it’s all the same.

I tried to find official information on this but haven’t found anything yet.

Last edited by stqn (2013-07-22 16:00:21)

Offline

#44 2013-07-22 17:49:41

OdinEidolon
Member
From: Belluno - Italy
Registered: 2011-01-31
Posts: 498

Re: mprime-phc-setup - find best vids for undervolting, without crashing

Thank you for the script. I "mprimed" manually the system for an hour and got no problems even with "0 0", so no problem there.
I guess that on a laptop it's very hard to find out. On a desktop you can locate the pins of the CPU tension regulators, on a laptop that's much more difficult.

However some laptops do indeed have a software voltage monitoring (probably gaming laptops only), lm-sensors can usually sense them.


Hardware: 2016 Dell XPS15 - matte FullHD - i5-6300HQ - 32GB DDR4 - Nvidia GTX960M - Samsung 840EVO 250GB SSD - 56Wh
Software: Plasma 5 - rEFInd - linux-ck - preload - prelink - verynice - psd - bumblebee

Offline

#45 2013-08-09 20:24:04

Lockheed
Member
Registered: 2010-03-16
Posts: 1,512

Re: mprime-phc-setup - find best vids for undervolting, without crashing

I tried running this script on C2D P9400, but the entire system freezes when it gets to 0.9v on the highest clock. I thought the point of using mprime was not to avoid freezes?
And because the script was not designed to work around freezes, I get no results.

Offline

#46 2013-08-09 21:24:26

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: mprime-phc-setup - find best vids for undervolting, without crashing

Lockheed wrote:

I tried running this script on C2D P9400, but the entire system freezes when it gets to 0.9v on the highest clock. I thought the point of using mprime was not to avoid freezes?

Try to increase short_test_length.

Offline

#47 2013-08-10 08:11:51

Lockheed
Member
Registered: 2010-03-16
Posts: 1,512

Re: mprime-phc-setup - find best vids for undervolting, without crashing

stqn wrote:
Lockheed wrote:

I tried running this script on C2D P9400, but the entire system freezes when it gets to 0.9v on the highest clock. I thought the point of using mprime was not to avoid freezes?

Try to increase short_test_length.

It seems like my system is freezing on the first mprime error. But at least I got the minimum working value by observing the process.
But how can I now get to the next lower freq? This script always starts at the highest.

I though of using linux-phc-optimize because its procedure is designed for this kind of situation, but although it seems to run fine, it does not actually change the vids. It says it lowers them, but conky keeps showing me the default values (unlike with this mprime script).

Offline

#48 2013-08-11 11:27:24

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: mprime-phc-setup - find best vids for undervolting, without crashing

Lockheed wrote:

It seems like my system is freezing on the first mprime error.

This is unfortunate. Do you mean it crashes right after the script prints “Hardware failure detected.”?
Did you increase short_test_length, and to which value?

Offline

#49 2013-08-11 18:37:17

Lockheed
Member
Registered: 2010-03-16
Posts: 1,512

Re: mprime-phc-setup - find best vids for undervolting, without crashing

No, it doesn't print Hardware fault. The compute just freezes once it reaches 16th VID.

I increased short_test_length to 40 and 120, but it changed nothing.

Offline

#50 2013-08-14 02:54:47

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: mprime-phc-setup - find best vids for undervolting, without crashing

Lockheed wrote:

No, it doesn't print Hardware fault. The compute just freezes once it reaches 16th VID.

I increased short_test_length to 40 and 120, but it changed nothing.

Ok, I have added resume after crash in the lastest version of the script. I hope it helps!

Offline

Board footer

Powered by FluxBB