Hello, I'm seeing a much worse performance on Ubuntu 18.04 with an Nvidia 1070 and i3770k @4.5GHz and the latest stable drivers. To the point that MGS2 runs at down to 50% or 60% in many scenes.
The bottleneck is clearly when running in OpenGL Hardware mode and it slows down even when running at default resolution with every performance heavy option turned down.
This is with the stable 1.4.0 version and with the latest build of 1.5.0, also tried the different SSE4 AVX versions of the GS plugin with more or less same results.
On the other hand, I've tried the latest stable Windows version and using OpenGL I see no slowdown at all. Which is weird since I read everywhere that the Linux performance issues were in because the OpenGL renderer is slower than the DirectX one, but there also seems to be that the OpenGL renderer runs much worse on Linux.
Is this a known issue? If not, what' s the best way to debug this?
I've been playing with NVIDIA Linux Graphics Debugger and found out that, weirdly, the sum of CPU and GPU times gone in OpenGL calls are lower in Linux. This is for both OSs with the 1.4.0 stable build.
Linux calls:
Code:
Description count(1) CPU_AVG GPU_AVG CPU_SUM GPU_SUM
void glDepthFunc() 2 0.64 0.0 1.28 0.0
void glBindSampler() 2 0.9 0.0 1.8 0.0
void glScissor() 2 1.035 0.0 2.07 0.0
GLenum glClientWaitSync() = GL_ALREADY_SIGNALED 3 0.743333333333 0.0 2.23 0.0
void glViewport() 2 1.405 0.0 2.81 0.0
void glDrawArrays() 2 3.745 59.725 7.49 119.45
void glDeleteSync() 3 2.80333333333 0.0 8.41 0.0
void glFramebufferTexture2D() 4 8.585 0.0 34.34 0.0
void glBindFramebuffer() 2 30.44 0.0 60.88 0.0
void glClearBufferfv() 2 30.645 4.605 61.29 9.21
GLsync glFenceSync() = 4 1 65.95 0.0 65.95 0.0
GLsync glFenceSync() = 5 1 66.39 0.0 66.39 0.0
GLsync glFenceSync() = 14 1 72.46 0.0 72.46 0.0
void glDisable() 150 0.939533333333 0.0 140.93 0.0
void glEnable() 150 1.06993333333 0.0 160.49 0.0
void glPixelStorei() 339 0.616784660767 0.0 209.09 0.0
void glXSwapBuffers() 1 249.68 437.41 249.68 437.41
void glBlendEquationSeparateiARB() 276 1.47894927536 0.0 408.19 0.0
void glBlendFuncSeparateiARB() 399 1.23939849624 0.0 494.52 0.0
void glDepthMask() 4334 0.145401476696 0.0 630.17 0.0
void glBindBuffer() 678 1.06561946903 0.0 722.49 0.0
void glBindTextureUnit() 2625 1.62125333333 0.0 4255.79 0.0
void glFlushMappedBufferRange() 6017 0.838367957454 0.0 5044.46 0.0
void glTextureSubImage2D() 339 23.6576696165 0.0 8019.95 0.0
void glBufferSubData() 2622 3.81310450038 0.0 9997.96 0.0
void glUseProgramStages() 4577 4.31800524361 0.0 19763.51 0.0
void glDrawElementsBaseVertex() 5028 6.19457637232 15.277283214 31146.33 76814.18
CPU_SUM GPU_SUM
81630.96 77380.25
Windows Calls:
Code:
Description count(1) CPU_AVG GPU_AVG CPU_SUM GPU_SUM
GLenum glClientWaitSync() = GL_ALREADY_SIGNALED 2 0.435 0.0 0.87 0.0
void glDepthFunc() 2 0.58 0.0 1.16 0.0
void glScissor() 2 0.875 0.0 1.75 0.0
void glViewport() 2 1.315 0.0 2.63 0.0
void glBindSampler() 3 1.07333333333 0.0 3.22 0.0
void glDrawArrays() 2 4.825 57.315 9.65 114.63
void glDeleteSync() 2 8.485 0.0 16.97 0.0
GLsync glFenceSync() = 13 1 38.91 0.0 38.91 0.0
GLsync glFenceSync() = 6 1 44.47 0.0 44.47 0.0
void glFramebufferTexture2D() 4 11.4825 0.0 45.93 0.0
void glClearBufferfv() 2 34.23 4.065 68.46 8.13
void glBlendFuncSeparateiARB() 236 0.786694915254 0.0 185.66 0.0
BOOL SwapBuffers() = 1 1 189.0 186.14 189.0 186.14
void glBlendEquationSeparateiARB() 228 0.869473684211 0.0 198.24 0.0
void glEnable() 269 0.773345724907 0.0 208.03 0.0
void glDisable() 269 0.80750929368 0.0 217.22 0.0
void glPixelStorei() 348 0.671781609195 0.0 233.78 0.0
void glDepthMask() 4384 0.13389370438 0.0 586.99 0.0
void glBindBuffer() 696 0.954482758621 0.0 664.32 0.0
void glBindFramebuffer() 2 355.47 0.0 710.94 0.0
void glTextureBarrier() 4094 0.584763067904 0.0 2394.02 0.0
void glFlushMappedBufferRange() 6138 0.644356467905 0.0 3955.06 0.0
void glBindTextureUnit() 2672 1.53098053892 0.0 4090.78 0.0
void glTextureSubImage2D() 348 17.8532183908 0.0 6212.92 0.0
void glUseProgramStages() 4643 3.47866250269 0.0 16151.43 0.0
void glBufferSubData() 2669 6.92025852379 0.0 18470.17 0.0
void glDrawElementsBaseVertex() 8943 4.71125684893 13.857954825 42132.77 123931.69
CPU_SUM GPU_SUM
96835.35 124240.59
It's my first time profiling OpenGL apps so I might be missing something.
I’m using PCSX2 v1.4.0 with an ROG Strix RX480 8GB with Mesa 18.0.4 and Kernel 4.16.13 on Manjaro 17.1.10 and works flawlessly,maybe Ubuntu 18.04 has some bugs that’s the reason why I prefer Arch Linux Based Distro.
If you want you can install Manjaro 17.1.10 or Arch Linux and compare the performance.
But I recommend Manjaro because is more easier to use.
One thing to consider here is what kind of drivers are you using. Nouveau? Nvidia proprietary? Mesa?
@PS2Linx, I'm not yet willing to install another distro since everything else (also GPU demanding games from Steam) works fine. There is no signal that it's something from the distro thats problematic
@pandubz, I'm using the proprietary NVidia drivers. As of today, the latest ones (available in the semi official ppa, 396.24) I've also tried with the ones in the ubuntu repo, 390.xx with the same result.
Playing with NVidia Graphics Debugger I isolated all the OpenGL calls to render a frame from MGS2 that is particularly slow, modified the code to print the time it took to render the frame and in my case it takes around 0.039 ms. When for achieving the 50FPS (it's the PAL version) you need at most 0.02 ms.
I leave you a link for the source. It would be great if you can compile and test for yourselves if you want, so we know if it's just me of a more generalized issue:
https://drive.google.com/file/d/1D3pFu22...sp=sharing
The code is compiled with just calling "make" and then executing the binary ./out/PCSX2__2018_05_28__23_02_47
Timestamps are printed periodically on the console