Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discrete GPU consuming additional 10W #2

Closed
liangtb opened this issue Oct 5, 2017 · 41 comments
Closed

Discrete GPU consuming additional 10W #2

liangtb opened this issue Oct 5, 2017 · 41 comments
Labels

Comments

@liangtb
Copy link

liangtb commented Oct 5, 2017

After installed script, the power consumption of the Macbook(10.13beta4) always increased 10-watt than no-script, I tested with Istat(software) and plug power meter(hardware).

When I uninstalled the script, it backed normal instantly.

It over and over again with install and uninstall.

@liangtb
Copy link
Author

liangtb commented Oct 5, 2017

It should be the GPU_nvidia consuming additional 10-watt, although the GPU_nvidia disabled....

@liangtb
Copy link
Author

liangtb commented Oct 5, 2017

This means the battery power of the macbook is half useful under this script.

@liangtb
Copy link
Author

liangtb commented Oct 5, 2017

In the Istat Menu, the temp of GPU_nvidia is still higher than normal situation under GPU_switch disabling GPU_nvidia.

@liangtb
Copy link
Author

liangtb commented Oct 5, 2017

This means the GPU_nvidia is still working but without functional driver.

@mayankk2308
Copy link
Owner

This is known issue that is currently not a priority - it will be once the script can be resolved to work on newer High Sierra builds.

@liangtb
Copy link
Author

liangtb commented Oct 5, 2017

I'm waiting for your new script on newer High Sierra. I downgrade my OSX version to 10.13beta4 in order to use your script...

@mayankk2308
Copy link
Owner

Trying as much as I can my friend!

@liangtb
Copy link
Author

liangtb commented Oct 5, 2017

another minor issue, the system preferences>accessibility can you open it? it's non-responded after I reinstall 10.13beta4, maybe a OSX beta bug...

@mayankk2308
Copy link
Owner

Probably macOS issue... don't have Beta 4 at the moment...

@liangtb
Copy link
Author

liangtb commented Oct 5, 2017

This implement can modify AGPM to make the GPU_nvidia idle.
http://forum.osxlatitude.com/index.php?/topic/7807-nvidia-gpu-performance-tuning-with-agpm/
Maybe you can back up and modify it to make GPU idle by script, it's better than manually modify it.

@liangtb
Copy link
Author

liangtb commented Oct 7, 2017

When I use nvram-only, it boots with iGPU,but incompatible with eGPU, and it's important that the more power consumption from idle nGPU didn't happen. As you say, the more power consumption must originate from AGPM and moved kext and driver from nvidia.

@liangtb
Copy link
Author

liangtb commented Oct 7, 2017

And screen lightness adjustment is related with nvidia kext and driver, only nvram is disable with non-functional lightness adjustment.

@liangtb
Copy link
Author

liangtb commented Oct 7, 2017

I'm pretty sure it's the frame buffer which comes from GeForceGA.plugin that belonging to GeForce.kext responsible for the high power consumption which originating from higher electric current of geforce gpu fb that is the usage of the graphics card's memory.
Simply, the full usage of the graphics card's memory results in the higher power consumption. This is
controlled in the geforce.kext in normal situation.
Maybe not move the GeForceGA.plugin can conduce better results...

@liangtb
Copy link
Author

liangtb commented Oct 7, 2017

GPU's core is not working, but its memory is full usable, consuming the power...
What an odd!

@liangtb
Copy link
Author

liangtb commented Oct 7, 2017

This maybe not related with AGPM, which only control geforce's core usage.
How to disable the geforce FB is the key.

@mayankk2308
Copy link
Owner

Thank you for your findings. I also received your email, but would be glad if you could post your results here for other who might wander here to look into.

I have been trying to work things out on High Sierra (13A405) and haven’t been successful. That will still be my priority for the moment. In my testing, I seem to have eliminated the AGPM and AGC as culprits. Swapping these kexts with ones from Beta 4 did not resolve the issue. The OS did boot successfully even with the Beta kexts (but without script modification), so I must assume that not much has changed in those kexts to make a difference.

@liangtb
Copy link
Author

liangtb commented Oct 7, 2017

After I tested the problem of power consumption in different ways, I'm pretty sure the full load of the geforce's memory is the culprit, maybe it's slightly related with the geforce's core.
Compared as follows:

sensor non-script script
geforce core 0.13a 0.54a
geforce fb 0.30a 2.07a
geforce core voltage 0.85v 0.85v
geforce fb voltage 1.35v 1.35v
geforce core power 0.11w 0.46w
geforce fb power 0.40w 2.80w

This is part excess power, but I can't understand the extra approximately 7w where comes from. Maybe it's marginal effect.
The geforce fb is the usage of the geforce memory which originating from frame buffer only founded in the geforceGA.kext.

@mayankk2308
Copy link
Owner

@liangtb could you experiment by removing line 73 of the script. Uninstall it, remove line 73, and try again and please post results. I want to see whether that makes a difference to temps at all.

@liangtb
Copy link
Author

liangtb commented Oct 7, 2017 via email

@liangtb
Copy link
Author

liangtb commented Oct 7, 2017

You mean to retain the geforce driver not replace them all?
If conduct to fail reboot?

@mayankk2308
Copy link
Owner

mayankk2308 commented Oct 7, 2017

Yes... I want to see if leaving them there helps or not. I never tested that before.

It should boot fine. If not, move the kexts from recovery as instructed on the eGPU forum. Don't do anything manually (using GUI). Only superuser mode on the command line. So via the script only. Of course, I hope you have a backup if you're testing with this script as stated in the disclaimer.

@liangtb
Copy link
Author

liangtb commented Oct 7, 2017

All problem is still here....
purge-nvda 2017-10-07 15-42-41
none of power consumption , sleeping, lightness adjustment is solved.

@mayankk2308
Copy link
Owner

Thanks for the update. Well, it was worth trying before thinking up more complex measures.

@liangtb
Copy link
Author

liangtb commented Oct 7, 2017

Maybe we both guess wrong, you can think another way, such as install_hooks.sh
https://github.com/0xbb/gpu-switch/tree/master/osx

@liangtb
Copy link
Author

liangtb commented Oct 7, 2017

if log out and in can fix iGPU, maybe no need for iGPU boot only.

@mayankk2308
Copy link
Owner

mayankk2308 commented Oct 7, 2017

Well, disabling the NVIDIA framebuffer in software is crucial to eGPU, hence the iGPU only boot. As far as I know, Apple's graphics switching policy is pretty unique (in comparison to Optimus) and only keeps one GPU active at a time (one framebuffer per GPU). Optimus uses the iGPU framebuffer. Thus, the Apple graphics muxer switch is like an "on" and "off", and since besides a hardware hack, powering off the dGPU seems to not be possible, only by disabling drivers would it at least be deemed unusable.

Not sure what you mean by fixing the iGPU by logging out and logging in.

With regards to a login-hook, I presume you mean I use it to manually load some drivers?

@liangtb
Copy link
Author

liangtb commented Oct 7, 2017

The eGPU is activated by logging out and in, while the OSX log out with fixed iGPU and log in with iGPU, maybe work I guess

@mayankk2308
Copy link
Owner

You mean to move the NVIDIA drivers before logging out I presume. I have not tried this, plus thought it would be one heck of a cumbersome solution to do this everytime. You could try it manually using the command line, at your discretion of course.

So essentially:

  • Plug in eGPU.
  • Move NVIDIA kexts.
  • Log out.
  • Log in.

Is this what you meant?

@mayankk2308
Copy link
Owner

mayankk2308 commented Oct 7, 2017

gpu-switch sadly does not disable the NVIDIA framebuffer. Also, gpu-switch only sets the NVRAM values to force iGPU boot and does not deal with kexts. I think I did try this once before discovering the kext move trick (basically before I developed this script) - had no luck of course.

I did research gpu-switch before building the script and the principles of iGPU mode are the same.

@liangtb
Copy link
Author

liangtb commented Oct 7, 2017

gpu-switch does totally disuse the nvidia GPU with no consumption of the geforce pb and core...by modifying the kext in the simple-way level may be solve the iGPU boot in the new high sierra, but other marginal effect will continues...unless one by one modify kext to fix it, this is a huge project...

@liangtb
Copy link
Author

liangtb commented Oct 7, 2017

I read the info of all the nvidia and geforce kext, in my opinion, no way to modify the info, the content of info is so simple that the key info maybe in the other hidden place...

@mayankk2308
Copy link
Owner

mayankk2308 commented Oct 7, 2017

I don't think gpu-switch is modifying any kexts. It simply sets a gpu-power-prefs value in the NVRAM without modifying the NVIDIA/discrete kexts. Because the kexts are present, you see dropped temps. The macOS project seems to be a wrapper (gfxcardstatus) that also includes a loginhook that switches mode to automatic, and on logout, to integrated (the logouthook).

Modifying NVRAM values requires a reboot for changes to take effect.

Gotta get some sleep (its 4.15AM ;p)...

@liangtb
Copy link
Author

liangtb commented Oct 7, 2017

NVRAM is not related with the happened small issues such as lightness adjustment, etc, the lack of nvda drivers take responsible for all issues...

@mayankk2308
Copy link
Owner

Yes, that's exactly why gpu-switch is not causing those small issues - it does not remove the kexts. Even when you use gpu-switch to force iGPU only, you will see the NVIDIA kexts loaded. That's why I went about explaining the way gpu-switch works - it leaves everything intact.

@liangtb
Copy link
Author

liangtb commented Oct 7, 2017

It's a double-sword problem, modify kext to cause these problems in simple way, not will no result in iGPU boot...
In the future, the sole way is to modify nvda kext in code-level. This looks like an unsolvable problem.

@liangtb
Copy link
Author

liangtb commented Oct 7, 2017

iGPU boot by only modifying nvram (use nvram-only) can solve all small issues, but with loading the kext, eGPU is non-functional...
The prime problem is to solve the eGPU utility...
Nvram-only is as same as gpu_switch...I get it!
The gpu_switch and the similar way not solve our problem.

@liangtb
Copy link
Author

liangtb commented Oct 7, 2017

why not refer to the iGPU-model MBPR 15 which is one difference with ours? All OSX is same, but for different model. In the iGPU-model MBPR 15 maybe exist a way to solve this problem about eGPU and marginal issues.
like a win_pc, exists a whitelist for boot, only in the whitelist component can be loaded.
Such as, fake a id or something, like a iGPU-model, then boot, it will be prefect functional if it boots successfully.

@liangtb
Copy link
Author

liangtb commented Oct 7, 2017

Maybe only disfunction the external display of the nvidia_GPU is a best-way, this is possibly a signal conflict, other functions working except the display signal one.

@mayankk2308 mayankk2308 changed the title the power consumption of the macbook with this script installed increasing 10watt than non-script [Power] Discrete GPU consuming additional 10W Oct 8, 2017
@liangtb
Copy link
Author

liangtb commented Oct 9, 2017 via email

@mayankk2308
Copy link
Owner

mayankk2308 commented Oct 10, 2017

Please test with macOS 10.13.4 B1 and 1.2.0 and provide an update.

@mayankk2308 mayankk2308 changed the title [Power] Discrete GPU consuming additional 10W Discrete GPU consuming additional 10W Oct 11, 2017
@mayankk2308
Copy link
Owner

This issue is not concerning, and while a solution may be possible, I am not considering implementing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants