Jump to content


Photo
- - - - -

Updated - Unity 5 - Poor performance under Linux (Intel?)

Linux Wine Performance

  • Please log in to reply
9 replies to this topic

#1 jlddodger

jlddodger

    Arcadia Native

  • Vestrum
  • PipPipPip
  • 228 posts
  • LocationLincoln, NE USA

Posted 19 December 2015 - 04:12

With the release of the Unity 5 version of DFC, the performance of the game under Linux seems to have slipped.  The difference is profound enough that at lowest settings I can barely make Book 4 playable, but playable it was (phew!).

 

For reference, here are my specs:

OS: Linux Mint 17.3

Kernel: 4.2.0-19-generic

CPU: Intel Core i7 4790K

RAM: 8GB (I cannot remember the timings right now)

Disk: Mechanical hard drive

Graphics: Intel HD Graphics 4600 (i915 driver, proprietary driver built into kernel)

... did I forget something important

 

The funny thing is that the game plays pretty well (read: "wayyyy better") under Wine, which should be slower since it is going through the compatibility layer and is also 32-bit.  I am uploading a couple videos to YouTube that show the significant difference in performance.  I'll update this post with links.

 

Could it be that there is a different effect being used in the Linux build that is slower or something like that.  I can use Wine for now going forward, but it's just odd.

 

So if you are running Linux and your performance has dropped, give Wine a try and see how you fare.  And let us know in this thread, so we can try to figure it out.

 

Video 1 - Just the menu

Native:

https://youtu.be/fFN6m4zShKY

 

Wine:

https://youtu.be/5fIIVqSlDZY

 

Video 2 - Spoilers?!



#2 robertc

robertc

    Arcadia Native

  • Member
  • PipPipPip
  • 243 posts
  • LocationLondon, United Kingdom

Posted 21 December 2015 - 19:36

i915 driver, proprietary driver built into kernel


There's no such thing as a proprietary Intel graphics driver on Linux, they're all open source.

Do you know what version of Mesa you have? On regular Ubuntu you can use the xorg-edgers PPA to upgrade to the latest Mesa/OpenGL stack, this should improve the performance across all open source drivers.  From a bit of Googling it seems you can use this PPA with Mint but I have no idea about the details, if you're on a Mint specific forum they might be able to give you further advice.



#3 jlddodger

jlddodger

    Arcadia Native

  • Vestrum
  • PipPipPip
  • 228 posts
  • LocationLincoln, NE USA

Posted 21 December 2015 - 20:12

I apologize for the confusion.  When I said that the driver was proprietary, I meant that it was provided by Intel and it was not a third-party or "lesser" driver.

 

I do subscribe to xorg-edgers and I am on the latest provided by that for Linux Mint 17.3 (which is probably still only the latest for Ubuntu 14.04 (14.04.3?)).

 

I did look at the Mesa version earlier but I'll have to wait until I get home to update my post with that number.

 

That notwithstanding, why would a Native program be worse off than one running through Wine on the same machine (with the same driver).

 

Thank you for your reply!



#4 robertc

robertc

    Arcadia Native

  • Member
  • PipPipPip
  • 243 posts
  • LocationLondon, United Kingdom

Posted 22 December 2015 - 01:34

That notwithstanding, why would a Native program be worse off than one running through Wine on the same machine (with the same driver).

 

Mostly because the WINE devs are better at writing a D3D9 to OpenGL translation layer than the Unity devs are at writing an OpenGL renderer.  Windows is still the focus for optimisation work, understandably given the much larger market share, but we will probably continue to see this sort of issue for Linux games until Vulkan becomes the API of choice.

 

For me, on an Nvidia card, most games are 'fast enough' to play natively so I do.  For you, the Mesa stack is improving all the time so it may be you'll see improvements there in the future, and I expect the Unity 5 engine performance will improve on Linux with each release too.



#5 jlddodger

jlddodger

    Arcadia Native

  • Vestrum
  • PipPipPip
  • 228 posts
  • LocationLincoln, NE USA

Posted 22 December 2015 - 03:04

Okay, thanks.  I guess that makes sense if Unity on Windows is hitting DirectX instead of going straight to OpenGL.

 

My Mesa version: 3.0 Mesa 11.0.4

 

