0

I bought a new 2018 15'' MacBook Pro with Touch Bar a couple weeks ago. So far its battery life has been abysmal, reaching 0% after less than 4 hours of very light usage (only web browsing).

I decided to test the battery life today by having my regular applications (Safari, Firefox, and a few others) open and just letting the MBP sit on my desk. I should emphasize that there are absolutely no intensive programs running whatsoever; just a couple of web browsers and things like iMessage.

Right off the bat, it tells me at 100% charge that I have 2:07 remaining.

Around 20 minutes later, I checked again it is already down to 90% charge with 3:36 remaining.

Another 10 minutes later, it is down to 85% with 3:04 remaining.

After 3 hours and 46 minutes, the battery level reached 0% and the machine went to forced sleep.

Considering that Apple's advertised battery life is 10 hours, I find it extremely perplexing that my MBP is getting less than 4 hours of battery life doing nothing except sit on my desk with a couple web browsers open in the background. During this test, there were just nine tabs open between the two browsers, and they contained only mundane sites like Wikipedia and Gmail.

Has anyone else experienced issues with battery life on the 2018 MBPs? If you are getting close to the advertised 10 hours, what kind of activities are you doing?

UPDATE:

After further testing using gfxCardStatus, it appears that having a program using Java open in the background forces the graphics card to stay at the high performance discrete option. Is there any workaround for this? It is frustrating to have to close a bunch of applications every time I go out so that my battery lasts throughout the day.

  • 1
    Don't worry, Apple solved this by removing the estimated remaining time from the top of the screen. – William Entriken Jan 3 at 17:07
  • MacBook Air 2018, advertised as "having 12 hours of battery life and even 13 hours of iTunes playback" suffers from poor battery life too. I'm getting around 6 hours at most, having Bluetooth disabled, keyboard light disabled, screen dimmed. Apple is cutting costs and false advertising these days. – Robo Robok Jan 18 at 2:14
4

Considering your updated question that your problem is that running a Java-program forces the discrete GPU active thus draining your battery:

This is a known bug with some older versions of Java and JavaFX. Upgrade your Java to the latest version to see if that fixes this for you (see java bug JDK-8132775 and JDK-8041900).

If that still does not fix it, find the offending application and open its application bundle. Inside you'll find a Info.plist file, which you'll want to edit to add the key:

NSSupportsAutomaticGraphicsSwitching

the key should be a boolean set to true.

This should fix the problem if the application uses a sufficiently new version of Java.

If you're not confident doing this, report the GPU behavior as a bug to app developer and hint them about NSSupportsAutomaticGraphicsSwitching. Hopefully they will put out an update fixing the problem.

If your Java program does not come as a .app but instead is a bare jar-file, you'll want to convert it to an app first. Use the jar2app script to convert it to an app, and then use the instructions above to add the NSSupportsAutomaticsGraphicsSwitching key. Download jar2app from here:

https://github.com/Jorl17/jar2app

  • Where do I find the application bundle? Should I add the key to Java's .plist file or only for my specific application? – mikario Aug 7 '18 at 18:20
  • Only for that specific location. Find the bundle by right-clicking the app and choose “Open Package” – jksoegaard Aug 7 '18 at 20:38
  • This application is a .jar file and does not show up in the Applications folder. Do you know where the Info.plist file would be stored? – mikario Aug 7 '18 at 21:06
  • 1
    @kenshin I have added instructions on what to do with a bare jar file – jksoegaard Aug 8 '18 at 19:37
  • 1
    Thanks for this, awesome fix. Android studio using Java 8 u181 which has the fix was consuming 3500mA when running the emulator, with the key added in the JAVA Android Studio info.plist file the consumption dropped below 700mA.. – Andy Oct 4 '18 at 0:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .