This is driving me nuts and I've finally decided to make a post about it.
I have a fully maxed out 2017 MacBook Pro, currently the most powerful Mac laptop you can buy.
When I boot the game up, everything runs great. Uncapped I get almost 150 - 200 FPS on regular settings.
Then I move. At all.
If I move without letting go of the key for more than 1-2 seconds the game will spike in lag to the point of crippling the game. On a good day I go down to 1-5 FPS, normally it actually FREEZES the game until I stop moving. My fans even start whirring out of control like their being attacked. I'm not kidding.
Then if I let go the game is back to running like butter. This happens regardless of the world, where I'm facing, or how much terrain has generated. In fact, I can even walk into a wall without actually moving and the spike STILL OCCURS. I can also inch forward slowing by tapping the key and maintain perfect FPS.
And yes, before you ask, I have allocated memory to Minecraft though the launcher and through Java itself. I have rebooted my computer, unplugged peripherals and completely reinstalled the game from scratch, no mods, no nothing. Nothing else is running. Java and macOS are updated. I have lowered every setting to its minimum. I have viewed the game through debug mode and clearly see the lag spikes kick in at exactly the same time after pressing any movement key. It happens every, single, time.
I am tired, beaten, and don't know what to do. Please help. Thank you.
My Tech Specs:
2017 15" Macbook Pro
2.9 GHz Intel Core i7
16 GB 2133 MHz LPDDR3
Radeon Pro 560 4 GB
macOS High Sierra 10.13.3
PS: Please don't respond with "HEH GET A PC SCRUB". I am fragile.
(Note here I have it running on 10G of ram. This happens on the default 2G setup at well.)
^ This is how it looks when I don't move
^ This is after holding a movement key for about 5 seconds. After this point it froze until I let go. Notice the CPU allocation going crazy too.
Another interesting thing to note is that this effect almost entirely disappears if I jump before moving, or otherwise introduce movement on the Y axis while also moving on the X/Z plane.
The Meaning of Life, the Universe, and Everything.
Join Date:
12/28/2013
Posts:
53
Member Details
Memory issue. You're playing on vanilla, why the hell do you feel the need to change RAM allocation when the devs already set it to the appropriate value?
Memory issue. You're playing on vanilla, why the hell do you feel the need to change RAM allocation when the devs already set it to the appropriate value?
Please read my post fully. This exact phenomenon happens without any changes to the ram allocation. I can completely wipe Minecraft from my computer, redownload, load up a new world, and this still happens. I actually increased the ram after the fact because Minecraft can usually not handle large view distances or unnatural map configurations (adventure maps, large creative builds, redstone computers) without allocating more ram.
One of the most commonly suggested changes you can make to a Minecraft client is to alter the ram usage. This issue, in no way shape or form, is related to ram. How does that even make any sense?
The Meaning of Life, the Universe, and Everything.
Join Date:
12/28/2013
Posts:
53
Member Details
I have been able to set render distance to 32 and still only use 1GB RAM. The only reason why I would even allocate more ram is if I'm using a ton of mods. But even so, anything over 4GB just bogs Minecraft down.
Your OS also uses RAM as well, and since you have 16GB of RAM, why would you give over half of your RAM when Minecraft itself can't even use that much.
Yes, one of the commonly suggested changes to Minecraft may be to modify RAM, but it depends on what the problem is. Please read up on how Java handles memory before you turn into one of those people who thinks adding more RAM is always the solution. This is false. Just take a look at the screenshot you posted. It's only using 8%. If you still think it's a solution to everything, go look at actual tests and see for yourself.
I have been able to set render distance to 32 and still only use 1GB RAM. The only reason why I would even allocate more ram is if I'm using a ton of mods. But even so, anything over 4GB just bogs Minecraft down.
Your OS also uses RAM as well, and since you have 16GB of RAM, why would you give over half of your RAM when Minecraft itself can't even use that much.
Yes, one of the commonly suggested changes to Minecraft may be to modify RAM, but it depends on what the problem is. Please read up on how Java handles memory before you turn into one of those people who thinks adding more RAM is always the solution. This is false. Just take a look at the screenshot you posted. It's only using 8%. If you still think it's a solution to everything, go look at actual tests and see for yourself.
That's interesting. I will say I do use mods/modpacks regularly, however I may reduce ram down to 6G or so anyway.
The only problem here is that this FPS spike problem still persists regardless. Any idea on how to handle something like that?
The Meaning of Life, the Universe, and Everything.
Join Date:
3/20/2012
Posts:
1,519
Member Details
Mac OS is Linux's ugly cousin , but your right Minecraft should run super fast . Something is configured wrong and in the wrong power state . Read up on AMD's control panel settings and take the Coder's advice 1G is great , 10G it's going to choke . Do you realize that Java will waste all its resources on garbage cleanup on that 10G
Set mem usage to 1G . Get Oracle Java 1.8 build 162 . Install and configure Minecraft to use the Oracle Java .
Considering you have already updated all your drivers including AMD Graphics . Go into AMD Control Panel and reset to default , then Set Java to use AMD Graphics as default .
Mac OS is Linux's ugly cousin , but your right Minecraft should run super fast . Something is configured wrong and in the wrong power state . Read up on AMD's control panel settings and take the Coder's advice 1G is great , 10G it's going to choke . Do you realize that Java will waste all its resources on garbage cleanup on that 10G
Set mem usage to 1G . Get Oracle Java 1.8 build 162 . Install and configure Minecraft to use the Oracle Java .
Considering you have already updated all your drivers including AMD Graphics . Go into AMD Control Panel and reset to default , then Set Java to use AMD Graphics as default .
I have used Forge and Optifine, however have yet to try Foam. I will do that, change java, lower ram, and give my drivers a look before reporting back here. Thanks for the help!
Ok, did everything you said. I am averaging 180 - 200 fps now. However, this phenomenon still occurs, it's just less noticeable because the FPS is so high it can handle it for another half-second or so.
Let me re-explain exactly what is going on now that I've done a bit more testing:
When movement is applied to the player by means of a movement key, after 1 - 1.5 seconds the FPS will immediately drop by about 150. If the FPS is below 150 already the game will freeze. Otherwise it will quickly reduce to displaying 1 frame every couple seconds until either:
1. The movement key is released -> FPS returns to normal
2. A new movement key is tapped -> FPS returns to normal despite original key being held (jumping is included here)
3. A new movement key is held -> the lag will restart from the beginning, quickly ramping back up.
The result of this? I can avoid lag by temporarily initiating movement on an axis different than the original. This means I essentially have to tap another key or jump before moving anywhere in the game.
Another interesting thing to note: falling, flying downwards, or any other movement applied negatively in the Y axis will not induce lag.
Edit: Just tested riding in a Minecraft. It seems this only occurs upon player initiated movement, not if the player is moved by the environment.
The Meaning of Life, the Universe, and Everything.
Join Date:
12/28/2013
Posts:
53
Member Details
Do you have any overlays or additional languages setup that creates a "window" on top of Minecraft with key press?
I don't use Macs so I'm not 100% certain, but on windows, if you use a language such as chinese, or japanese, a window would pop up allowing you to choose which word to use. But since you're in a game and there's no text box, it would create essentially lag out the FPS since it's trying to create the pop up but failing.
I only use English on my machine. I have never installed or tampered with anything language related in the OS.
I am currently seeing if I can hook up a macro in Keyboard Maestro that taps a movement key when another one is pressed. So far it's not working for some reason but I'm gonna keep at it.
UPDATE: After fiddling with it I have discovered it must be a problem with the way either the computer or Minecraft registers actual, physical keyboard presses. I created a macro to simulate pressing w to move forward, and no lag whatsoever, despite getting lag if I actually hold w down in real life. Going to check keyboard settings.
UPDATE 2: Just found out the lag kicks in pressing ANY key on the keyboard within Minecraft. ANY KEY. After the same exact .5 second interval. Which mean this is a huge bug on either Apple or Mojang's part or I have done something horrible wrong with my laptop since getting it. It even works with Minecraft running in the background. If I held down a key while typing this post the game would freeze on my other monitor.
The Meaning of Life, the Universe, and Everything.
Join Date:
12/28/2013
Posts:
53
Member Details
Can you unplug the second monitor and run Minecraft on your main screen to see if this issue occurs? You didn’t necessarily mention you have an additional monitor.
When you press f3 in Minecraft, on the upper right corner of the screen, does it say Java 1.8.0_161 64 bit?
I play Minecraft on my main screen, and the bug happens regardless of being hooked up to my second monitor. I have checked that.
It displays runtime 1.8.0_161 64bit. I don't believe they have 162 for Mac yet.
UPDATE: Ok, the rabbit hole goes deeper. I seems this a phenomenon that occurs to my entire system. I can hold a key while typing and everything lags just as bad. After checking activity monitor I have narrowed it down to 3 daemons that CPU usage's skyrocket when I hold any key down:
hidd - handles key and mouse presses
notifyd - handles some terminal stuff
powerd - handles energy saver, fans, battery, etc
It seems is it most likely hidd that is then throttling the computer, causing notifyd and powerd to react by pushing fan power and other stuff.
So I now just have to figure out why hidd is going out of control.
Wowzers, I finally fixed it, but I'm not sure which thing I did to do it.
It seems it was a problem with the application "Karabiner", a keybinder for Mac. After deleting a rogue driver extension related to it and restarting the problem wasn't gone, but about 10 or so minutes later I booted up Minecraft and everything was fine. Very confused but relieved.
Thanks to everyone for their help!
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
This is driving me nuts and I've finally decided to make a post about it.
I have a fully maxed out 2017 MacBook Pro, currently the most powerful Mac laptop you can buy.
When I boot the game up, everything runs great. Uncapped I get almost 150 - 200 FPS on regular settings.
Then I move. At all.
If I move without letting go of the key for more than 1-2 seconds the game will spike in lag to the point of crippling the game. On a good day I go down to 1-5 FPS, normally it actually FREEZES the game until I stop moving. My fans even start whirring out of control like their being attacked. I'm not kidding.
Then if I let go the game is back to running like butter. This happens regardless of the world, where I'm facing, or how much terrain has generated. In fact, I can even walk into a wall without actually moving and the spike STILL OCCURS. I can also inch forward slowing by tapping the key and maintain perfect FPS.
And yes, before you ask, I have allocated memory to Minecraft though the launcher and through Java itself. I have rebooted my computer, unplugged peripherals and completely reinstalled the game from scratch, no mods, no nothing. Nothing else is running. Java and macOS are updated. I have lowered every setting to its minimum. I have viewed the game through debug mode and clearly see the lag spikes kick in at exactly the same time after pressing any movement key. It happens every, single, time.
I am tired, beaten, and don't know what to do. Please help. Thank you.
My Tech Specs:
2017 15" Macbook Pro
2.9 GHz Intel Core i7
16 GB 2133 MHz LPDDR3
Radeon Pro 560 4 GB
macOS High Sierra 10.13.3
PS: Please don't respond with "HEH GET A PC SCRUB". I am fragile.
Post a screenshot with F3 enabled and your JVM arguments.
My JVM:
-Xmx10G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
(Note here I have it running on 10G of ram. This happens on the default 2G setup at well.)
^ This is how it looks when I don't move
^ This is after holding a movement key for about 5 seconds. After this point it froze until I let go. Notice the CPU allocation going crazy too.
Another interesting thing to note is that this effect almost entirely disappears if I jump before moving, or otherwise introduce movement on the Y axis while also moving on the X/Z plane.
Memory issue. You're playing on vanilla, why the hell do you feel the need to change RAM allocation when the devs already set it to the appropriate value?
Please read my post fully. This exact phenomenon happens without any changes to the ram allocation. I can completely wipe Minecraft from my computer, redownload, load up a new world, and this still happens. I actually increased the ram after the fact because Minecraft can usually not handle large view distances or unnatural map configurations (adventure maps, large creative builds, redstone computers) without allocating more ram.
One of the most commonly suggested changes you can make to a Minecraft client is to alter the ram usage. This issue, in no way shape or form, is related to ram. How does that even make any sense?
I have been able to set render distance to 32 and still only use 1GB RAM. The only reason why I would even allocate more ram is if I'm using a ton of mods. But even so, anything over 4GB just bogs Minecraft down.
Your OS also uses RAM as well, and since you have 16GB of RAM, why would you give over half of your RAM when Minecraft itself can't even use that much.
Yes, one of the commonly suggested changes to Minecraft may be to modify RAM, but it depends on what the problem is. Please read up on how Java handles memory before you turn into one of those people who thinks adding more RAM is always the solution. This is false. Just take a look at the screenshot you posted. It's only using 8%. If you still think it's a solution to everything, go look at actual tests and see for yourself.
That's interesting. I will say I do use mods/modpacks regularly, however I may reduce ram down to 6G or so anyway.
The only problem here is that this FPS spike problem still persists regardless. Any idea on how to handle something like that?
Mac OS is Linux's ugly cousin , but your right Minecraft should run super fast . Something is configured wrong and in the wrong power state . Read up on AMD's control panel settings and take the Coder's advice 1G is great , 10G it's going to choke . Do you realize that Java will waste all its resources on garbage cleanup on that 10G
Set mem usage to 1G . Get Oracle Java 1.8 build 162 . Install and configure Minecraft to use the Oracle Java .
Considering you have already updated all your drivers including AMD Graphics . Go into AMD Control Panel and reset to default , then Set Java to use AMD Graphics as default .
Highly recommend this Minimum
Install Forge https://files.minecraftforge.net/
Optifine https://optifine.net/downloads
Foam https://unascribed.com/foamfix/
I have used Forge and Optifine, however have yet to try Foam. I will do that, change java, lower ram, and give my drivers a look before reporting back here. Thanks for the help!
Ok, did everything you said. I am averaging 180 - 200 fps now. However, this phenomenon still occurs, it's just less noticeable because the FPS is so high it can handle it for another half-second or so.
Let me re-explain exactly what is going on now that I've done a bit more testing:
When movement is applied to the player by means of a movement key, after 1 - 1.5 seconds the FPS will immediately drop by about 150. If the FPS is below 150 already the game will freeze. Otherwise it will quickly reduce to displaying 1 frame every couple seconds until either:
1. The movement key is released -> FPS returns to normal
2. A new movement key is tapped -> FPS returns to normal despite original key being held (jumping is included here)
3. A new movement key is held -> the lag will restart from the beginning, quickly ramping back up.
The result of this? I can avoid lag by temporarily initiating movement on an axis different than the original. This means I essentially have to tap another key or jump before moving anywhere in the game.
Another interesting thing to note: falling, flying downwards, or any other movement applied negatively in the Y axis will not induce lag.
Edit: Just tested riding in a Minecraft. It seems this only occurs upon player initiated movement, not if the player is moved by the environment.
Do you have any overlays or additional languages setup that creates a "window" on top of Minecraft with key press?
I don't use Macs so I'm not 100% certain, but on windows, if you use a language such as chinese, or japanese, a window would pop up allowing you to choose which word to use. But since you're in a game and there's no text box, it would create essentially lag out the FPS since it's trying to create the pop up but failing.
I only use English on my machine. I have never installed or tampered with anything language related in the OS.
I am currently seeing if I can hook up a macro in Keyboard Maestro that taps a movement key when another one is pressed. So far it's not working for some reason but I'm gonna keep at it.
UPDATE: After fiddling with it I have discovered it must be a problem with the way either the computer or Minecraft registers actual, physical keyboard presses. I created a macro to simulate pressing w to move forward, and no lag whatsoever, despite getting lag if I actually hold w down in real life. Going to check keyboard settings.
UPDATE 2: Just found out the lag kicks in pressing ANY key on the keyboard within Minecraft. ANY KEY. After the same exact .5 second interval. Which mean this is a huge bug on either Apple or Mojang's part or I have done something horrible wrong with my laptop since getting it. It even works with Minecraft running in the background. If I held down a key while typing this post the game would freeze on my other monitor.
Can you unplug the second monitor and run Minecraft on your main screen to see if this issue occurs? You didn’t necessarily mention you have an additional monitor.
When you press f3 in Minecraft, on the upper right corner of the screen, does it say Java 1.8.0_161 64 bit?
I play Minecraft on my main screen, and the bug happens regardless of being hooked up to my second monitor. I have checked that.
It displays runtime 1.8.0_161 64bit. I don't believe they have 162 for Mac yet.
UPDATE: Ok, the rabbit hole goes deeper. I seems this a phenomenon that occurs to my entire system. I can hold a key while typing and everything lags just as bad. After checking activity monitor I have narrowed it down to 3 daemons that CPU usage's skyrocket when I hold any key down:
hidd - handles key and mouse presses
notifyd - handles some terminal stuff
powerd - handles energy saver, fans, battery, etc
It seems is it most likely hidd that is then throttling the computer, causing notifyd and powerd to react by pushing fan power and other stuff.
So I now just have to figure out why hidd is going out of control.
Wowzers, I finally fixed it, but I'm not sure which thing I did to do it.
It seems it was a problem with the application "Karabiner", a keybinder for Mac. After deleting a rogue driver extension related to it and restarting the problem wasn't gone, but about 10 or so minutes later I booted up Minecraft and everything was fine. Very confused but relieved.
Thanks to everyone for their help!