Thanks!



#6 robertc

robertc

    Arcadia Native

  • Member
  • PipPipPip
  • 243 posts
  • LocationLondon, United Kingdom

Posted 22 December 2015 - 14:00

Note that some other folk seem to have had the same issue, you might want to follow that thread for updates.



#7 Mithrandir

Mithrandir

    Rubber Ducky

  • Minstrum
  • Pip
  • 1 posts

Posted 06 January 2016 - 16:09

I have the same issues since update to the latest version. The game runs flawlessly under Windows with 'awesome' video setting. Under Ubuntu 14.04 with hardware as following and with the latest nVidia binary driver (352.63) I have to switch to 'medium' for a suitable frame rate.

 

Kernel: 3.13.0-74-generic

CPU: AMD FX-8350 Eight-Core Processor

RAM: 8 GB

Disk: SSD (system), SATA (user data)

Graphics: GeForce GTX 460



#8 Morten

Morten

    RTG Programmer

  • RTG Staff
  • 1061 posts
  • LocationOslo, Norway

Posted 06 January 2016 - 17:34

I'm guessing that the game runs better under Wine or Windows because it will then most likely utilize DirectX instead of OpenGL.

The OpenGL core in the Unity version we're currently using is still pretty old (OpenGL 2.1), and is only single-threaded (I think they upgraded it to be dual-threaded some time ago, but I'm not quite sure on the specifics as to what are utilized in the version we've built the game with).

Unity recently released 5.3 with a huge update to the OpenGL core. They've upgraded to utilize OpenGL 4.x now, which has full multi-threading support. This means it will probably (hopefully?) get better for those of you that are having issues now, but it will of course take us some time to make sure everything is in order before releasing a new patch of the game with the update to Unity. Testing and whatnot.. 

 

DirectX in Unity 5 currently has support for multi-threading, so that's most likely the reason for the better Wine/Windows results, as the game will switch to using DirectX instead.

 

Still I think it's pretty weird that we're still seeing a lot of differences in performance among Linux users. We've tested ourselves with both budget- and high-end Nvidia/AMD cards, and we've had mostly good (expected) results as far as performance goes on those hardware setups.

 

So that said, I don't know at this point if it's only the fact that OpenGL 2.1 is used that is the cause for the performance issues on Linux, or if something else is also playing a part here. But I would think that the OpenGL core upgrade in Unity 5.3 will play a major role in increasing performance for those of you that are currently having problems. :)

 

Hope that helps a bit. I'm sorry that I haven't been too up-to-date on this subject so far. 


  • khh likes this

Red Thread Games PR0grammer & Naturally Selected Part-Time "Keep Track of Forum"-person / Community Overseer


#9 robertc

robertc

    Arcadia Native

  • Member
  • PipPipPip
  • 243 posts
  • LocationLondon, United Kingdom

Posted 07 January 2016 - 12:44

Unity recently released 5.3 with a huge update to the OpenGL core. They've upgraded to utilize OpenGL 4.x now, which has full multi-threading support. This means it will probably (hopefully?) get better for those of you that are having issues now, but it will of course take us some time to make sure everything is in order before releasing a new patch of the game with the update to Unity. Testing and whatnot..

 
If you need any help with that don't be afraid to ask :)

So that said, I don't know at this point if it's only the fact that OpenGL 2.1 is used that is the cause for the performance issues on Linux, or if something else is also playing a part here.


Now that Unity has a Linux version of the editor that should allow you to do some proper debugging/profiling?
  • Morten likes this

#10 Morten

Morten

    RTG Programmer

  • RTG Staff
  • 1061 posts
  • LocationOslo, Norway

Posted 07 January 2016 - 14:10

 Now that Unity has a Linux version of the editor that should allow you to do some proper debugging/profiling?

Yeah, it gives us the possibility to perform more in-depth tests for sure. :)

 

I'd imagine that we'd maybe upload a test version to the beta branch on Steam for testing a couple of days before publicly launching the U5.3 patch. We'll surely post some updates about it when that time comes. :)


  • khh and robertc like this

Red Thread Games PR0grammer & Naturally Selected Part-Time "Keep Track of Forum"-person / Community Overseer






Also tagged with one or more of these keywords: Linux, Wine, Performance

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users