[0.13.10] MacBookPro: CPU is much hotter than with 0.12

This subforum contains all the issues which we already resolved.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

[0.13.10] MacBookPro: CPU is much hotter than with 0.12

Post by ssilk »

This is strange, but what I've seen is this: I could play Factorio 0.12.35 some hours with my MacBookPro on batteries. It had been normally warm during that time. The ventilators summed a bit, but nothing disturbing, even if the game needed really much CPU. It would be only louder/hotter when loading/saving, when two CPUs are used.

Now with 0.13 I observe, that Factorio uses much more (CPU-)power: The fan turns up to 80% speed, it uses more power, the whole PowerBook becomes quite hot, the accu drains much faster. What I can see is, that Factorio uses 100-120% CPU (of 4 CPUs) all the time, that means: one CPU runs all the time at full speed, without wait cycles - even if I'm in the very early game.
This happens with or without mods.

Maybe some forgotten sleep(), some debug-code?
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Rseding91
Factorio Staff
Factorio Staff
Posts: 13202
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.13.10] MacBookPro: CPU is much hotter than with 0.12

Post by Rseding91 »

sleep() in the main loop is inaccurate and doesn't work to keep a constant 60 UPS. It was changed to busy-wait so we can maintain accurate times. That's by design.

You'll need to plug in the laptop :)
If you want to get ahold of me I'm almost always on Discord.

m44v
Fast Inserter
Fast Inserter
Posts: 122
Joined: Sun May 15, 2016 8:55 pm
Contact:

Re: [0.13.10] MacBookPro: CPU is much hotter than with 0.12

Post by m44v »

Rseding91 wrote:sleep() in the main loop is inaccurate and doesn't work to keep a constant 60 UPS. It was changed to busy-wait so we can maintain accurate times. That's by design.

You'll need to plug in the laptop :)
It doesn't seem like a good trade off though?
Last edited by m44v on Mon Jul 25, 2016 10:12 pm, edited 1 time in total.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [0.13.10] MacBookPro: CPU is much hotter than with 0.12

Post by ssilk »

:cry: well, I can plug it in, but - seriously - that still keeps the issue, that the fans are then so loud, that it is not possible to play with it any more. For me a large step back. :(

So I keep on saying it's a bug, cause you can also wait in a way, so that the sleep() wakes up long enough before the 1/60 second is reached (to save power) and only the remaining microseconds it actively waits.

You can save some CO2 emissions with it, less pollution, more green forests, it reduces the evolution factor, less biters... uhhmmm.. :roll: :D
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

User avatar
Kayanor
Global Moderator
Global Moderator
Posts: 565
Joined: Sat May 10, 2014 7:20 am
Contact:

Re: [0.13.10] MacBookPro: CPU is much hotter than with 0.12

Post by Kayanor »

Do you use headphones? ;)
ssilk wrote:You can save some CO2 emissions with it, less pollution, more green forests, it reduces the evolution factor, less biters... uhhmmm.. :roll: :D
But you can't test your power supplier if their generators are enough to power laser turrets. :P
Former moderator.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [0.13.10] MacBookPro: CPU is much hotter than with 0.12

Post by ssilk »

Kajanor wrote:Do you use headphones? ;)
Well, I can play of course with ear-plugs. But it's not this. My partner complained, and I need to say: She is right! The laptop is then so loud, that you will have problems to hear the TV. It is quite disturbing in a living room. And compared to as it was before it is really not acceptable. MacBooks are known for this behavior: they are normally quite silent, but if you use really much CPU they sound like a Boing. ;)

ssilk wrote:You can save some CO2 emissions with it, less pollution, more green forests, it reduces the evolution factor, less biters... uhhmmm.. :roll: :D
But you can't test your power supplier if their generators are enough to power laser turrets. :P
I need a mod, that could use the accumulator-power from the laptop in the case, that the game-accus are empty. :lol:
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

kinnom
Filter Inserter
Filter Inserter
Posts: 706
Joined: Fri Dec 26, 2014 4:20 pm
Contact:

Re: [0.13.10] MacBookPro: CPU is much hotter than with 0.12

Post by kinnom »

luckily(for me) itisonly mac. My Dell XPS M1210 still has a stable cpu temp of 78-83 C
no yes yes no yes no yes yes

dee-
Filter Inserter
Filter Inserter
Posts: 414
Joined: Mon Jan 19, 2015 9:21 am
Contact:

Re: [0.13.10] MacBookPro: CPU is much hotter than with 0.12

Post by dee- »

Busy waiting is "Bug by design".

I also fail to see which problem you tried to solve with that from 0.12

You already did a "sleep(millisecondsPerCycle - (now() - timeOfLoopBegin)" ?
You can also spawn a lightweight thread that only does a "sleep(millisecondsPerCycle)" and then opens the mutex, which the normal update thread runs into and waits until rewoken by the first thread.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13202
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.13.10] MacBookPro: CPU is much hotter than with 0.12

