JDK-8168761 : Java only uses discrete graphics on macOS supporting switchable devices
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 8u112
  • Priority: P4
  • Status: Closed
  • Resolution: Incomplete
  • OS: os_x
  • CPU: x86
  • Submitted: 2016-10-22
  • Updated: 2016-11-24
  • Resolved: 2016-10-26
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b16, mixed mode)


ADDITIONAL OS VERSION INFORMATION :
macOS Sierra 10.12

EXTRA RELEVANT SYSTEM CONFIGURATION :
MacBookPro Retina 10,1

A DESCRIPTION OF THE PROBLEM :
When starting any Java application via command line or simply jvisualvm the system immediately switches to discrete graphics. This results in overheating and overpowering even if the app is not using any extending graphics features.

This behaviour might be circumstanced by specify a special option in the Info.plist file of the environment: <key>NSSupportsAutomaticGraphicsSwitching</key><true/>

See here for details: https://developer.apple.com/library/content/qa/qa1734/_index.html

When this option is present in a special launcher of a Java program, this system as expected, the integrated graphics is used.

There are some bugs related to this marked as fixed, but tested with version 1.8.0_112 it does not seem to work: https://bugs.openjdk.java.net/browse/JDK-8041900

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Start a terminal console
2. Enter: jvisualvm
3. The system switches immediately to discrete graphics, this might be monitored with the gfxCardStatus app

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The system should use the integrated graphics for simple 2D rendering.
ACTUAL -
The system uses discrete graphics for simple 2D rendering.

REPRODUCIBILITY :
This bug can be reproduced always.


Comments
Requested bug filer to verify this issue on JDK 9ea latest build whether it is reproducible or not. JDK 9ea : https://jdk9.java.net/download/
26-10-2016