• Unity
  • Services
  • Made with Unity
  • Learn
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Forums
  • Answers
  • Feedback
  • Issue Tracker
  • Blog
  • Evangelists
  • User Groups

Navigation

  • Home
  • Unity
  • Industries
  • Made with Unity
  • Learn
  • Community
    • Forums
    • Answers
    • Feedback
    • Issue Tracker
    • Blog
    • Evangelists
    • User Groups
  • Get Unity
  • Asset Store

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by HalversonS · Dec 13, 2016 at 02:58 PM · bugperformancehardwareminimizeruninbackground

GPU running 100% while Unity build is minimized and running in background

This is with Unity 5.2.2f1. I understand that other versions are also affected.

The issue is when Application.runInBackground = true and then the window is minimized, the GPU spikes up to 100%. It seems to happen more often when a scene has less objects in it. I'm assuming the data that is cached in larger scenes is helping restrict the framerate.

My understanding is that because it's minimized and the GPU has less work to do, it's running full speed. This is a known bug.

I've seen one other post related to this from a few years ago. The answer was to set the target frame rate to something lower. That does not solve the issue however.

I've also tried turning VSYNC count to 0 before the program is minimized (as VSYNC was to blame in the prior post and also in a Unity bug up for vote to fix).

The only option appears to be to turn Application.runInBackground to false. However, this is not an acceptable fix when you do need it running in the background.

Turning the thread speed down also has come to no avail.

I'm pretty sure I'm just out of luck until Unity Devs fix this. I'm hoping someone else has run into this issue and has some idea of how to limit the GPU. I'm not sure why lowering the framerate manually or turning off certain features doesn't appear to work... there's more going wrong in the background that I'm unable to see.

Thanks!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by HalversonS · Dec 13, 2016 at 03:24 PM

It appears to work if I first turn VYSNC off and then adjust the targetFrameRate before minimizing. Then when maximized change back to my desired settings.

QualitySettings.vSyncCount = 0; Application.targetFrameRate = 1;

This is still a Unity bug. The GPU shouldn't run unrestricted while it is minimized.... it's crazy that performance becomes unbearable when there should be less resources demanded by the GPU. There is an issue related to this, I voted on it yesterday and added a comment with further versions affected. If it's an issue for you, please vote on it as well. Here is that issue

Feel free to add input if there is a better way to do this. At the moment this appears to work just fine.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

80 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity 5 editor flickering/glitchy (examples inside) 3 Answers

Mysterious stuttering! 'Unaccounted' 3 Answers

Unity Freezes and Deletes Everything in My Scene 0 Answers

Strangest Bug - Dodgy Triangle Pattern 0 Answers

Why is there no difference in performance when switching between quality settings? 3 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges