aliens

Author Topic: OS X 10.11 and CPU usage  (Read 12142 times)

Offline hansimmer

  • Squaddie
  • *
  • Posts: 9
    • View Profile
OS X 10.11 and CPU usage
« on: October 04, 2015, 07:17:27 pm »
Hello.

1. I have OpenXcom 1.0 and OS X 10.11. The fonts are not displayed correctly here. Does anyone know how to fix this?

2. I am running OpenXcom on a Macbook Pro 2015, 2.7 GHZ. The CPU usage is very high and the fans kick in immediately even in the options menu. Is that normal?

Thanks for your answers!

Offline hansimmer

  • Squaddie
  • *
  • Posts: 9
    • View Profile
Re: OS X 10.11 and CPU usage
« Reply #1 on: October 05, 2015, 07:55:04 pm »
This is what it looks like. Any ideas?

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: OS X 10.11 and CPU usage
« Reply #2 on: October 05, 2015, 08:08:05 pm »
Crazy resolution! I could fit almost fit 9 of my laptop's screen in one of yours..!

My guess is that you have a display filter enabled (check in options -> video) as that changes the way things are displayed and also uses a lot of cpu. And the higher the resolution of your game, the more work the filter has to do..

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: OS X 10.11 and CPU usage
« Reply #3 on: October 05, 2015, 08:14:32 pm »
I think some filters have issues when you use them with different zoom factors than they are designed for (like a scale3x algorithm on a 4x zoom)

You can also try one of the OpenGL filters (the ones with a *), if it's implemented efficiently on your platform, it should be less expensive than the software filters.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: OS X 10.11 and CPU usage
« Reply #4 on: October 06, 2015, 02:06:19 am »
try either disabling the opengl filter and using the frame rate limit, or enable vsync in your config.

Offline hansimmer

  • Squaddie
  • *
  • Posts: 9
    • View Profile
Re: OS X 10.11 and CPU usage
« Reply #5 on: October 06, 2015, 09:22:47 pm »
Thanks for your help everyone! I played around with the settings, although without any success. Disabling the opengl filters causes even more cpu load. Changing the resolution to whatever (even 640*480) has no noticeable effect. However, running OpenXcom in windowed mode (no matter what resolution) helps a lot. Switching back to fullscreen instantly increases cpu power consumption by 200% and the temperature raises from around 60 °C to almost 100 °C (idle is between 35 and 40). I think the CPU will shut down at 105. I also tried limiting the frame rate to 30 fps or lower, also without any noticeable effect. I did not find the vsync setting.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: OS X 10.11 and CPU usage
« Reply #6 on: October 06, 2015, 09:37:32 pm »
The "looks" issue is certainly a filter issue. As a first step, try to use no filters to get the default look.

When you run in windowed mode, the window is the size dictated by the resolution you request from the game. Lower resolution, smaller window, higher resolution, bigger window. The one thing that doesn't change is that 1 game pixel = 1screen pixel.

When you run in full screen mode, the resolution is "stretched", so it is no longer true that 1 game pixel = 1 screen pixel, instead, 1 game pixel = # of screen pixel/# of game pixels. This means your computer has to convert "on the fly" and I know for me it just crashes the game since my computer sucks. It sounds like yours can handle it, but doing the colours conversion for every pixel multiple times a second is causing you crazy cpu load.

Long story short, what happens when:
1- you run in windowed mode, at native resolution, no filter?
2- you run in full screen, at native resolution, with no filter?

The game should look tiny surrounded by a lot of black. You should then be able to use the battlescape and geoscape scalings (I can't remember the exact term, but it's in the video options. Something like 3x game and 1/3 display) to make the game more visible.

Offline hansimmer

  • Squaddie
  • *
  • Posts: 9
    • View Profile
Re: OS X 10.11 and CPU usage
« Reply #7 on: October 06, 2015, 10:24:34 pm »
Arthanor: Thank you very much for your answer. I disabled the filter, but the look is still the same, as you can see in the attached screenshot. Only difference is, that the frame rate drops to 15. Choosing one of the other filters does not change the fonts either.

I understand the pixel conversion issue and why it can cause more cpu load. I think the retina display or the way the OS handles the resolution is the problem. Sadly, I was not able to fix it. The native resolution is 2560*1600. The OS by default can scale to 1024*640, 1280*800 (which is standard), 1440* 900 and 1680*1050. With a little tool called Retina Displaymenu you have access to all kinds of supported resolutions. I tried setting the display to the native resolution and a few others. The result is always the same: windowed mode is ok, although in 2560*1600 the cpu gets a little hot as well. In fullscreen mode, the temperature goes through the roof (especially in 2560*1600). I always set the game resolution to the system resolution. So in theory, with 1280 system and game resolution, there should be no pixel conversion that can cause that much cpu load. Instead, there should just be pixel doubleing. I guess there must be some kind of scaling going on in the background, that I don't understand - even when set to 1280.

