[OpenJDK 2D-Dev] <AWT Dev> [9] Review Request: JDK-8041900 [macosx] Java forces the use of discrete GPU

Torgeir Veimo torgeir.veimo at gmail.com
Thu May 28 00:30:45 UTC 2015


This is one of the bugs that prevent IDEA to switching to JDK7/8 for
IntelliJ by default. The JDK is perceived by a lot of users as an
ill-behaved application on OS X because it forces use of the discrete
GPU, drastically reducing battery life.

This patch didn't work for me either, on a 2014 15" retina mbp.


On 28 May 2015 at 07:53, Phil Race <philip.race at oracle.com> wrote:
> Hello Denis,
>
> Once lots of people start to use the integrated CPU I suppose there is a
> non-zero
> likelihood of crashes and other problems with that too.
> I would like to see this (a) selected based on battery or similar, not
> fixed,
> (b) made controllable by a flag or similar,
> and once that is done, get a lot of JDK9 bake time.
> To be suitable for JDK 8u it would have to be "off by default".
>
> -phil.
>
>
> On 05/27/2015 02:44 PM, Denis Fokin wrote:
>>
>> Hi Phil,
>>
>> Thank you for the comments. Actually, the battery life is not the only
>> issue that experience our customers. I am getting crash reports that are
>> reproducible only with discrete cards on MBP. Some users report hangs with
>> discrete cards. All this issues are eliminated by switching on the
>> integrated GPU. I am not sure, that discrete card gives significant
>> performance improvement in jdk implementation. Other applications, like
>> Chrome, use discrete video card only for WebGl or similar tasks.
>>
>> Thank you,
>>      Denis
>>
>>
>>> 27 мая 2015 г., в 21:09, Phil Race <philip.race at oracle.com> написал(а):
>>>
>>> I suppose that NSOpenGLPFAAllowOfflineRenderers must prevent whatever
>>> 'tickling'
>>> of the discrete GPU we do from automatically making it the active GPU ?
>>>
>>> This seems to merit a source code comment as at face value it seems like
>>> an API that allows
>>> you to use that (other) discrete GPU alongside the active GPU, but so we
>>> don't
>>> need that part, just the side-effect behaviour.
>>>
>>> But do we want this fix in this form ? The integrated GPU is going to
>>> perform far less well
>>> than the discrete GPU. If the issue is battery life, then perhaps it
>>> should be tied
>>> to whether we are running on battery or mains power. And then perhaps you
>>> need to figure out
>>> how to switch GPU on the fly when you go from mains to battery.
>>>
>>>
>>> -phil.
>>>
>>>
>>>
>>>> On 05/27/2015 08:08 AM, Denis Fokin wrote:
>>>> Hi, Sergey,
>>>>
>>>> Basically, you should close all apps that can switch the vc  including
>>>> the utility for switching video cards. Make sure in About This Mac ->
>>>> Displays that the integrated card is enabled. Start an application with the
>>>> patched version of Java. Check About This Mac -> Displays. Integrated video
>>>> card should be still active.
>>>>
>>>>
>>>>
>>>>> 27 мая 2015 г., в 17:30, Sergey Bylokhov <Sergey.Bylokhov at oracle.com>
>>>>> написал(а):
>>>>>
>>>>> Hi, Denis.
>>>>> Can you describe the steps on how to test it. On my mac it still change
>>>>> the vc.
>>>>>
>>>>>> On 27.05.15 17:16, Denis Fokin wrote:
>>>>>> Please review the fix for jdk9
>>>>>>
>>>>>> The fix allows do not force discrete video card usage on MacBook Pro
>>>>>> models with two video cards. I have tested the fix on several MPBs.
>>>>>>
>>>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8041900
>>>>>> Webrev: http://cr.openjdk.java.net/~denis/8041900/webrev.00
>>>>>> <http://cr.openjdk.java.net/%7Edenis/8041900/webrev.00>
>>>>>
>>>>> --
>>>>> Best regards, Sergey.
>
>



-- 
-Tor



More information about the 2d-dev mailing list