Okay, so after testing it on my laptop with i5-4300M, it seems like the values are the same, but of course additionally it has one extra slider enabled.
FIVRVoltage40 = analog i/o //checked it because it was missing above
FIVRVoltage50 = digital i/o
Additional one number, because it's what I'm using there (yea sad it can't go lower, I think it even eats more power than 6440HQ)
-70.3 = F70
-1, -2, +3, -4 gave same results as @conker_ts 's, and rest FIVRVoltageXY numbers match.
-
I did a few experiments and I am pretty sure my initial observation were a bit off. I now believe the offset is actually an 11bit number. This makes steps about 1mV (1/1024 V - as posted by unclewebb).
I noticed that all of the numbers observed in TS were even. So I then proceeded to try and set an odd offset with wrmsr - the computer instantly locked up. I tried it again a few times and each time I gave it an odd number it locked up. So I think the offset is actually only 11 bits and the 12th bit is something else (and setting it to 1 makes something go horribly wrong). Since most of us were just copying offsets from TS we never had that bit set, but someone following the formula might have.
The "formula" changes to:
hex((round(mv*1.024)<<21)+16**8) -
-
-
It doesn't work with positive offsets (you get an extra 1 (eg 0x1xxxxxxxx)). Here is a fixed version that also handles positive offsets:
format(round(mv*1.024)<<21, '08x') if (round(mv*1.024)<<21)>0 else format((round(mv*1.024)<<21)+16**8, '08x')
Python really isn't fit for this binary manipulation kind of stuff, but it's not practical to put C code in the guide as it can't be run as easily. -
@up
Oh okay, I never used Python so I dunno, but it seemed weird. Now it makes sense, and seems to work correctly. And it's nice to see people still improving undervolting.
I hope you don't mind that I stole your code to write it in JS (I don't know Python, but I do know JS a bit). Use @tincmulc code, this one might be error prone.
Code:var mV = 3; var result = (((Math.round(mV*1.024)<<21)& 0xFFF00000)>>>0).toString(16); '0'.repeat(8 - result.length) + result;
-
Thank you for testing. Looking at it like this, it makes even more sense, why we see saw only even numbers ...
(no offense @_tk ^^)
One advantage is, that you have lot's of possibilites to run the Python code. In Linux it's usually preinstalled, and even if you don't have it on your device, you can paste it in online terminals and evaluate the code instantly.
Hm, I feared that something like different cases and format are needed. This 2 complement is really annoying (and the prefix 1 in the positive offsets).
You can at least change the middle part to mv>0 in your version
or try my version:
(I'm not 100% sure with this manual 2's complement 'magic' with &0xFFF, but it works with all the numbers I tested)
Combine it in one, and select the needed bits with &
format(0xFFE00000&( (round(mv*1.024)&0xFFF) <<21), '08x')Last edited: Aug 28, 2017 -
-
I just got curious, why it crashed when setting bit 20.
I didn't plan to even test the absolute voltages, as I currently don't see where the benefits are (except during OC)
The this part is the most interesting:
Code:Command 0x10 Read Voltages and ratios, 0x11 Set Voltages and ratios Bit(s) 7:0 Ratio limit 19:8 Static Voltage ( V / 1024) 20 0 = Dynamic Voltage, 1 = Fixed Voltage 31:21 Offset Voltage, -1024 to 1023 (-1V to +0.999V)
By setting bit 20, it switched to static voltage, and as this was in the previous range (and probably 0), the CPU had voltage 0 and the system froze, makes sense. At least you can be sure, you didn't fry anything. Kudos to Intel Devs, they probably expected this
But in general this was also a really valuable lesson: So when you see only even numbers, your binary starting point may be wrongLast edited: Aug 28, 2017_pk, alfazaz, Vasudev and 1 other person like this. -
I underclock now my i7 7700HQ under linux... Great ! Thanks !
Vasudev likes this. -
On the other hand it feels good that we eventually came to the correct answer (well at least as far offset undervolting is concerned) without help.Vasudev likes this. -
-
Skylake and Kabylake aren't that easy to OC/UV.
I followed the hints from there :
https://forums.anandtech.com/threads/what-controls-turbo-core-in-xeons.2496647/page-40#post-38971756
If i boot straight in Linux, MSR0x150 seems to have some contexts locked.
Code:$ sudo wrmsr 0x150 0x8000000100000000 $ sudo rdmsr 0x150 0000000000000753 $ sudo wrmsr 0x150 0x8000001000000000 $ sudo rdmsr 0x150 0
Code:$ sudo wrmsr 0x150 0x8000000100000000 $ sudo rdmsr 0x150 0000000000000753 $ sudo wrmsr 0x150 0x8000001000000000 $ sudo rdmsr 0x150 0000000000000024
Edit : Never mind, setting an undervolt works. Even when I boot straight too Linux.
Ok next step : OC.Last edited: Sep 3, 2017Vasudev likes this. -
I'd still guess, this write-read cycle is not that stable, b/c there is too much time/ many cpu cycles in between ...
Does Powertop have similar CPU Package Power field as in TS/Aida ?
This should be probably documented in the Intel Docs, which MSR to read for the current Power drain in Watts. Then we may have a better indication, if the UV did work ... -
-
-
Last edited: Sep 8, 2017Vasudev likes this.
-
I've got an i7-8550 based laptop (HP Envy 13), doesn't seem like anyone has tried this out on the Kaby Lake Refresh chips yet? Still have my windows install (shrunk considerably) here, and running Arch Linux. Will be following the guide, but is there anything I can check to see if the MSR codes have changed between Kaby Lake and Kaby Lake R?
Vasudev likes this. -
Did you try ThrottleStop first?
-
Yes, am playing with that now. Certainly quite a bit of headroom for undervolting, -50mV without artifacts so far.
EDIT: Okay seem to have reached the safe limit at -110mV, -120mV gave me the BSOD. Running Prime95 now, will leave it for the rest of the workday.
The ThrottleStop.ini contents are as mentioned on https://github.com/mihic/linux-intel-undervolt
FIVRVoltage00, FIVRVoltage10, and FIVRVoltage20 contain the changes I made (CPU Core, Intel GPU, CPU Cache). So no change from skylake/kaby lake I think.
Also just did a quick check of the manual offset calculation, and it was spot on.
Will report back when I've done Prime95 stress testing and get round to applying settings in Linux.
EDIT2: Well got an error after a few hours on -110, now on -105. Applied it to Linux, i7z does show a clear drop in VCore. mprime seems to run slower compared to on Windows though (getting 1.6GHz rather than the 2.4GHz I was getting under Windows). Would chalk that up to different boost settings. At least there's a clear VCore change and my theoretical power usage should be lower.Last edited: Oct 26, 2017Vasudev likes this. -
Vasudev likes this.
-
First I gotta say thank you all for your efforts and your researchs, I've been literally waiting for YEARS for someone to write such a guide, as Intel seemed to have decided Linux wasn't worth writing the XTU thing. Anyway, I've come to share my results.
SO my laptop is a HP Chromebook 14 with Celeron 2955U CPU, 4 years old now, and I had Linux replacing Chrome OS. Windows couldn't really be put on it, so no Throttlestop for me, I had to blindly find the suitable values. Nor could I use i7z to check the voltages since the software wouldn't recognize my hardware :
wrmsr 0x150 0x80000011ef600000
Set an -130mV offset to the CPU it seems if I did the right thing. It's stable for now and the benchmark performance stays the same. -140mV would instantly freeze and force to reboot.
wrmsr 0x150 0x80000111f0a00000
Then I set an -120mV offset to the iGPU it seems. I tried -140mV but the screen also froze, and -130mV I had little artefacts.
Finally I set -130mV to the other voltage planes, although I had absolutely no idea whether it would do anything since I can't run Windows to check the compatibily of my CPU. Anyway everything runs perfectly fine and I put the commands in /etc/rc.local to have the undervolt on startup. Also I'd say I have a -2 or -3°C temperature difference now, not that my laptop was hot to begin with.
EDIT : also you have to load the msr module. sudo modprobe msr or just add msr in /etc/modules on Ubuntu anywayLast edited: Nov 11, 2017 -
Thank you Thank you Thank you to conker_ts, unclewebb, _pk, tincmulc and everyone else for this thread! This is a stripe of light on the horizon for me.
I have a Dell Precision 5520 with an i7-7820HQ and Nvidia Quadro M1200 which runs hot as hell. So with the help of this thread I can get a stable undervolt of -120mV across the five voltage planes (not fine-tuned yet). Even though it seems I didn't get too lucky with the silicon lottery, being able to undervolt is great!! I had given up on doing it under Linux on this machine and was actually thinking about reselling it.
Under heavy load, throttling is reduced (but not eliminated, depending on load). Minimal fps on DiRT Rally Benchmark (3 loops, 1080p, high settings) is up from 23 fps (no undervolt) to 44 fps (-120mV) (average up from 61 to 63 fps). Temperatures still hit 90°C on the CPU and GPU (up to 96°C on the CPU without undervolt).
What I do not get, is that idle temperatures do not change at all. According to i7z, my nominal undervolt of -120 mV brings voltage down from about 0.662V to 0.557V (a drop of 105mV) when the computer is idle (CPU at 800MHz). That's a drop by about 16%. Power consumption should go down by a factor of (0.557/0.662)²=0.71, which is almost 30% down. How can this not affect idle temperature? At first I was thinking this was maybe due to a steep fan curve, but the fans actually never go below 2500rpm, and stay there at idle, whether the CPU is undervolted or not, so cooling should be strictly identical. Long term idle CPU temperature is 35°C, independent of voltage (40°C with even the most minimal activity such as editing this post). What am I missing?
The next step would be to undervolt the Nvidia Quadro M1200. Does anyone have a pointer on how to achieve that under Linux (no Windows here)? I've tried to search for GPU undervolting, and I get very few hits for Linux, most of which talk about hacking the BIOS of AMD graphics cards and none that give any detail about the procedure.
I already repasted CPU and GPU, with little improvement.
Thanks again to everyone for this thread! I may actually keep this laptop after all.Vasudev likes this. -
I thought Dell Precision didn't have overheating issue considering you are paying twice the cash than a gaming laptop! -
I absolutely agree, Vasudev, the Precision should definitely offer better cooling for the price premium. But sadly the chassis and cooling solution really seem to be identical to the XPS. Maybe I should still consider contacting Dell support on this.
And yes, my absolute idle temperatures might be considered acceptable (even though they increase too fast for my taste on _very_ low loads). What is surprising to me, is that there is no difference at all between undervolt and no undervolt. I repeated the idle test, trying to reduce consumption of the other components, thinking that maybe they were heating the CPU: I disabled the Nvidia graphics, unplugged the TB3->Ethernet adapter, disabled wireless network. Temps dropped to 30°C over night, and the fans actually switched off, but still no difference whatsoever between undervolted CPU and stock voltages. I guess the CPU is just doing an incredibly good job to consume close to no power at all at idle, undervolt or not, and idle temperatures are dominated by the other system components heating the chassis.
So now that that's sort of elucidated, I guess the only hope is to undervolt the Nvidia graphics. Is there any hope for that? -
I had these issues on my PC too, I used TLP to reduce heat on my lappie and whilst web browsing it consumes just 10W on wifi giving 7-8+ hrs on battery. I disabled Turbo boost and increased max cpu usage %age from 30-70.
IN addition to that use powertop to tweak/calibrate sensors and power usage metrics for even more reduction in heat.
Sadly nvidia gpu consume too much energy than Windows drivers and mine usually idles at 60C whilst CPU stays at 30-50C on light usage and fans doesn't turn on unless the cpu temps cross 85C.
I think you can work ur GPU in headless mode and use Intel iGPU for most tasks and offload computation to nvidia card simultaneously. I'm unsure how your card works, I think it has Optimus.JanW7 likes this. -
I've installed Ubuntu 16.04 + KDE, because that's what I have on most of my other machines now. My main computer for development of CUDA stuff is Windows, though, so I'll have to see how much pain it is to port that part. And yes, my card has Optimus.
I have installed powertop and TLP, but not tweaked much yet - that's still on my TODO list. As well as looking more closely at power consumption with my trusty power meter. I will have to look into the fan curve as well. Thanks for all the pointers!Vasudev likes this. -
I doubt Optimus will allow Windows like flexibility, you need to use only nvidia prime because Bumblebee and similar can't offload everything like Win 10. KDE is heavier I always use Xfce or Lxde. Personally using Xubuntu 16.04.3 with custom kernel upgrade to 4.13 official version for better battery and performance. Maybe I use teamviewer to tweak your system. Use either CUDA7.5 or CUDA 8.x -
A note for people who want a efficient Linux system under low load:
The modern Linux kernel runs the Intel PState CPU governor on Intel platforms by default. The Intel engineers do understand their own hardware, but even the "powersave" profile is too aggressive. Try playing with CPUfreq, especially the new schedutil governor if you use the system mostly for low-load tasks like text work and normal browsing. You can get a noticeable drop in average power draw and temperature, but hardly any impact on UI responsiveness. Also consider making a few scripts to quickly switch among governors and settings if you plan to do demanding work from time to time. (No switching between PState and CPUfreq on the fly though.)
I have a Clevo W230SD whose cooling is completely passive under low/intermediate load, so there's no interference from fan control. I run a 100mV undervolt on core/cache/GPU and even in a room where the air temperature is well regulated by a powerful AC I can't see systematic difference in idle CPU temperature at all.Last edited: Nov 22, 2017Vasudev likes this. -
I'm a fan of undervolting although what I basically know is to tune the voltage offsets in TS and stress test my laptop xD
My CPU model is i5-7200U.
So... here are my voltage offsets and their values in Throttlestop.ini
- CPU Core: -90.8 mV and 0xF4600000
- Intel GPU: -80.1 mV and 0xF5C00000
- CPU Cache: -90.8 mV and 0xF4600000
- System Agent: None
- Analog I/O: None
hmscott likes this. -
To those who have undervolted successfully, when you read the setting with rdmsr, what kind of output do you see for voltage panels above 0 (CPU core)?
This is shown in the GitHub repo:
Code:# wrmsr 0x150 0x8000001000000000 # rdmsr 0x150 ecc00000 # wrmsr 0x150 0x8000011000000000 # rdmsr 0x150 f0000000 # wrmsr 0x150 0x8000021000000000 # rdmsr 0x150 ecc00000
Code:# for p in `seq 0 2`; do # wrmsr 0x150 0x80000"$p"1000000000 # rdmsr 0x150 # done f3400000 100f3400000 200f3400000
Vasudev likes this. -
I've got those prefixes too for voltages other than CPU core, doesn't matter at all
-
So I tried the method..
Code:sudo wrmsr 0x150 0x80000011f4600000 sudo wrmsr 0x150 0x80000111f5c00000 sudo wrmsr 0x150 0x80000211f4600000 sudo wrmsr 0x150 0x8000031100000000 sudo wrmsr 0x150 0x8000041100000000 sudo wrmsr 0x150 0x8000051100000000
Code:for p in `seq 0 5`; do sudo wrmsr 0x150 0x80000"$p"1000000000; sudo rdmsr 0x150; done f4600000 f5c00000 f4600000 0 0 500000000
Also, should I put the undervolt script into rc.local ? Or just add that script at startup? (I'm new to Ubuntu)Last edited: Dec 28, 2017 -
The undervolt setting won't stick after S3/S4, so you'll also need this.Vincent_Tran likes this. -
I've taken the time to make an utility to automate the undervolting process, here's the github link https://github.com/tiziw/iuvolt. It's all in bash, I've also looked how to make it work on boot and sleep with systemd. Improvements are welcome, I'm not very good at bash, but it gets the job done.
Last edited: Dec 31, 2017 -
Great thread. Thanks tiziw for the iuvolt prog.
Just bought a Lenovo T480s and undervolted the i7-8650U by -100mv.
Also I increased TDP to 44 W instead of 15 W.
Actually in windows it is @44W by default, but in linux you'll have to play around with devmem2 change values @ memory address 0xFED159A0 / 0xFED159A4
Now it can even beat a 7700HQ
If someone wants to play around with this, the powerlimit msr register is 0x610.
Code:cpu0: MSR_PKG_POWER_LIMIT: 0x42816000dd8160 (UNlocked) cpu0: PKG Limit #1: ENabled (44.000000 Watts, 28.000000 sec, clamp ENabled) cpu0: PKG Limit #2: ENabled (44.000000 Watts, 0.002441* sec, clamp DISabled)
regards,
mosonVasudev likes this. -
I want to increase TDP limits of 6700HQ too. -
Actually I've put the command into the same startscript which is running iuvolt.
Holy ****. I'm even close to the 7700K desktop cpu. 7820HK has no chance:
https://browser.geekbench.com/v4/cpu/7547974
https://browser.geekbench.com/processors/1779
https://browser.geekbench.com/processors/1836Last edited: Mar 19, 2018 -
You just beat my cpu like it was cheap low end chip. -
-
Well, there is no such command that just works on every notebook.
Also be aware that you can easily kill you machine with manipulations like this.
First, you'll have to check how TDP is limited on your rig.
There can be a limit via MSR (check 0x610) or MCHBAR register or EC or whatnot.
Check our the following pages to get more details on that:
http://forum.notebookreview.com/threads/the-throttlestop-guide.531329/page-737
http://forum.notebookreview.com/threads/the-throttlestop-guide.531329/page-566
http://forum.notebookreview.com/threads/the-throttlestop-guide.531329/page-744
http://forum.notebookreview.com/threads/the-throttlestop-guide.531329/page-745
Could also be that those settings are locked and you can't write to the appropriate registers.
Install and run turbostat and have a look what is displayed in the lines for the power limit:
(this is the register throttlestop is reading/manipulating in the TLP section of the tool)
Code:cpu0: MSR_PKG_POWER_LIMIT: 0x42816000dd8160 (UNlocked) cpu0: PKG Limit #1: ENabled (44.000000 Watts, 28.000000 sec, clamp ENabled) cpu0: PKG Limit #2: ENabled (44.000000 Watts, 0.002441* sec, clamp DISabled)
So I further had a look for the FED159A0 and FED159A4 memory addresses and voila, there was another limit.
You can read / write those with a tool "devmem2"
Found it in this github repo: https://github.com/pavel-a/devmemX
Check the wiki for usage.
In my case in FED159A0 had a value 00DD8 078
last 3 digits hex (078) in dec = 120
this 120 * 0.125 = 15 = 15 W
So i changed it to 00DD8 160
hex 160 = dec 352
352 * 0.125 = 44 W
regarding the startscript, I just changed the iuvolt startscript (check tizwiz's post on this page) and added one line before installing it.
So just after running the undervolting script, it runs the devmem command to increase to TDP limit...
"ExecStartPost=/usr/bin/devmem2 0xFED159A0 w 0x00DD8160"
But again. copy/pasting my stuff won't work for you. In the worst case you'll damage your hardware.
So do this at your own risk.
regards,
moson -
Amazing! Thank you, moson!
-
Has anyone successfully undervolted in Fedora? I'm on Fedora 27 with all the current updates, but "wrmsr" doesn't work for me. "rdmsr" works, but with "wrmsr" I'm always getting permission errors, no matter if I do it with sudo or switching to root with su ("wrmsr: pwrite: Operation not permitted"). I tried it with the iuvolt script from tiziw (thank you for that) and with the command itself, no luck. The msr files all have read and write permissions for the owner (root).
Apparently Fedora has the msr module built into the kernel, so there is no separate module for it, maybe it has something to with that? Does anybody know how to deal with this? -
I5-8250U (HP ProBook 450 G5)
Set an -90mV offset to the CPU and seems stable, with -100mV my system immediately freeze. -
Ah thank you so much, that was it! I didn't think of that. Is there a way to make wrmsr work with secure boot enabled though, some module that needs to be signed or something?
EDIT: In case anybody is interested in this as well, I have found a guide to allow msr writes from user space with secure boot enabled by modifying and re-building the msr module (or, in case of distros like Fedora with the module built in, re-compiling the whole kernel) here: https://github.com/intel/intel-cmt-cat/wiki/UEFI-Secure-Boot-Compatibility
I haven't tried it though.Last edited: Apr 22, 2018 -
Has anybody tested if the tool works with a Ivy Bridge CPU?
I have a Thinkpad T430 with an i5-3320M under Arch Linux and I get the following error when using the intel-undervolt tool:
Code:$ sudo intel-undervolt read Failed to write MSR Failed to read value for CPU (0) Failed to write MSR Failed to read value for GPU (1) Failed to write MSR Failed to read value for CPU Cache (2) Failed to write MSR Failed to read value for System Agent (3) Failed to write MSR Failed to read value for Analog I/O (4)
Code:$ lsmod | grep msr msr 16384 0
Vasudev likes this. -
What is your chipset?
If I recall correctly, not all Ivy/chipset combos allow for undervolting.Vasudev likes this. -
Chipset is Intel QM77 Express. -
QuantumCakeIsALie Notebook Enthusiast
EDIT: See update at the end!
For me the original value is 0x42016000dd8040. I set it to 0x42016000dd8160 using wrmsg and in memory via "devmem2 0xFED159A0 w 0xDD8160". Turbostats reports everything allright and performance is increased for a while (similar to Windows where it seems like it's already at 44W?). But after a while performance degrades and the 0x610 msr is back to 0x42016000dd8040, I've even seen 0x42016000dc8040 and 0x43816000dd8024 somehow... Maybe it's thermal throttling?
Undervolting works allright (-90, -60, -90) and only reset when waking from sleep, so I got a script to re-enable it when waking up.
Any pointers to help me out a little?
EDIT:
I think it was resetting because of thermal throttling, Full Turbo made the CPU reach 98°C in an instant. So I did limit the turbo frequency as well. To limit to 3.0 GHz, I run "wrmsr 0x1ADH 0x1e1e1e1e". I get 80°C to 85°C on sustained 4-cores 100% load at 3.0 GHz without a cooling pad, which I think is pretty good, I might lower the max Turbo frequency further to 2.7 GHz if I plan on letting it run for several hours. Sometimes, less is more!
So, for a "Long Term Performance" setup with my i7-8550U, this is what I had to do (run as root):
Code:# -90, -60, -90 mV undervolt; CPU Core, iGPU, CPU Cache wrmsr 0x150 0x80000011f4800000 wrmsr 0x150 0x80000111f8600000 wrmsr 0x150 0x80000211f4800000 # 3.0 GHz Turbo for 4/3/2/1 cores wrmsr 0x1ADH 0x1e1e1e1e # Unlock full 44 watts TDP wrmsr 0x610 0x42016000dd8160 devmem2 0xFED159A0 w 0xDD8160
Note: I did put some thermal pads between the CPU heat-sink and the chassis of the laptop to better dissipate heat. I also use a cooling pad for long term computation/gaming that lowers the idle temperature by ~5°C (I didn't test under load). What I posted here is only a guide of what worked specifically for me, use at your own risk.Last edited: Oct 15, 2018conker_ts likes this. -
It has been a while since I was here the last time. It's really awesome how the thread developed.
A big thank you for all people who contributed !Vasudev likes this.
undervolting (e.g. skylake) in linux
Discussion in 'Hardware Components and Aftermarket Upgrades' started by conker_ts, Aug 13, 2017.