Battery - Warp forces use of the discrete GPU on dual-GPU Macbooks
Describe the bug On dual-GPU macbooks Warp forces use of the high-power GPU, which reduces battery life even when Warp isn't being used.
To Reproduce Open Warp, look in Activity Monitor under the Energy tab and see "Yes" under the "Graphics Card" tab (tooltip "Requires high performance GPU") for Warp. Or use iStat Menus to notice it like I did.
Expected behavior Use the Metal APIs to allow the low power adapter instead, the high performance GPU isn't required to use Metal.
Desktop (please complete the following information):
- OS Version: macOS 10.15.6
Additional context
It also re-renders the whole window for cursor blinking even when in the background, as visible using Quartz Debug flash on change, also wasting power.
Thanks for filing, we will take a look at this!
I've been noticing this too through iStat Menus. On a 16" MBP with a fair amount of CPU-hungry background junk open (Chrome / Slack / Discord / Superhuman / etc) I idle at about 20W system power. Opening Warp activates the Radeon GPU and takes it up to about 25W idling (25% more).
Anyone who happens to be benchmarking: https://github.com/dkorunic/iSMC also works pretty well for pulling power stats.
@zheng Have y'all had a chance to figure out if this is easy or hard at least?
Having the discrete GPU active shaves off about 20-25% of my on-battery time with Warp just idle in the background. I end up quitting it and losing state to save battery on the go, so it's becoming my most-major blocker for using Warp for everything.
@ccpost Apologies for the issue! Discrete GPU is currently necessary for ensuring our rendering performance. We are currently exploring options to make this configurable or switching to only use discrete GPU when user's laptop is plugged in to power
Dear @trishume , I have missed this thread and I've opened a similar one: https://github.com/warpdotdev/Warp/issues/2114
I could make warp use the integrated GPU by the steps I've provided in my thread. Please take a look and see if it helps.
Once I've forced MacBook 16 to stop using the external GPU the power consumption of the GPU is now back to very low numbers.
Differently from you I was using the Load Average and the temperature to monitor the increases (of both) after start warp.
Hi, @rodrigotrombeta how did you force Warp to stop using the external GPU? My laptop becomes too hot to comfortably use when I have Warp open, I have switched back to iTerm for now but if there is a work around by applying certain settings maybe I can go back to using it. I don't remember having this issue with earlier versions of Warp.
Hello @eberkund ,
I've wrote the following notes on that:
Turn off external GPU on Macbook Pro
pmset -g | grep -i gpu
# result must be 0
# Setting it is easily done with:
sudo pmset -a gpuswitch 0
All was taken from the following thread: https://discussions.apple.com/thread/8160651?answerId=32574288022#32574288022
...and you can add other settings in there like the added security of deactivating ttyskeepawake and even wake on magic packet/wake on "modem ring" (network can send a well known data file to wake the computer up from sleep which almost certainly keeps a port open to listen for the magic packet at all times):
sudo pmset -a gpuswitch 0 womp 0 ttyskeepawake 0 networksoversleep 0
gpuswitch can be set to 0, 1, or 2 and im not at my computer but can assume:
-
2 is gpu switching both on and battery aka no dedicated graphics card ever
-
1 is dedicated gpu only with charge cord connected/battery power would switch it to integrated
-
0 is dedicated gpu on both ac and battery
(uses more energy..not sure how much more but pmset would tell you)
Some people think the average user isn't capable of using the Terminal but they can safely be ignored.
I've run into this issue with other apps (e.g. PaperCut for managing printing budgets). In the case of that app, I was able to add a line to the info.plist file: NSSupportsAutomaticGraphicsSwitching to True, and it allowed the app to use the iGPU instead of the dGPU. I just tried the same with Warp and unfortunately Warp crashes immediately upon execution with that new line added. It's possible Apple has changed the tag or I screwed something else up (it's late), but worth looking into on the dev side.
I absolutely love Warp and having it use iGPU instead of dGPU would make it even more awesome.
For me it's a must have feature as my mac ages and the battery cannot last for 1 hour given my daily workload with discrete GPU on all the time.
For the past 3 weeks I've had a battery and noisy fan issue on my MBP16 2019. I spent hours debugging it. Unfortunately, I had just upgraded macOS and also firefox....and extensions update automatically, so I couldn't concentrate on anything specifically.. Hours and hours wasted trying to figure this out. disabling extensions, reinstalling firefox, etc. Nothing worked. Today I realized it's warp terminal that forces the discreet gpu to stay on. This requirement is weird. Uninstalled warp for the time being. Hopefully you guys can solve the issue of displaying text without taking 30% off my battery. Will follow this bug and try the app again when this issue is fixed.
Hi warp team, is there any intention of fixing this? This is a really severe issue for those of us with a discrete GPU. My battery life is in the 3 hours range with Warp open. All macbooks without discrete GPUs run Warp just fine, I'm not sure why it's needed on macbooks that do have a discrete GPU.
Hey! Yes, this is high up on our list of priorities; we'll tackle it soon (next few weeks). We appreciate your patience; we've got a small team and a lot to get done. :)
I've managed to make Warp use an integrated GPU only using the https://codyschrank.github.io/gSwitch/ tool. It's not super convenient, but at least I can continue to use Warp and not turn my laptop into a heater :)
First, great work on the terminal.
I can switch to using integrated GPU on Macbook Pro 2018 using the gSwitch app, but then the performance of just scrolling vertically is sluggish. @vorporeal when do you plan to release a build for us to try ?
Hey! Yes, this is high up on our list of priorities; we'll tackle it soon (next few weeks). We appreciate your patience; we've got a small team and a lot to get done. :)
Hey @vorporeal. Any update on this issue? I don't mean to rush the team or anything, but it has become a problem and would not like to switch to another terminal temporarily if the fix is coming soon.
Hey Folks, We apologize for any delays in releasing this fix. There is no immediate update or eta at this time.
As a workaround, you can try using gSwitch or the command suggested above so you can set the integrated GPU as primary and that should help for the time being.
Unfortunately I had to stop using app until its resolved. My laptop literally cannot last more than 1.5-2 hours using warp. Opted out to good ol' iterm2
Hey Folks, We apologize for any delays in releasing this fix. There is no immediate update or eta at this time.
As a workaround, you can try using gSwitch or the command suggested above so you can set the integrated GPU as primary and that should help for the time being.
this suggested fix doesn't work if you have an external monitors attached as then the GPU is activated regardless of gSwitch or that command.
It's been 2 years, this likely won't be fixed.
this suggested fix doesn't work if you have an external monitors attached as then the GPU is activated regardless of gSwitch or that command.
It's been 2 years, this likely won't be fixed.
If you have an external monitor attached the DGPU is activated automatically as Intel-based MacBooks can talk to external displays via DGPU only. This has nothing to do with Warp.
Hey all, thanks for your patience on this. I'm actively working on implementing a toggle in app settings to prefer rendering with the integrated GPU on dual GPU machines. No hard timeline but it should be relatively soon, ideally within the next couple of weeks. Will follow up on the thread with updates