undervolting (e.g. skylake) in linux

Discussion in 'Hardware Components and Aftermarket Upgrades' started by conker_ts, Aug 13, 2017.

Thread Status:
Not open for further replies.
  1. Mr.Koala

    Mr.Koala Notebook Virtuoso

    Reputations:
    568
    Messages:
    2,307
    Likes Received:
    566
    Trophy Points:
    131
    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
    But my readings have an extra prefix for non-zero voltage panels:
    Code:
    # for p in `seq 0 2`; do
    #     wrmsr 0x150 0x80000"$p"1000000000
    #     rdmsr 0x150
    # done
    f3400000
    100f3400000
    200f3400000
     
    Vasudev likes this.
  2. jeanne.morreau

    jeanne.morreau Newbie

    Reputations:
    0
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    5
    I've got those prefixes too for voltages other than CPU core, doesn't matter at all
     
  3. Vincent_Tran

    Vincent_Tran Newbie

    Reputations:
    0
    Messages:
    7
    Likes Received:
    3
    Trophy Points:
    6

    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
    And then read

    Code:
    for p in `seq 0 5`; do sudo wrmsr 0x150 0x80000"$p"1000000000; sudo rdmsr 0x150;  done
    f4600000
    f5c00000
    f4600000
    0
    0
    500000000
    I don't have those prefixes as yours. But my last value looks kinda weird. Can someone also check it to see if it's huge like that?

    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
  4. Mr.Koala

    Mr.Koala Notebook Virtuoso

    Reputations:
    568
    Messages:
    2,307
    Likes Received:
    566
    Trophy Points:
    131
    Start up scripts set in the GUI don't have root. Using rc.local will do. Well, you could add a NOPASSWD entry to sudoers if you really want to, but that's another thing to manage.

    The undervolt setting won't stick after S3/S4, so you'll also need this.
     
    Vincent_Tran likes this.
  5. tiziw

    tiziw Newbie

    Reputations:
    5
    Messages:
    1
    Likes Received:
    5
    Trophy Points:
    6
    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
    conker_ts, moson, leeloyd and 2 others like this.
  6. moson

    moson Newbie

    Reputations:
    5
    Messages:
    3
    Likes Received:
    3
    Trophy Points:
    6
    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)
    
    In my case I was still limited to 15W, since there is another place to limit the power consumption in the MCHBAR registers. But with devmem2 i succeeded to change that...

    regards,
    moson
     
    Vasudev likes this.
  7. Vasudev

    Vasudev Notebook Nobel Laureate

    Reputations:
    12,035
    Messages:
    11,278
    Likes Received:
    8,814
    Trophy Points:
    931
    Is it persistent even after reboot?
    I want to increase TDP limits of 6700HQ too.
     
  8. moson

    moson Newbie

    Reputations:
    5
    Messages:
    3
    Likes Received:
    3
    Trophy Points:
    6
    Last edited: Mar 19, 2018
  9. Vasudev

    Vasudev Notebook Nobel Laureate

    Reputations:
    12,035
    Messages:
    11,278
    Likes Received:
    8,814
    Trophy Points:
    931
    Stock vs Stock the difference is minimal, once you OC the difference will be massive!
    You just beat my cpu like it was cheap low end chip. :tears:
     
  10. chigro

    chigro Newbie

    Reputations:
    0
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    5
Loading...
Thread Status:
Not open for further replies.

Share This Page