Why does Unity drain my laptop battery faster?

I’ve noticed that my laptop seems to use more battery when using Unity. Thing is my laptop doesn’t have a graphics card (Intel HD Graphics 620). So it’s integrated on the CPU. So I’m not sure why using a graphics intensive program would cause the battery to drain faster? Is this normal?

Only thing I can think of is if it is using a lot of RAM and then using the SSD as extra RAM maybe that uses a lot of power?

I’m not entirely sure how CPUs work does using 100% CPU take more power than 30% CPU for example? Does changing a bit in RAM from 0 to 1 create heat?

Does using more threads use more power?

U need understand software complexity, which lies behind.

Adding removing game objects, is more than just setting single bit. Is range of UI operations, as well, as number of logic, checks and logs generation under the hood.

Then if you move camera in scene, that of course need to be refreshed and rendered accordingly.
And if you run scene, there is tons of things that happens, before you can even see game play scene.

That is definitely much more, than just paint, or text file.

If you do that multiple times, that means more power is required. Hence more battery drain. In general, it would be advised, not working in editor on battery.

Often laptops has implemented reduction of performance, under battery run condition.
So your whole computer and as result Unity, may appear slower, in comparison, when laptop runs plugged in to power socket.

Unity Hub seams do run constant checks, even idle. So worth look into it, if you got installed.

Electronic components consume power to operate, but the rate of consumption is not a constant draw. A component will consume more power the higher the frequency it’s set to.

If have Windows 10 try opening Task Manager and watching the numbers at the bottom of the performance tab. The “GHz” rating won’t be a steady number. It’ll be constantly changing from one number to the next, and if you go from not using the processor to heavily using it you’ll see it spike too.

Just like a car engine will slow itself down when you aren’t actively using it to save gas, a modern processor (and GPU) will throttle itself down when you aren’t actively using it to save power. It’ll also throttle itself in cases where the cooling system is no longer able to keep up to prevent overheating.

This is one of the main reasons why a laptop will be advertised to have “Up to N hours” of battery life. That number is for a less than maximum power consumption (typically it’s the amount of time watching movies or browsing the web). Once you start using it heavily most devices will have a far lower battery life.

6 Likes

Changing bits (or doing virtually anything at all) would require transistors to switch, and cause them to pass through their linear region. So yes, it would consume power to do that.

2 Likes

Basically what @Ryiah said.

To save power computers turn various parts of their hardware down or off when they can. It can ramp up and down like this so quickly that we don’t notice it. Most desktop style software only keeps the computer busy for tiny periods of time, and often doesn’t need all of a computer’s hardware, so can be comparatively light on power usage.

A video game, on the other hand, generally always has some work for the CPU and the GPU, which are often the most power hungry parts of the system. This is because it’s trying to simulate a scene in real-time, so whenever a scene update is finished it’s immediately time to start the next one. As a result the computer never has a chance to ramp down. It might not be at 100% usage, but on average it’ll be higher than if you were working on a spreadsheet or browsing the web.

2 Likes

All the above answers are great and better answers than what I can give you. But, yes, graphics-intensive apps, like Unity, Blender and such generally use more power than, say, a text editor. So, yes, you are right, if a process is “hogging up” the CPU (high percentage) it is either working hard or sometimes, just working inefficiently.

Also, I’ve guessed that you might have also wondered if the Unity Editor can be set up to use less energy (battery usage), perhaps?

If so, here’s a couple tips:

  1. The Unity Editor is setup to make development easier but unfortunately also uses up more energy when “Lighting” is auto-generated. So, you might turn that off if you don’t need to see pretty rendering while developing.

  2. Sometimes, the Unity Editor can keep processes (aka programs, apps, etc) running in the background. As @Ryiah says, you can use Task Manager on Windows, or Activity Monitor on OSX, to see what’s going on. CPU usage is the thing to look at, as you have surmised. This happens more with beta versions but Unity can hang (apparently stuck in some internal endless loop in the background) using up incredible amounts of energy draining your battery very quickly. I’ve had to “kill” (aka terminate) processes this way when nothing else worked - dramatically cooling my computer, I might add.

  3. Side Note: If the Unity Editor hangs, sometimes your old scene can be found in the temp folder - move and rename it, before restarting Unity (which will delete the backup, fyi).

Integrated GPU’s are still GPU’s. They still draw power, entirely separate from the power the CPU cores draw.

Running the laptop at a lower resolution will probably give a bit more battery life. Alternatively make the game preview window a little smaller, things like that will help a laptop. If it’s a laptop with more than one GPU can set your preferred in preferences.

Intel also has a setting in their control panel tool (forget its name) which comes with the video driver, which can be set to maximize battery life when on battery. This will come at the cost of frame rate of course.

Lots of drawing. Any time you change anything in the scene, it has to redraw it. Compilers also take a lot of power. Also, are you just using Unity? Both Visual Studios and Mono Develop are beasts.

You’re scene isn’t autobaking GI is it?

Switching back and forth between Unity and something else also causes it to check the hard drive for updates files, which then cause reimports or even compilation.