How to add a code into the kernel


claudiu91

New Member
Joined
Feb 17, 2017
Messages
14
Reaction score
0
So, I have some issues with the power scaling and I want to inject a string into the kernel, a string that will keep my cpu out of power saver... I want to add this line "intel_idle.max_cstate=1" and I don't know how...
 
Ad

Advertisements

Cory Cooper

Moderator
Joined
May 19, 2004
Messages
6,944
Reaction score
242
Hello,

It is strongly recommended that you don't try to edit the kernel itself. Your Mac could become unstable and not startup at all. In addition, attempting to change things of this nature could cause eventual hardware damage.

-Which model Mac?
-Which version of OS X?
-What type of power scaling are you trying to adjust? And, for what reason?

C
 

claudiu91

New Member
Joined
Feb 17, 2017
Messages
14
Reaction score
0
Hello,

It is strongly recommended that you don't try to edit the kernel itself. Your Mac could become unstable and not startup at all. In addition, attempting to change things of this nature could cause eventual hardware damage.

-Which model Mac?
-Which version of OS X?
-What type of power scaling are you trying to adjust? And, for what reason?

C
Tldr: My Mac freezes in few minutes after boot... There are two ways to keep it running:

  • plug something in the HDMI port
  • run this "nohup yes > /dev/null &" în terminal - this run a process in a loop and keeps the CPU out of low power saving...

I have a strange problem with my MacBook Pro 15" mid-2014 i7 2.2 GHz 4770HQ with Iris 5200. After I boot into OSX, in just a few minutes, sometimes seconds the screen goes black with the backlight still on.

First time when I got this problem I thought it was a software issue, so I reinstalled OS Sierra from a USB drive (downloaded from App Store, put it on a USB drive). I performed a clean install, I formatted the main partition (at the time I had 2 partitions) and installed the OS. I was kinda happy because I didn't encounter any issues at all through installing process. In the first 5 minutes of using the OS crashed badly like before.
I said wtf, must be a problem with Sierra or something. After some googling, I decided to install the OSX from Internet recovery mode, so I did... It was an old version of OSX... I can't remember exactly which one, probably snow Leopard, it had the old interface with the glossy dock.
I was happy again because the installing process went well and I was convinced this time it would work... I booted up the OS and after a few minutes, it crashed again, the same thing black screen with the backlight lighted on. I reinstalled Sierra, no surprise the problem came back as soon as I booted up the OS.

I was very intrigued by this issue and I made a live stick with Linux, I plugged it in the laptop, boot it up and surprise, surprise, my laptop was running without any problems at all... I test it thoroughly, for hours or so, no errors no nothing.

I use it for some time with Linux and one day, by the chance I plugged it into a monitor via HDMI, I had some work to do in Excel, and I prefer to work on a wider screen... Anyway, after I finished my work I forgot to plug it into an outlet and the battery died while I was browsing the Internet... Then I plugged into an outlet and when I turned it back on I didn't pay attention to boot it in Linux, so it went straight in OSX... By that time I didn't know that if it's connected to HDMI it works fine, so I was impressed seeing it working again in OSX...
I unplugged it from HDMI and move it from the desk and immediately crashed... After multiple tests, I was convinced that if it's plugged in an external display works just fine so I bought a dummy HDMI (it's like a small stick that mimics an external display)... I was right about that matter, it's working fine, and I can still use it as a laptop.

Just from pure curiosity, I decided to make a boot camp partition (it was very annoying because I had to merge my partitions into one) and after that, I was able to make a boot camp partition...
After Windows 10 installing process was finished I installed all drivers without any issues, I even downloaded Steam and installed Metro, played a few chapters, no problems whatsoever.

A few days ago I found another way to make it work, but this method uses a lot of power and it's generating heat... If I run "nohup yes > /dev/null &" in the terminal, this command is starting a process in an infinite loop, which keeps the CPU busy (one core at 99.9%).

I did a full AASP test and everything was okay, I even left all test for the CPU overnight, no error at all.

Then I thought I should download Intel Power Gadget, it's a CPU monitor.
First I fire it up without the HDMI cable plugged and the processor was idling somewhere between 1.x W - 3.x W, with short spikes to 10 W - 15 W. (which crashed my system in a matter of minutes);
2nd time I plugged the HDMI cable in and the CPU energy consumption was above 5 W no matter what;
3rd time I went to the terminal and I entered this command "nohup yes > /dev/null &" and the CPU energy consumption was above 15 W.
 

Cory Cooper

Moderator
Joined
May 19, 2004
Messages
6,944
Reaction score
242
That sounds more like a hardware problem with the video or logic board. Even though the testing passed, there could still be a hardware issue. The OS X drivers interact differently than those in Windows/Linux.

Have you tried the SMC and NVRAM resets?

C
 
Ad

Advertisements

claudiu91

New Member
Joined
Feb 17, 2017
Messages
14
Reaction score
0
Sure, I tried even a CPU reballing... And a motherboard check... I think the problem is CPU related... Haswell has some weird states of energy saving and I think one of them doesn't work for my CPU.

So my last chance to make it work is to force my CPU to use more energy...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top