Change Turbo ratio limits

I am quite new to ubuntu, but I would like to change turbo ratio limits. In Windows is that easy because of ThrottleStop. I found on GitHub undervolt, but I want set multipliers for turbo. Also I found something about multipliers, but it requies some msr modifications and I dont understand how can I do it.

2

1 Answer

Use this answer at your own risk.
This answer uses a Intel(R) Core(TM) i5-10600K for examples. The register addresses should be the same for a i7-4700MQ.
Note: If your kernel is new enough, then write access to MSRs (Machine Specific Register)s will be disabled, requiring msr.allow_writes=on to be added to your /etc/default/grub command line, GRUB_CMDLINE_LINUX_DEFAULT.
Prerequisite: msr-tools, turbostat, and msr module loaded.

The MSR_TURBO_RATIO_LIMIT (1ADH) is read only if MSR_PLATFORM_INFO (0CEH) bit 28 is 0, but is read/write if bit 28 is 1.

Example method 1:

$ sudo modprobe msr
$ sudo rdmsr --bitfield 28:28 0x0ce
1

Example method 2, use turbostat to read the register and decode it myself. Also list the method 2 way for observing turbo ratios now:

$ sudo turbostat
turbostat version 21.05.04 - Len Brown <>
...
cpu2: MSR_PLATFORM_INFO: 0x808083af1012900
...
cpu2: MSR_TURBO_RATIO_LIMIT: 0x303030303030
48 * 100.0 = 4800.0 MHz max turbo 6 active cores
48 * 100.0 = 4800.0 MHz max turbo 5 active cores
48 * 100.0 = 4800.0 MHz max turbo 4 active cores
48 * 100.0 = 4800.0 MHz max turbo 3 active cores
48 * 100.0 = 4800.0 MHz max turbo 2 active cores
48 * 100.0 = 4800.0 MHz max turbo 1 active cores
...

So, I have the ability to change my turbo ratios. What are they currently? Method 2, turbostat is listed and decoded above, which is probably easiest. Method 1:

$ sudo rdmsr 0x1AD
303030303030

8 bites per number of active cores ratios starting with 1, or all are 48. So say I wanted to change 6 active cores to 47, or 2FH:

$ sudo wrmsr 0x1AD 0x2f3030303030
$ sudo rdmsr 0x1AD
2f3030303030

And also check via turbostat:

$ sudo turbostat
...
cpu10: MSR_TURBO_RATIO_LIMIT: 0x2f3030303030
47 * 100.0 = 4700.0 MHz max turbo 6 active cores
48 * 100.0 = 4800.0 MHz max turbo 5 active cores
48 * 100.0 = 4800.0 MHz max turbo 4 active cores
48 * 100.0 = 4800.0 MHz max turbo 3 active cores
48 * 100.0 = 4800.0 MHz max turbo 2 active cores
48 * 100.0 = 4800.0 MHz max turbo 1 active cores

Note: Some processor models will list turbo ratios for more cores than they actually have. i5-9600K example:

cpu5: MSR_TURBO_RATIO_LIMIT: 0x2b2b2e2e2e2e2e2e
43 * 100.0 = 4300.0 MHz max turbo 8 active cores << I only have 6 cores
43 * 100.0 = 4300.0 MHz max turbo 7 active cores << I only have 6 cores
46 * 100.0 = 4600.0 MHz max turbo 6 active cores
46 * 100.0 = 4600.0 MHz max turbo 5 active cores
46 * 100.0 = 4600.0 MHz max turbo 4 active cores
46 * 100.0 = 4600.0 MHz max turbo 3 active cores
46 * 100.0 = 4600.0 MHz max turbo 2 active cores
46 * 100.0 = 4600.0 MHz max turbo 1 active cores

That information can be ignored.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like