{"id":158,"date":"2015-08-06T07:23:59","date_gmt":"2015-08-05T19:23:59","guid":{"rendered":"https:\/\/micro.muppetz.com\/blog\/?p=158"},"modified":"2016-06-08T07:06:47","modified_gmt":"2016-06-07T19:06:47","slug":"grsecurity-phc-undervolting-patch","status":"publish","type":"post","link":"https:\/\/micro.muppetz.com\/blog\/2015\/08\/06\/grsecurity-phc-undervolting-patch\/","title":{"rendered":"grsecurity + phc undervolting patch"},"content":{"rendered":"<p>In an effort to get the same performance from this laptop as I used when it ran windows (and I could use the excellent ThrottleStop program to undervolt), I did some investigation into how to undervolt while running Linux.<\/p>\n<div style=\"width: 383px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"http:\/\/www.linux-phc.org\/forum\/styles\/610nm\/imageset\/site_logo.gif\" alt=\"Linux PHC Project\" width=\"373\" height=\"102\" \/><p class=\"wp-caption-text\">Linux PHC Project<\/p><\/div>\n<p>The solution turns out to be the\u00a0<a href=\"http:\/\/www.linux-phc.org\/\">Linux PHC Project<\/a>. \u00a0There wasn&#8217;t a patch for Linux 4.1.4, but looking in the forums a bit I found a patch for 3.1, which cleanly applied to 4.1.4. \u00a0I didn&#8217;t bother with their suggested way of building a module, I just patched the file in the Linux source tree directly and rebuilt the kernel. \u00a0Because the tree was already patched with grsecurity, the diff spat out a bunch of offset changes, but all the changes applied correctly which is all that matters. \u00a0I checked to ensure that nothing grsecurity\/PaX related had been mangled.<\/p>\n<p>Recompile, reboot and now I have the following sysfs interfaces:<\/p>\n<pre>\/sys\/devices\/system\/cpu\/cpu*\/cpufreq\/phc_default_rawcontrol\r\n\/sys\/devices\/system\/cpu\/cpu*\/cpufreq\/phc_default_vids\r\n\/sys\/devices\/system\/cpu\/cpu*\/cpufreq\/phc_rawcontrols\r\n\/sys\/devices\/system\/cpu\/cpu*\/cpufreq\/phc_version\r\n\/sys\/devices\/system\/cpu\/cpu*\/cpufreq\/phc_vids\r\n<\/pre>\n<p>Writing same values there as I used to use under Windows and now my laptop is so much cooler. \u00a0Before when I built a kernel it was getting up towards 90c and it was limiting the CPU to keep itself getting hotter. \u00a0Now I can build a kernel, I get nowhere over 75c and it stays at the full 2.20Ghz the entire time.<\/p>\n<pre>Original VIDs: cat phc_default_vids \r\n47 41 28 18 11\r\nNew VIDs: cat phc_vids \r\n30 27 23 13 6<\/pre>\n<p>Excellent! \u00a0Thanks Linux PHC Project.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In an effort to get the same performance from this laptop as I used when it ran windows (and I could use the excellent ThrottleStop program to undervolt), I did some investigation into how to undervolt while running Linux. The solution turns out to be the\u00a0Linux PHC Project. \u00a0There wasn&#8217;t a patch for Linux 4.1.4, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":151,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,17,10],"tags":[92,94,95],"class_list":["post-158","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-computers","category-grsecurity","category-technical","tag-grsecurity","tag-kernel","tag-undervolting"],"_links":{"self":[{"href":"https:\/\/micro.muppetz.com\/blog\/wp-json\/wp\/v2\/posts\/158","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/micro.muppetz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/micro.muppetz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/micro.muppetz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/micro.muppetz.com\/blog\/wp-json\/wp\/v2\/comments?post=158"}],"version-history":[{"count":7,"href":"https:\/\/micro.muppetz.com\/blog\/wp-json\/wp\/v2\/posts\/158\/revisions"}],"predecessor-version":[{"id":220,"href":"https:\/\/micro.muppetz.com\/blog\/wp-json\/wp\/v2\/posts\/158\/revisions\/220"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/micro.muppetz.com\/blog\/wp-json\/wp\/v2\/media\/151"}],"wp:attachment":[{"href":"https:\/\/micro.muppetz.com\/blog\/wp-json\/wp\/v2\/media?parent=158"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/micro.muppetz.com\/blog\/wp-json\/wp\/v2\/categories?post=158"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/micro.muppetz.com\/blog\/wp-json\/wp\/v2\/tags?post=158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}