The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Overclock/ Undervolt on Linux

    Discussion in 'Linux Compatibility and Software' started by jclausius, Feb 19, 2018.

  1. jclausius

    jclausius Notebook Virtuoso

    Reputations:
    6,160
    Messages:
    3,265
    Likes Received:
    2,573
    Trophy Points:
    231
    Just a quick question before I start my research...

    Can I just make changes in UEFI for OC or voltage settings, and have Linux just work? Or is there more to it than that?

    Right now, I'm thinking there's more involved, as I set a small negative voltage offset on the Mighty Mini, (which is known to be stable in my Windows boot), but when booting to Linux or the Linux installer it crashes with a Machine Check Exception.

    If anyone has any hints, advice or references on customizing OC or voltage settings in UEFI and working with Linux, it would be much appreciated.
     
    Last edited: Feb 20, 2018
  2. Vasudev

    Vasudev Notebook Nobel Laureate

    Reputations:
    12,045
    Messages:
    11,278
    Likes Received:
    8,815
    Trophy Points:
    931
    Did you use this tool https://github.com/xdever/linux-intel-undervolt-tool ?
     
    jclausius and slimmolG like this.
  3. jclausius

    jclausius Notebook Virtuoso

    Reputations:
    6,160
    Messages:
    3,265
    Likes Received:
    2,573
    Trophy Points:
    231
    No. I had not. I was hoping that I could just set things in the UEFI, and Linux would just run... as Windows doesn't seem to mind some of these changes in UEFI, I was hoping Linux would be the same.
     
    Dennismungai and Vasudev like this.
  4. giostark

    giostark Notebook Enthusiast

    Reputations:
    5
    Messages:
    22
    Likes Received:
    22
    Trophy Points:
    6
    Is not a direct answer to your question, and for that im useless.
    Have you already a modded bios? If not i suggest to you to operate directly there , to avoid writing code mistake.
    http://forum.notebookreview.com/threads/x7200-bios-mod.805816/
    Me for avoid similar issue im using the prema bios and i have undervolted my 7700k4.7 of 100mv and it seem really stable under windoz but also under Arch linux.
    I have to say that prema gives to me the right parameters.
     
    rommer, Dennismungai and jclausius like this.
  5. jclausius

    jclausius Notebook Virtuoso

    Reputations:
    6,160
    Messages:
    3,265
    Likes Received:
    2,573
    Trophy Points:
    231
    Thanks for the follow-up. I wasn't clear enough in my OP (I've re-edited). Prema's work is not going to help here, but that's because it isn't needed. I'm working with the Mighty Mini (in my sig). Full ASRock UEFI, with more voltage and O/C options coming out of my ears.
     
    Dennismungai and Vasudev like this.
  6. Dennismungai

    Dennismungai Notebook Deity

    Reputations:
    785
    Messages:
    933
    Likes Received:
    867
    Trophy Points:
    106
    Hey there, and welcome to the forum.

    If your BIOS allows you to tune functions such as overclocking and undervolting, you're in luck!

    These settings persist, no matter the Operating System you're on.

    What I'd recommend enabling in the BIOS, apart from your changes (undervols, XMP profile management, etc) is SpeedShift /SST and Race to halt (RTH) as it will allows the intel_pstate driver to do its' job and to accurately report power usage via the RAPL interface.

    I would not recommend attempting an overvolt or undervolt from the user space. That's why most platforms, including AMD's AGESA, allow for such options to be modified in the BIOS.

    I'd not recommend such a tool if the BIOS allows for such modifications.
     
    Vasudev likes this.
  7. jclausius

    jclausius Notebook Virtuoso

    Reputations:
    6,160
    Messages:
    3,265
    Likes Received:
    2,573
    Trophy Points:
    231
    Thanks for the reply. However, I'm not certain I'm in luck.

    For example, within UEFI, if I change the FIVR settings for an -85mV undervlot, my Linux partition won't boot - crashes each time with an 'mce'. However, I can boot into Windows with the same undervolt.

    It looks like at one time there was a special kernel being developed which might have worked with UEFI - http://linux-phc.org/ However, it appears that effort has been dormant (or dead) for some time. From the research I'm seeing right now, it looks like Linux won't work with UEFI, but instead they want you to use the msr-tools (which is the Linux command line equivalent of ThrottleStop) using rdmsr and wrmsr to set some values. Again, the search results suggest that at least with 'voltage' changes, this is the way to do things. I have no idea what happens with clock settings... But one step at a time.

    @unclewebb had something to say about this here - https://askubuntu.com/questions/337147/throttlestop-for-ubuntu

    If anyone knows of other resources, links, tools, etc., please update this thread.
     
    Last edited: Feb 20, 2018
    Vasudev likes this.
  8. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    Unless you want to change your voltage/clock settings from linux, there is no need for special tools. Right now I am typing to you on a UEFI based linux machine that is overclocked and overvolted from within the BIOS setup. If you want to poke your system while it is running, the linux intel undervolt tool linked by @Vasudev is a python wrapper around msr-tools that is worth a shot. If you read the readme it links to this explanation https://github.com/mihic/linux-intel-undervolt

    Also, if you are getting a MCE while booting linux it means your undervolt is not stable. Just because you can boot windoze does not mean anything besides it hasn't hit the right bit of code yet to make your CPU crash.
     
  9. jclausius

    jclausius Notebook Virtuoso

    Reputations:
    6,160
    Messages:
    3,265
    Likes Received:
    2,573
    Trophy Points:
    231
    Ahh... Very good points. Yes. I would much rather control things from a UEFI/BIOS point of view. I'll try reducing the undervolt until I can boot.

    Thx for the post!
     
    Dennismungai and Vasudev like this.
  10. Dennismungai

    Dennismungai Notebook Deity

    Reputations:
    785
    Messages:
    933
    Likes Received:
    867
    Trophy Points:
    106
    And BTW, on the Clevo X200: Are you able to upgrade components such as the GPUs to say, modern GTX 1060/70/80s?
     
  11. jclausius

    jclausius Notebook Virtuoso

    Reputations:
    6,160
    Messages:
    3,265
    Likes Received:
    2,573
    Trophy Points:
    231
    OK. There's a lot more research I need to do on voltage, OC, etc. in regards to the Mighty Mini - to re-iterate, I've never done anything like this before, so am unsure of settings.

    Currently, the UEFI has the following (my settings are underlined):

    Core Voltage Mode: Auto, Adaptive, Override
    Core Voltage Override: Auto, or a numeric value within a range
    Core Voltage Offset: 0.010, Auto, or a number between 0.001 and 1.000
    Offset Prefix: -, +

    For "Core Voltage Offset", I've tried numbers between -0.020 and -0.085. Windows boots and passes stress testing just fine within this range. For Linux booting, under-volting between -0.020 and -0.085 will crash Linux. For -0.019 <= settings <= -0.001, I can boot, and log in, but it will freeze the computer within 10 to 120 seconds.

    I don't believe so. No.

    IIRC, the GTX 10x0 MXM cards changed the PCB layouts and I don't think there is room within the case to fit these newer cards.
     
  12. Mr. Fox

    Mr. Fox BGA Filth-Hating Elitist

    Reputations:
    37,225
    Messages:
    39,334
    Likes Received:
    70,643
    Trophy Points:
    931
    Not 1080, but 1060 and 1070 there is a fair chance it will work. The biggest issue is the 10x0 series has no LVDS support, so when it does work it is typically only on laptops that use eDP.
     
    jclausius likes this.
  13. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    Interesting. Are you setting any special kernel parameters? If you are unsure check the output of
    Code:
    cat /proc/cmdline
     
    toughasnails, Vasudev and jclausius like this.
  14. jclausius

    jclausius Notebook Virtuoso

    Reputations:
    6,160
    Messages:
    3,265
    Likes Received:
    2,573
    Trophy Points:
    231
    Here's the output :

    BOOT_IMAGE=/boot/vmlinuz-4.13.0-36-generic root=UUID={snipped_guid_of_samsung_960_partition} ro quiet splash vt.handoff=7

    ----

    Do you suppose the problem has to do with Voltage Mode being "Auto" instead of Adaptive or Override?
     
    Last edited: Feb 21, 2018
  15. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    Nothing unusual or potentially related in your boot parameters.

    When it crashes in linux, is it always with a machine check exception, or are there different kernel oopses?

    If it's always an MCE you could try the mcelog utility to see what (if anything) useful comes out of decoding it.

    On the other hand, there are potential differences in your BIOS' ACPI handling based on the OS it detects. You could try spoofing it with the acpi_osi kernel parameter as "Windows 2015" for Windows 10 or "Windows 2016" or "Windows 2017"

    --
    edit: documentation: https://github.com/torvalds/linux/blob/master/Documentation/admin-guide/kernel-parameters.txt#L153

    Also, just in case you didn't already know, you don't need to permanently put this kernel parameter in your grub config. you can just hit the 'e' key at the grub boot menu and add it to the end of the normal boot parameters and then hit ctrl+x to boot

    You could also try the acpi_os_name parameter, although I don't ever remember using this one myself:
    https://github.com/torvalds/linux/blob/master/Documentation/admin-guide/kernel-parameters.txt#L144

    --

    I don't think the voltage being Auto should really explain why it's crashing in Linux and not windows, but if you haven't tried messing with it, it's worth a try.

    If you can, try booting into linux in some sort of recovery mode (non-graphical) and just sit there and see what comes along in your dmesg, syslog, or /proc/kmsg if syslogd isn't running. If you have lm_sensors configured run
    Code:
    watch -n1 sensors
    And keep an eye on your voltage

    None of this is going to get you anywhere definitive, but it'll start opening up possible lines of attack.
     
    Last edited: Feb 21, 2018
  16. jclausius

    jclausius Notebook Virtuoso

    Reputations:
    6,160
    Messages:
    3,265
    Likes Received:
    2,573
    Trophy Points:
    231
    @ALLurGroceries - Thanks for the response... There's a lot there, and I'll go thru it in a bit. But I've made serious progress, and wanted to report it here:

    a) With everything back to defaults in UEFI, whlie using HWInfo, I ran Prime95 v26.6 on Windows along with OCCT to a max reading on the CPU voltage (VID).
    b) On a whim, I changed the following in the ASRock UEFI:
    Core Voltage Mode: Adaptive
    Core Voltage Override: Set to the max CPU voltage I encountered in step A (1.126V)
    Core Voltage Offset: -0.088 - uncovered during runs of Prime and OCCT in earlier testing.
    c) Saved settings

    Success!! I can now boot into the Linux partition, and without any MCE errors. So something about the 'Auto' settings was causing the issue.

    Now, I need to validate / find a voltage offset that works with Linux. I'm going to use 'stress-ng' and hopefully find the sweet spot for the CPU. I'll post my findings to this thread.
     
  17. Cihancan

    Cihancan Notebook Enthusiast

    Reputations:
    0
    Messages:
    10
    Likes Received:
    1
    Trophy Points:
    6
    Ive a acer vn7-571g im planning to install linux on it. My computer disables its turbo when it reaches to 80 degrees celcius, i use throttlestop on windows to block it from disabling turbo at 80 degrees, do anyone know which cpu register i need to modify to get same effect of throttlestop on linux?
     
  18. Mastermind5200

    Mastermind5200 Notebook Virtuoso

    Reputations:
    372
    Messages:
    2,152
    Likes Received:
    826
    Trophy Points:
    131
    You shouldn't do that, you will damage your CPU if you do that over time, I don't know why you would ever do that
     
  19. Cihancan

    Cihancan Notebook Enthusiast

    Reputations:
    0
    Messages:
    10
    Likes Received:
    1
    Trophy Points:
    6
    as i said im doing it for 2 years 7/24 without a problem, as long as i dont pass 105C which is shutdown temperature of i5-5200 there shouldnt be a problem
     
  20. Vasudev

    Vasudev Notebook Nobel Laureate

    Reputations:
    12,045
    Messages:
    11,278
    Likes Received:
    8,815
    Trophy Points:
    931
    I think unchecking BD PROCHOT might solve the issue because I tried it on my sister's laptop with i5 5200U.
    Moreover repasting can bring down those temps considerably.
     
    Aroc and hmscott like this.
  21. Mastermind5200

    Mastermind5200 Notebook Virtuoso

    Reputations:
    372
    Messages:
    2,152
    Likes Received:
    826
    Trophy Points:
    131
    If you're reaching 80c on a laptop with that low power of CPU something is very wrong
     
  22. Cihancan

    Cihancan Notebook Enthusiast

    Reputations:
    0
    Messages:
    10
    Likes Received:
    1
    Trophy Points:
    6
    I dont think anything is wrong about 80C its a laptop cooling system with one fan for both gpu and cpu
     
  23. Cihancan

    Cihancan Notebook Enthusiast

    Reputations:
    0
    Messages:
    10
    Likes Received:
    1
    Trophy Points:
    6
    Ok found the culprit When my cpu hits 85 degrees intel dynamic platform and thermal framework thingy disables my cpu turbo. throttlestop somehow manages to disable it in windows, but this thing is dirty it can even work without a driver i need to find a way to disable it like throttlestop does in winblowz in linux anyone know how can i contact unclewebb?
     
    Last edited: Aug 22, 2018