Can't disable turbo boost since Ubuntu 16.04

I couldn't get my script to work with the latest version of msr-tools (probably discontinued as the github remains untouched since 2013). Perhaps Ubuntu 16.04 changed the way it stores settings for its CPUs drivers, and msr-tools fails to generate the proper file tree.

The workaround I found is to (sudo) edit the file:

/sys/devices/system/cpu/intel_pstate/no_turbo

Simply type "1" for no turbo and save... No reboot needed.

You can easily check if it's working with

grep MHz /proc/cpuinfo

And see if any of the outputs goes above stock frequency

cpu MHz     : 2000.000
cpu MHz     : 2000.078
cpu MHz     : 2000.000
cpu MHz     : 1999.921
cpu MHz     : 1999.921
cpu MHz     : 1683.828
cpu MHz     : 1732.265
cpu MHz     : 2000.078

I hope someone will find this useful! Regards