IntelliJ 13 uses high performance GPU under embedded Java 1.7 Follow
When running IntelliJ 13 using the embedded Java 1.7 version, the high-performance (discrete) GPU is used in place of the low-power (integrated) GPU. This does not occur when using the Apple Java 1.6 runtime. As a result, battery life when coding is greatly reduced.
Any suggestions for tweaks or configuration that will fix this?
Please sign in to leave a comment.
Java 7 uses OpenGL rendering and Apple uses high performance GPU in two video cards configurations for the rendering: see http://support.apple.com/kb/ts4044
So it looks like using Java 6 is the only *known* work around for the moment for such case
It looks like it might be possible for IntelliJ to flag an app as not requiring the discrete GPU. See these links:
https://developer.apple.com/library/mac/qa/qa1734/_index.html
https://bitbucket.org/infinitekind/appbundler/pull-request/6/add-support-for/diff
Thank you for the links, we will try the solution shortly
The given links below don't work. It dramatically reduces my battery life and my laptop heats up like crazy. Problem is the fonts look much better under 1.7 on a retina mbp. Any workaround/fixes would be appreciated!
The 2nd post had the required clue you just needed the right syntax. I got it to stop using the dGPU by adding 2 lines to PhpStorm.app/Contents/Info.plist.
Just add:
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
to the <dict> section of /Applications/PhpStorm.app/Contents/Info.plist
Hmm, the activity monitor's Energy tab still says that IntelliJ is using the GPU. My machine still does into overdrive. It's set in the right place, I'm not sure why it's ignoring it. I wonder if there's another place it needs to be set, maybe for the Java exe?
I just added the following to the /Applications/"Intellij Idea".app/Contents/Info.plist but it still switches to the dedicated GPU.
Another way to "fix" this? Need as long battery time as possible because I will get some sessions into Java
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
Confirmed this is fixed with 134.1007.
Just installed 13.1
Build number: IU-134.1007
MacBook Pro Retina Late 2013 with discrete GPU
It's still switching on start, not fixed?
Is there a ticket # that addresses this?
And just downloaded it - it's not fixed.
http://youtrack.jetbrains.com/issue/IDEA-119858
and
http://youtrack.jetbrains.com/issue/IDEA-109911
Found these two, because they are linked. Need a fix for this :-( As far as my googling tells me the problem is Java 1.7 not IntelliJ per se and I wasn't able to figure out a solution... Ok there is one, use Java 1.6 ... I don't know whether it makes a difference or not but we were told in university to develop under 1.7 ...
In general you can run IntelliJ under Java 6, and still use Java 7 as the SDK to develop against.
There are no limits on using Java 7 in IntelliJ running on Java 6.
Alright. So I have to install Java 6 too, right? I guess I have to download it from apple somewhere?
Do I have to change some settings then or will Intellij recognize it by itself?
Sorry but I have to ask those questions because I am new to Mac OS and Java itself...
EDIT:
After removing java 7 jdk from /library/java/javavirtualmachines and reinstalling java 6, whenever i start 13.0.2 build 133.696 it still starts with discrete gpu.
I checked java version and it says 1.6.0_65 ...
Whenever I change in Info.plist from Java 1.7* to 1.6* the program wont start... Help please :-(
EDIT:
Alright. Deleted it and now it is starting :-) What do I have to do now to develop using jdk 7?
EDIT:
Alright. Installed the JDK 7 again. Wanted to see what happens. JAVA HOME is 1.7 again and -version says too, but Intellij is still using Java 6 for me, so I'm fine with that and I was able to choose JDK 7 files for my projects.
Just tested the lates build 134.1160 with bundled JRE on Retina, Mid 2012, OS X 10.9.1 (13B42) and it is still requeres Hight perf GPU
The issue is that for every OpenGL call it will switch to discrete GPU, even if those calls could be handled by intel gpu just fine. So if Java 7 wants to use OpenGL to draw (for retina purposes maybe?) then it will activate it. I'm using gfxCardStatus to force the usage of Intel GPU for these cases.