Zotero causing battery drain on MacBook Pro w/ discrete graphics

I've tested and confirmed that under unknown circumstances, Zotero is causing my MacBook Pro to switch to, and remain "stuck" in, the "high performance graphics" mode, rather than using the more energy efficient integrated graphics.

Using the gfxCardStatus app, I notice when downloading new articles via the Safari widget that the discrete graphics card switched on. When I attempted to force the integrated graphics mode, it prohibited the operation and told me that Zotero was the offending user.

As I cannot see any conceivable reason why this is the case (the app only says that Zotero is in some "dependencies list"), I'm coming here in hopes that a Zotero developer will see this and figure it out.

Before running the gfxCardStatus app, I was wondering constantly why my battery was dying prematurely on my brand new laptop. I killed wifi, bluetooth, every app I could...and would have *never* thought Zotero was part of the issue until I saw it for myself.

Thanks in advance to whoever reads this and fixes the bug!
  • Does this happen as soon as Zotero starts up, or only after you try to save something? If so, can you provide an example URL where this occurs?
  • Problem is...I usually use Zotero with an external display connected; in that setup the discrete graphics is always on.

    Yesterday's the first time I noticed the graphics switch during my usage. The one data point I have: I had several tabs open (>10), and then proceeded to go through each one and hit the Safari Zotero plugin button. Somewhere in that process (a couple URLs in), the notification from gfxCardStatus popped up saying it was switching from integrated to discrete graphics. That's when I queried it and found Zotero was the issue.

    A side issue: Zotero does not show up in the Energy tab of Activity Monitor. Every other app I have running, to include "helper" apps like Alfred and Magnet, show up in this tab. But for some reason Zotero does not. This is where the "Requires High Performance Graphic" option would show "yes" if it was required.

    In the interim, the only fix I've found is to monitor gfxCardStatus for change, finish up whatever Zotero was doing, close Zotero (which so far has caused an automatic switch back to integrated graphics), and then relaunch Zotero (which, so far, has NOT caused an automatic switch to discrete graphics at startup).

    Thanks in advance!
  • (clarification: this is only an issue when I'm on the laptop without a power supply. The same underlying bug is probably happening while connected to a display, but it's transparent. I only noticed an issue due to the battery drain it caused while disconnected and sitting at a coffee shop).
  • The one data point I have: I had several tabs open (>10), and then proceeded to go through each one and hit the Safari Zotero plugin button. Somewhere in that process (a couple URLs in), the notification from gfxCardStatus popped up saying it was switching from integrated to discrete graphics. That's when I queried it and found Zotero was the issue.
    Right, but to debug this we'd want to know a specific URL that causes the GPU switch.

    From testing on our end, we've been able to reproduce this when saving a snapshot of a page that uses WebGL, such as https://get.webgl.org/. Flash, HTML5 video, or framed PDFs don't seem to trigger it. Unfortunately, none of the Mozilla framework options (in Advanced prefs -> Config Editor) to disable WebGL, such as webgl.disabled, seem to help here, and the GPU stays on until close even though the hidden browser used for saving the snapshot is cleaned up properly. We'll keep investigating.

    Fortunately, WebGL is pretty rare. But we'd want to know other pages where this occurs, in case there are triggers other than WebGL.
  • Understand. Found one website that when I used the Zotero plugin, I noticed the switch to discrete graphics (attributed to Zotero, not the website itself):

    http://breakingdefense.com/2017/06/space-corps-what-is-it-good-for-not-much-air-force-leaders/

    I then quit Zotero, and it immediately switched back to integrated graphics.

    Tried that same website, and at first it didn't do anything; but then *after* the Zotero dialog box during the save disappeared, then it switched to discrete graphics again...and then stays there even after that tab is closed.

    Breaking Defense isn't the only website, of course...I don't believe I was on that site during the last couple times this occurred. But at least it's one you can look at, and it appears repeatable.

    Happy Hunting!
  • As soon as I clicked the Zotero plugin button on the following website to download a PDF, it switched into discrete graphics and got stuck there:
    https://swfound.org/media/108687/jakhu-satellite interference and space sustainability (17jun13).pdf
  • Weird. That one we can't reproduce. Are you sure it's not happening on an earlier page on the site?

    We do see it on the Breaking Defense site, though.
  • Bumping this thread.

    I am on a MBP 2018, running Mojave 10.14.2. Chrome 71.0.3578.98.

    Have replicated the flip from integrated to discrete graphics when using the Zotero plugin for Chrome. Once it switches over it only switches back to integrated when Zotero is shutdown and restarted.

    Webpage/article on which I replicated the issue: https://www.sciencedirect.com/science/article/pii/0962629895000046
Sign In or Register to comment.