Warboy1982: I found the vsync setting in options.cfg. It was already switched on.

Offline darklord42

  • Sergeant
  • **
  • Posts: 29
    • View Profile
Re: OS X 10.11 and CPU usage
« Reply #8 on: October 17, 2015, 04:14:30 am »
The font issue looks very much like what RedEclipse is suffering.  They said it looks like a driver issue. 
https://redeclipse.net/forum/viewtopic.php?f=7&t=816&sid=544e3d75840d2b81d559315ae24da2fa

Apple also changed their system font, I don't know if that could have possible affected it.

Also I should note, it's nothing to do with high res retina displays, and is a problem with 10.11 in general.  I have the same thing on my my 5 year old laptop with my non retina display 1680x1050x
« Last Edit: October 18, 2015, 03:59:46 pm by darklord42 »

Offline hansimmer

  • Squaddie
  • *
  • Posts: 9
    • View Profile
Re: OS X 10.11 and CPU usage
« Reply #9 on: October 19, 2015, 03:44:05 pm »
darklord42: Thanks for the info. A driver issue makes sense. I still don't have a clue, why the temperature goes up that much in full screen mode. The problem does not exist in other games, for example GZDoom. That one runs in full screen 1440*900 and the temperature stays below 40°C.

Offline darklord42

  • Sergeant
  • **
  • Posts: 29
    • View Profile
Re: OS X 10.11 and CPU usage
« Reply #10 on: October 20, 2015, 07:08:18 am »
As to strange heating increases.  IDK. According to the Activity Monitor, on my 5 year old macbook pro, with 2 I7s,  OpenXCom is using a constant 130% of my CPU.   By comparison, running the original game in Boxer (OSX focused version of dosbox using Cocoa/Objective-C and other OSX technologies) only uses 30-50%.  And that is full on Emulation...  It would explain the heat...   Why does OpenXCom use the CPU so much?   Boxer uses shaders too.. (even much less efficiently then OpenXcom and runs slow.)
« Last Edit: October 20, 2015, 07:26:20 am by darklord42 »

Offline hansimmer

  • Squaddie
  • *
  • Posts: 9
    • View Profile
Re: OS X 10.11 and CPU usage
« Reply #11 on: October 20, 2015, 11:19:36 pm »
Does your CPU get so hot in full screen mode, that it is close to shutting itself down? What happens when you run OpenXcom in window mode? Very little heat increase I guess.

Offline darklord42

  • Sergeant
  • **
  • Posts: 29
    • View Profile
Re: OS X 10.11 and CPU usage
« Reply #12 on: October 21, 2015, 12:22:54 am »
Honestly no, it doesn't seem to be shutting down...  But it does run hot.  (Note: Apple laptops almost always run hot when using the cpu...)  I didn't run it for all that long though..It's not playable as with the font issue, and boxer lets me use coremidi with the timbres of heaven soundfont.
I don't think there is a difference in cpu usage from window to fullscreen. (though it is hard to take a look at the activity monitor while in full screen, i have to go to windowed, alt enter, and look quickly) If I had to guess, I wouldn't think it's rendering...

Offline hansimmer

  • Squaddie
  • *
  • Posts: 9
    • View Profile
Re: OS X 10.11 and CPU usage
« Reply #13 on: October 21, 2015, 10:42:51 pm »
Yes, it is difficult to monitor anything when in fullscreen mode. I use Intel Power Gadget to check temperature, cpu clock and energy consumption in the background.

https://software.intel.com/en-us/articles/intel-power-gadget-20

This is what it looks like, when i switch from windowed mode to fullscreen for 30 seconds and then back to windowed mode. The temperature would have climbed steadily of course if I stayed in fullscreen. I didn't do anything in the game - I just looked at the main menu for 30 seconds. ;)

Driver issue or bug maybe?

Offline darklord42

  • Sergeant
  • **
  • Posts: 29
    • View Profile
Re: OS X 10.11 and CPU usage
« Reply #14 on: October 22, 2015, 05:42:07 am »
Bug certainly.  Xcom shouldn't be this intensive on the CPU... I don't think it's a  driver issue, or it would be the GPU that would be getting cooked, not the CPU, right?