Post by Rseding91 »

dee- wrote:Busy waiting is "Bug by design".

I also fail to see which problem you tried to solve with that from 0.12

You already did a "sleep(millisecondsPerCycle - (now() - timeOfLoopBegin)" ?
You can also spawn a lightweight thread that only does a "sleep(millisecondsPerCycle)" and then opens the mutex, which the normal update thread runs into and waits until rewoken by the first thread.
Sleep in computers is not accurate - that's the issue. When you call "sleep for X" it sleeps for a *minimum* of X and then probably some extra. That probably some extra is the issue - it makes the update loop imperfect and it fluctuates between 59 and 61 rapidly.

http://gameprogrammingpatterns.com/game-loop.html
http://gamedev.stackexchange.com/questi ... on-windows
http://gamedev.stackexchange.com/questi ... sleep?rq=1
http://gafferongames.com/game-physics/f ... -timestep/
If you want to get ahold of me I'm almost always on Discord.

dee-
Filter Inserter
Filter Inserter
Posts: 414
Joined: Mon Jan 19, 2015 9:21 am
Contact:

Re: [0.13.10] MacBookPro: CPU is much hotter than with 0.12

Post by dee- »

Rseding91 wrote:
dee- wrote:Busy waiting is "Bug by design".

I also fail to see which problem you tried to solve with that from 0.12

You already did a "sleep(millisecondsPerCycle - (now() - timeOfLoopBegin)" ?
You can also spawn a lightweight thread that only does a "sleep(millisecondsPerCycle)" and then opens the mutex, which the normal update thread runs into and waits until rewoken by the first thread.
Sleep in computers is not accurate - that's the issue. When you call "sleep for X" it sleeps for a *minimum* of X and then probably some extra. That probably some extra is the issue - it makes the update loop imperfect and it fluctuates between 59 and 61 rapidly.

http://gameprogrammingpatterns.com/game-loop.html
http://gamedev.stackexchange.com/questi ... on-windows
http://gamedev.stackexchange.com/questi ... sleep?rq=1
http://gafferongames.com/game-physics/f ... -timestep/
Hm. Where have the good ol' times of IRQ8 gone to? :)

Maybe as a bandaid sleep for 50 and busy wait the last 10?
If you really need such an exact timer, you probably depend on a proper realtime operating system.
I wonder how everybody else (demoscene, games, latency-measure-tools) does this...

Hm, there's Periodic Processing With Standard C++11 Facilities.

Anyway, I'm way out of my leagure here :)
Thx for the linked articles.

/signing off

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [0.13.10] MacBookPro: CPU is much hotter than with 0.12

Post by ssilk »

Rseding91 wrote:Sleep in computers is not accurate - that's the issue.
I must say this:
It's now some days, that I reported this and I slept some days over this, so what I have to say is not just a feeling as in the beginning.

I repeat:
My problem is, that the mac becomes too hot to put it on the lap and that it becomes too loud to play in living room.
I've tried several things to fix this problem, for example I plugged earphones, I put it on a pillow, I quit all other programs, I even cleaned the fans... :) But I still cannot play in the same room, where others live, cause that is too disturbing; the reason is in Factorio. The second issue with this is, that is now not longer possible to play when you are traveling and have no power plug.

In short:
- too loud in normal home surroundings.
- too hot on laptops (O.K. I've no proof for other Laptops than MacBook).
- not playable without power plug.
- [waste of electric power and global heating :), but that is a bad/stupid argument.]

And the point is: This was possible before 0.13.

So my conclusion is,
- this issue is a bug,
- cause here something has been fixed, which was in my eyes not a bug, but a feature (had there been bug reports about the incorrect timing? I didn't find anything? Is there really the need for being so exact or is it just a graphical issue/glitch?) and
- cause there are several simple solutions possible to fix this, that it runs silent/cold again. (*)

Cause of that reasons I moved it back from Not a bug to bugs. :)

(*) Possible solutions see above. Another option would also be a configuration switch between new exact timing and old sleeped timing.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Rseding91
Factorio Staff
Factorio Staff
Posts: 13202
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.13.10] MacBookPro: CPU is much hotter than with 0.12

Post by Rseding91 »

I also have a laptop and experience no such issues with high CPU temps and loud fans which means high CPU temperature in your laptop causing the fan to run at high speeds is an issue with your laptop. Factorio is just using the computing resources available on the hardware its running on.
If you want to get ahold of me I'm almost always on Discord.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [0.13.10] MacBookPro: CPU is much hotter than with 0.12

Post by ssilk »

But that it runs on your laptop, doesn't mean, that it isn't a problem for others. It doesn't mean, that it is no bug if something works for you or that you cannot imagine the difference in loudness.

Yes, perhaps it's a Mac specific problem. But see topic. As said: I haven't tested it seriously enough on other laptops to say anything about that.

But then this remains a bug. And for me there is no other logical conclusion, cause with 0.12 it's playable in that surroundings, with 0.13 it is not. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Rseding91
Factorio Staff
Factorio Staff
Posts: 13202
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.13.10] MacBookPro: CPU is much hotter than with 0.12

Post by Rseding91 »

ssilk wrote:But that it runs on your laptop, doesn't mean, that it isn't a problem for others. It doesn't mean, that it is no bug if something works for you or that you cannot imagine the difference in loudness.

Yes, perhaps it's a Mac specific problem. But see topic. As said: I haven't tested it seriously enough on other laptops to say anything about that.

But then this remains a bug. And for me there is no other logical conclusion, cause with 0.12 it's playable in that surroundings, with 0.13 it is not. :)
A bug is a defect in the software. The software is running exactly as desired - no bug. Your laptop running hot is an issue with your laptop and it not being able to properly cool when running CPU intensive programs.

Often that kind of heat issue can be caused by the thermal paste on the CPU drying out. How old is the laptop? Have you ever had the paste replaced? If not, that could fix the issue.
If you want to get ahold of me I'm almost always on Discord.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [0.13.10] MacBookPro: CPU is much hotter than with 0.12

Post by ssilk »

Rseding91 wrote:A bug is a defect in the software. The software is running exactly as desired - no bug.
Well, that is not correct. A software bug is, if software does not things, that's awaited. Yes. But also if it does does things, that are not awaited. Like in this case.
Your laptop running hot is an issue with your laptop and it not being able to properly cool when running CPU intensive programs.
So please explain me: Why has it been running with 12 Gigabyte Megafactory without noise/heat in 0.12? It runs at 20 ups, nearly 100% CPU. I could play 4 hours without charging. The CPU runs silent. Etc. Allready all explained.

NOW it doesn't even reach 60 ups, when running on blank new game. CPU runs hot.
See screenshot
Screen Shot 2016-07-29 at 13.48.58.png
Screen Shot 2016-07-29 at 13.48.58.png (3.96 MiB) Viewed 4803 times
All mods turned off.
Often that kind of heat issue can be caused by the thermal paste on the CPU drying out. How old is the laptop? Have you ever had the paste replaced? If not, that could fix the issue.
Thanks for such advice, but this is a level of discussion I would like to avoid.
As said I opened it yesterday to clean and check everything. Also that above. There is no hardware problem. I use this laptop the whole day, 8-14 hours a day, which includes, that I don't use it only for playing games. :)

EDIT: Now when I think about it I need to say, that it runs with only 30 ups is new. I think with 0.13.9 or so it was 60 ups.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Rockstar04
Fast Inserter
Fast Inserter
Posts: 171
Joined: Sun Feb 17, 2013 4:31 pm
Contact:

Re: [0.13.10] MacBookPro: CPU is much hotter than with 0.12

Post by Rockstar04 »

I agree with ssilk, this is not worth the side effects. Laptop, Desktop, Battery or plugged in, no program should monopolize an entire CPU core just because it can.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.13.10] MacBookPro: CPU is much hotter than with 0.12

Post by Klonan »

The excessive CPU and workload is being looked at, but im afraid it might be a lot more difficult to fix

Rockstar04
Fast Inserter
Fast Inserter
Posts: 171
Joined: Sun Feb 17, 2013 4:31 pm
Contact:

Re: [0.13.10] MacBookPro: CPU is much hotter than with 0.12

Post by Rockstar04 »

Klonan wrote:The excessive CPU and workload is being looked at, but im afraid it might be a lot more difficult to fix
I'm not sure what needs to be looked at, the exact cause has been clearly stated in this very thread already. What exactly was that change targeted at fixing? Were there many cases of that time variation causing frequent desyncs? If not then it seems like a premature jump for perfection that had major negative side effects.

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2633
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: [0.13.10] MacBookPro: CPU is much hotter than with 0.12

Post by steinio »

What speaks against a CPU at full load.

Empty RAM and low CPU usage is a waste of ressources.
Image

Transport Belt Repair Man

View unread Posts

Rockstar04
Fast Inserter
Fast Inserter
Posts: 171
Joined: Sun Feb 17, 2013 4:31 pm
Contact:

Re: [0.13.10] MacBookPro: CPU is much hotter than with 0.12

Post by Rockstar04 »

steinio wrote:What speaks against a CPU at full load.

Empty RAM and low CPU usage is a waste of ressources.
I'm a server admin by trade, and while underutilized resources can be wasteful, I have monitoring systems that will wake me up in the middle of the night if any of my servers are running at over 90% cpu utilization. As far as I'm concerned, any program that tries to consume all of a systems resources just because it can is a flawed program, and needs to be fixed.

Post Reply

Return to “Resolved Problems and Bugs”