You are not logged in.

#51 2013-08-14 06:37:08

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

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

How many VIDs does it add to the crash value?


Laptop: ThinkPad T420s, i7/i5, 16GB RAM, 1080p IPS mod, Arch | HTPC/Server/fw: Zotac AQ01, A4-5000 Kabini, 8GB, Arch/lxd NethServer

Offline

#52 2013-08-14 11:14:04

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

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

Lockheed wrote:

How many VIDs does it add to the crash value?

It behaves as if mprime had detected an error, so it will start a long test (320 s by default) with crash_vid+1, and go up if that test finds an error (etc.), then add the safety (2 by default).

So it will add at least 3 to the crash vid.

Offline

#53 2013-08-14 11:31:28

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

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

Ok, thanks for your quick update.
However, for the moment I am happy with the values I found manually (1-2 vids above crash level).


Laptop: ThinkPad T420s, i7/i5, 16GB RAM, 1080p IPS mod, Arch | HTPC/Server/fw: Zotac AQ01, A4-5000 Kabini, 8GB, Arch/lxd NethServer

Offline

#54 2013-09-04 21:55:14

ooo
Member
Registered: 2013-04-10
Posts: 1,631

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

I just set up phc-k8 and tried this script with quite poor success, but it turned out in order to lower the voltage, I actually had to increase the vid number instead of setting it lower.

I'm testing my vids manually for now, since I coudn't fix the script easily enough, but maybe you could add feature to increase the vid instead of lowering in case there are other systems like mine.


in case you're wondering, 28 was the 'lowest' vid for me. setting it to 29 resets vcore to 1,4V and 30 just crashes my computer.

Offline

#55 2013-09-04 22:20:32

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

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

ooo wrote:

I just set up phc-k8 and tried this script with quite poor success, but it turned out in order to lower the voltage, I actually had to increase the vid number instead of setting it lower.

Uhhhhhhhh okay… What you say seems to be confirmed by this thread: http://www.linux-phc.org/forum/viewtopic.php?f=8&t=250

Making the script go the other way should be easy, except:
1) can we detect the type of processor automatically?
2) when do we stop increasing the VID? On Intel we stop at 0, but what about AMD? Will it always crash at some point?

Offline

#56 2013-09-04 22:53:31

ooo
Member
Registered: 2013-04-10
Posts: 1,631

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

well.. if all AMDs work this way, you could check the vendor from /proc/cpuinfo
I don't think you can detect witch way it works any other way than checking the voltage reading..

as i mentioned in my case 28 was last vid until it stopped working or crashed.

edit. maybe you could just add option to invert the direction in case user have noticed this being the case.

Last edited by ooo (2013-09-04 22:54:46)

Offline

#57 2013-09-04 23:53:24

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

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

I’ve pushed a new version that might handle AMD processors correctly.

But I’m not sure how it will behave with this:

ooo wrote:

in case you're wondering, 28 was the 'lowest' vid for me. setting it to 29 resets vcore to 1,4V and 30 just crashes my computer.

This “29 resets vcore to 1,4V” is weird.

Offline

#58 2013-09-05 15:03:21

ooo
Member
Registered: 2013-04-10
Posts: 1,631

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

stqn wrote:

I’ve pushed a new version that might handle AMD processors correctly.

ok, I'm gonna test the new version later.

since you forced this behavior for phc-k8. I just wanted to be clear that I don't know if all AMD cpus work this way. but maybe you did a bit more research than me smile

stqn wrote:

But I’m not sure how it will behave with this:

ooo wrote:

in case you're wondering, 28 was the 'lowest' vid for me. setting it to 29 resets vcore to 1,4V and 30 just crashes my computer.

This “29 resets vcore to 1,4V” is weird.

indeed.

28 seems to work fine for me @ 1GHz (after 1h of mprime), so I really wouldn't like it to go over that and crash my computer.

the best option I can think of would be ability to set maximum vid on the script, and set the default value low enough.


EDIT. Tried this again and apparently I can set the vid to 29 and 30 and it still lowers my vcore (31 crashes @1GHz). So I don't know if there's some kind of upper limit after all.

Sorry about that. I was testing this late last night so it must have been some kind of silly human error from my part big_smile

Last edited by ooo (2013-09-05 17:06:18)

Offline

#59 2013-09-05 21:54:28

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

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

I’ve just fixed a bug introduced in the previous version that would trigger when the minimum vid is reached (or maximum vid on amd, but this is very unlikely to happen since it is by default 124 which is nearly 0 V).

ooo wrote:

since you forced this behavior for phc-k8. I just wanted to be clear that I don't know if all AMD cpus work this way. but maybe you did a bit more research than me smile

Not really but I hope it’s the case smile.

ooo wrote:

the best option I can think of would be ability to set maximum vid on the script, and set the default value low enough.

I’m not sure what you mean. The script will start from the default VID and will try to go up to 124 on AMD processors, but it shouldn’t be able to reach that.

ooo wrote:

EDIT. Tried this again and apparently I can set the vid to 29 and 30 and it still lowers my vcore (31 crashes @1GHz). So I don't know if there's some kind of upper limit after all.

Sorry about that. I was testing this late last night so it must have been some kind of silly human error from my part big_smile

No problem, I’m glad that this isn’t some new weird behaviour after all smile.

Oh btw, tell me if the script works for you…

Last edited by stqn (2013-09-05 21:54:54)

Offline

#60 2013-09-05 23:33:02

ooo
Member
Registered: 2013-04-10
Posts: 1,631

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

stqn wrote:
ooo wrote:

the best option I can think of would be ability to set maximum vid on the script, and set the default value low enough.

I’m not sure what you mean. The script will start from the default VID and will try to go up to 124 on AMD processors, but it shouldn’t be able to reach that.

never mind that. I didn't know what the top VID limit would be, so I figured its 30 on my case, and could be higher on others.


I tested the script. seems to work although my computer freezed at short test when it reaches 19.

did I understand correctly, that mprime should stop if it catches any error and thus prevent your system from crashing?
I tested my vids manually using mprime, and never got any errors from it. I went down with 10min test on each vid until my computer would just freeze.

is it just that newer processors handle errors differently, as mine is probably more than 5 year old technology (Athlon X2 +3800)?

Last edited by ooo (2013-09-05 23:33:41)

Offline

#61 2013-09-06 01:45:27

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

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

ooo wrote:

did I understand correctly, that mprime should stop if it catches any error and thus prevent your system from crashing?

That’s the idea, but it doesn’t work for every processor it seems!

Note that if the computer freezes or crashes during the test, you can restart the script after a reboot and it will continue from where it stopped.

Offline

#62 2013-09-06 22:40:21

ooo
Member
Registered: 2013-04-10
Posts: 1,631

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

okay, cool, thanks for all the help.

and thanks for the script smile
I will use it on my laptop when I get better distro and phc on it.

Offline

#63 2015-01-31 23:23:09

zilti
Member
Registered: 2012-11-11
Posts: 13

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

This doesn't seem to work? All I get from running it is "The PHC module doesn't seem to be loaded", which I of course can't load since that one complains "Please edit /etc/default/phc-intel". Which I can't edit either, since I don't know the default VIDs of my CPU (Core i5 4200U)

Offline

#64 2019-05-20 07:29:11

bandithijo
Member
From: Indonesia
Registered: 2016-07-30
Posts: 6
Website

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

this link for the script has not found.
https://bitbucket.org/stqn/shell-tools/ … -phc-setup

is there another phc script around here?

thank you


Technical Blog:Journal | BanditHijo.GitHub.io

Offline

#65 2019-05-20 18:01:52

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

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

I don’t know what happened with bitbucket. I put the script on pastebin: https://pastebin.com/NVwA8JEK

Offline

#66 2021-01-09 15:22:55

leopseft
Member
Registered: 2018-09-05
Posts: 25

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

Dear stqn i was making some tests with your script on a Core 2 Duo processor. (Intel T9400 @ 2.53GHz)

1. I noticed that indeed the first of the four in total freq steps has a difference of 1000 Hz from the second one. BUT! If i comment the part of your script where you "ignore" the first vid (and you keep the default vid value) and let the script to test that freq, it crashes before the vid value is even close to 0. I'm not sure if this proves that this frequent can be used, but it cant take zero for sure, at least to my cpu.
2. I can only run the script with the tolerance set to 100. I was noticing the behavior of the cpu while testing and I noticed that when the script changes the vid value to a lower one, then cpu doesn't go immediately to 100% usage, so that might be the issue of different frequency that the expected one. Maybe you should check the frequency after some seconds (5-6) when the stress test starts.

Update: While testing the CPU reaches the top allowed temperature (laptop cooling system) 100 celsius degrees so the CPU freq jumps at the lowest step for some seconds to avoid the damage.
Conclusion: In order not to change the source code a lot, you guys can just set the tolerance to 100 and just comment the part for the check for the bogus freq. In my case I was able to lower that vid value too. I only got 0 to the third cpu step and then the script finished putting the same to the last one step too, (without testing) since if the previous step can go so low, the last one can go so low as well!! The 0 tells the cpu to undervolt to the lower allowed value. I added a 1 delta value since the long test was 3.600 seconds!!

For anyone interested in the specific cpu after further testing with 3.600 seconds for the long test the results are:
Default vids: 41 35 23 19
Final vids:   31 30 1 1

Last edited by leopseft (2021-01-09 20:49:36)

Offline

#67 2021-01-09 17:19:38

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

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

Hi, I haven’t used this script or undervolted anything for many years now (I’m not using Arch anymore either).
Feel free to consider the source code as public domain and update it any way you want wink.

Offline

Board footer

Powered by FluxBB