Jump to content

[SOLVED : Cpu idle bug fix without hibernating!] MBPr Late 2013 (dgpu) + GTX 970: Optimus working, "cpu idle bug"


dnkei

Recommended Posts

EDIT: SOLUTION on my 4th post.

 

Hi all,

 

I just wanted to know if anyone found a fix for the cpu idle bug without hibernating. 
First of all, I made my setup in 2015 and I just used an external monitor since at the time making it work with optimus having a dgpu was unknown. Recently I read that disabling the dgpu was an option so I quickly got "up to date" reading the new stuff, but I might have missed something. Keeping that in mind:
I have a MBPr Late 2013 (GT750M dgpu) with an Akitio Thunder Box, with a dell power supply (which I always thought it might not be enough because I had to limit the power with Afterburner to 80% so it wouldn't shut down when playing a few hours) and an Nvidia GTX970 (KFA 4GB).

Since I was using a Win 7 on Bootcamp/BIOS I decided to start from scratch: got a Win 10 EFI installed, got reFind so I could activate the visibility of the Iris igpu, and although it seems to be much more buggy, got to run the system with the egpu. Then disabled the dgpu on the device manager, used the switch-gpu bat file as admin to get the igpu as main, so far so good. Shut down, Boot.

I get to the point where I basically have the egpu working and I tried running Tomb Raider's benchmark (what I had at hand) and it was going smoothly (which wouldn't be like that with the iris or dgpu). Also, looking at msi afterburner my egpu was at 100%.


The ONLY thing that I can't by any means get to work is to not have the CPU idle crazy load. I get around 25-30% of CPU load and if I try to hibernate the system it... well it goes to hell, haha.
The MBP seems to hibernate (sleep/shutdown black, fans out) but the egpu is still on with the fans (doesn't really hibernate), and from there its impossible to make it run. Pressing any button, alt, power, whatever, it tries to wake up/power on for a moment, but it simply can't finish, just black screen with the fans turning on. The only way to shut it down is to hold the power button. And after that it basically locks there and becomes even difficult to boot again, I actually have to press alt, go back to osx, reinstall refind - since it no longer appears with it trying to wake up from hibernation- run windows efi and quickly press shift+f8 to run in safe mode and then boot correctly (and again with the cpu load).

 

I have to say that even when working, my macbook pro doesn't consistently boot with the egpu via thunderbolt2, with any combination (wait to plug the cable, have it powered on, off, preboot, when starting windows, etc.) it just seems to randomly work. It used to work a bit better before refind, though, but never consistently (don't know if that has changed in the past years).

 

So... any ideas of how to get that cpu load off? Or to make hibernation work? 
Oh, as a note, I read that when you disable the dgpu and use the switchgpu script you can control the screen brightness again, but I just have it locked to the max. The control osd appears and moves but it doesn't actually change. I don't care about it but I thought it might give a hint of something not done properly?

Many thanks to whoever can give me any ideas!!!

 

EDIT: Reduced part of the cpu idle from known w10 small stuff but the main bug is still there, about 15%)

Edited by dnkei
Link to comment
Share on other sites

Ok, so even though no one answered - since it's a very specific problem - I'm going to answer myself after many many tests, just in case someone else needs this info in the future.
As I wrote before, sleep or hibernation in my machine is a no-go. I did make it work once, but it wasn't really hibernation but more a "hibernate-crash-shutdown-boot-think_its_waking_up". Anyway, here are my results after many tests (all of them are done with the dGpu disabled):

 

Intel HD graphics driver for my igpu (Iris 5200) causes the cpu's first processor (CPU 0) to be in a constant idle around 80%, being a general cpu idle of ~10-15% (since it has 8 processors). This is what is known by many here as the "cpu idle bug", which can be solved by going into hibernation and waking up. Unfortunately my computer (MBPr 2013 with thunderbolt 2) doesn't seem to be able to do this. Uninstalling the driver makes Windows 10 to revert to "Microsoft Basic Display Adapter", and actually removes this cpu idle, staying on 1% or so (as it should be). However, this driver also has it's problems, mainly it has not much configuration and most importantly, it DOESN'T work to make the eGpu work on the internal display.
Some of my tests with the tomb raider benchmark tool:

· Intel driver (+cpu 15% bug) + eGpu on external monitor : 60fps
· Intel driver (+cpu 15% bug) + eGpu on internal monitor : 30-40fps
· Microsoft Basic driver (0% cpu) + eGpu on external monitor: 60fps
· Microsoft Basic driver (0% cpu) + eGpu on internal monitor : 25-30fps

This last option isn't actually possible, at least directly it wouldn't let you, but I did connect an external monitor, started the game and moved it over to the internal display - and looking at the charts on afterburner it seemed to be using the egpu. I was hoping this would be better with the possibility of getting a headless hdmi connector, but no luck. No luck mirroring the screen either (got the same 30fps).

That's where I am right now. Any new ideas are welcome, if I don't get any I guess I'll keep posting whatever test I can do. Maybe a quick way to change drivers? Or something to force the cpu 0 to stop being used (like a hard-hibernate fix)?

I feel so close but so far...

Link to comment
Share on other sites

Quick update:
When installing "new" igpu drivers the screen flashes for a moment before they are install and it prompts you to restart. From that flashing moment the cpu idle is gone.

Meaning, if you install new drivers and just click "No, I will restart later", during that session (until next reboot) the cpu bug is gone, egpu works flawlessly in the internal display, everything just works as it should be.

Unfortunately in my experience it has to overwrite the drivers for new ones, so to do this fix you have to (every time) install old intel hd graphics drivers (to overwrite the new ones you have at the moment), click don't restart, install the newer drivers and don't restart either. And cpu is back to normal until you shutdown.

 

I think I'm near the solution... Maybe when installing drivers it disables and enables the internal display for a bit or something? There's usually a second black screen like 5 minutes after you choose not to reboot after installing the drivers, but I'm thinking that might be windows 10 also trying to adjust the new drivers? 

 

I'm probably rambling alone here, but any new ideas are welcome.

Link to comment
Share on other sites

I think I solved it! I'm still testing it, but so far so good, I'm able to remove the cpu idle without hibernating by disabling and enabling again the Intel Iris device. I figured something like that might be happening when reinstalling drivers prior to rebooting.
BE CAREFUL not to disable your igpu if you don't do it with a script that later enables it afterwards. It's usually ok, but it might get you a black screen, specially if you have a second gpu the os might only show the screen on that gpu and you wont see anything unless you connect a display to that gpu or enter in safemode (shift/f8 on windows boot).

Now, to make things a bit easier I made a script for DevManView (a free alternative device manager for windows) that runs on startup and disables and re-enables the igpu making it free of the idle bug! I think it works faster than the hibernation fix, so I might make a quick video explaining it if somebody wants it. My small bat file in case somebody wants to try it right away (the first 10 second timeout is because I observed that if I run it too fast in the startup it didn't remove th cpu idle bug):

timeout /t 10
DevManView.exe /disable "PCI\VEN_8086&DEV_0D26&SUBSYS_012F106B&REV_08\3&11583659&0&10"
timeout /t 2
DevManView.exe /enable "PCI\VEN_8086&DEV_0D26&SUBSYS_012F106B&REV_08\3&11583659&0&10"
 

So, now whenever I start windows, the script runs, screen goes off a few seconds and back on and I'm good to go! Not the cleanest way, but at least I have it working!

D.

 

Edit: It seems that with the egpu connected timing is sometimes even more critical, I just made the first timeout to 15 and the second one to 5, and also added a shortcut on the desktop in case I have to run it manually.

Edit2: In case anyone wants to make the bat file too, the "PCI\...." is the id of the iris igpu, you can check the info of the device on DevManView and copy/paste yours.

Edited by dnkei
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.