有一个相当奇怪的问题 - 不知道是否有人可以帮忙。我有一台戴尔笔记本电脑,在英特尔芯片上集成了 Iris Plus 显卡,还有专用的 GeForce MX330 NVIDIA 显卡。我正在运行内核版本为 的 Manjaro Linux 5.4.80-2-MANJARO x86_64
。
我已经使用 mhwd 配置了它以使用 PRIME,并且一切似乎都正常工作 - 我分别从和获得了预期的prime-run glxinfo
输出glxinfo
:
[curtispf@curtis-laptop ~]$ prime-run glxinfo | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce MX330/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 455.45.01
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 455.45.01
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 455.45.01
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
[curtispf@curtis-laptop ~]$ glxinfo | grep OpenGL
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) Iris(R) Plus Graphics (ICL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.2.3
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.2.3
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.2.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
问题是,实际上试图完全使用 GPU坦克性能。我并不是说它会影响系统其他部分的性能,我的意思是使用集成显卡比专用显卡好很多!这是我使用集成显卡的 glmark2 结果:
[curtispf@curtis-laptop ~]$ glmark2
=======================================================
glmark2 2014.03
=======================================================
OpenGL Information
GL_VENDOR: Intel
GL_RENDERER: Mesa Intel(R) Iris(R) Plus Graphics (ICL GT2)
GL_VERSION: 4.6 (Compatibility Profile) Mesa 20.2.3
=======================================================
[build] use-vbo=false: FPS: 3721 FrameTime: 0.269 ms
[build] use-vbo=true: FPS: 5274 FrameTime: 0.190 ms
[texture] texture-filter=nearest: FPS: 4558 FrameTime: 0.219 ms
[texture] texture-filter=linear: FPS: 4587 FrameTime: 0.218 ms
[texture] texture-filter=mipmap: FPS: 3408 FrameTime: 0.293 ms
[shading] shading=gouraud: FPS: 3938 FrameTime: 0.254 ms
[shading] shading=blinn-phong-inf: FPS: 3823 FrameTime: 0.262 ms
[shading] shading=phong: FPS: 3612 FrameTime: 0.277 ms
[shading] shading=cel: FPS: 3730 FrameTime: 0.268 ms
[bump] bump-render=high-poly: FPS: 2073 FrameTime: 0.482 ms
[bump] bump-render=normals: FPS: 4742 FrameTime: 0.211 ms
[bump] bump-render=height: FPS: 4509 FrameTime: 0.222 ms
libpng warning: iCCP: known incorrect sRGB profile
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 3076 FrameTime: 0.325 ms
libpng warning: iCCP: known incorrect sRGB profile
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 1878 FrameTime: 0.532 ms
[pulsar] light=false:quads=5:texture=false: FPS: 3621 FrameTime: 0.276 ms
libpng warning: iCCP: known incorrect sRGB profile
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 1535 FrameTime: 0.651 ms
libpng warning: iCCP: known incorrect sRGB profile
[desktop] effect=shadow:windows=4: FPS: 2340 FrameTime: 0.427 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 1146 FrameTime: 0.873 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 902 FrameTime: 1.109 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 1228 FrameTime: 0.814 ms
[ideas] speed=duration: FPS: 3037 FrameTime: 0.329 ms
[jellyfish] <default>: FPS: 2723 FrameTime: 0.367 ms
[terrain] <default>: FPS: 247 FrameTime: 4.049 ms
[shadow] <default>: FPS: 655 FrameTime: 1.527 ms
[refract] <default>: FPS: 401 FrameTime: 2.494 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 3578 FrameTime: 0.279 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 3476 FrameTime: 0.288 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 3889 FrameTime: 0.257 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 3676 FrameTime: 0.272 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 3694 FrameTime: 0.271 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 3815 FrameTime: 0.262 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 3659 FrameTime: 0.273 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 3875 FrameTime: 0.258 ms
=======================================================
glmark2 Score: 3043
=======================================================
以下是通过以下方式调用的 NVIDIA 卡prime-run
:
[curtispf@curtis-laptop ~]$ prime-run glmark2
=======================================================
glmark2 2014.03
=======================================================
OpenGL Information
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: GeForce MX330/PCIe/SSE2
GL_VERSION: 4.6.0 NVIDIA 455.45.01
=======================================================
[build] use-vbo=false: FPS: 585 FrameTime: 1.709 ms
[build] use-vbo=true: FPS: 713 FrameTime: 1.403 ms
[texture] texture-filter=nearest: FPS: 712 FrameTime: 1.404 ms
[texture] texture-filter=linear: FPS: 708 FrameTime: 1.412 ms
[texture] texture-filter=mipmap: FPS: 711 FrameTime: 1.406 ms
[shading] shading=gouraud: FPS: 717 FrameTime: 1.395 ms
[shading] shading=blinn-phong-inf: FPS: 706 FrameTime: 1.416 ms
[shading] shading=phong: FPS: 702 FrameTime: 1.425 ms
[shading] shading=cel: FPS: 710 FrameTime: 1.408 ms
[bump] bump-render=high-poly: FPS: 674 FrameTime: 1.484 ms
[bump] bump-render=normals: FPS: 720 FrameTime: 1.389 ms
[bump] bump-render=height: FPS: 724 FrameTime: 1.381 ms
libpng warning: iCCP: known incorrect sRGB profile
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 691 FrameTime: 1.447 ms
libpng warning: iCCP: known incorrect sRGB profile
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 632 FrameTime: 1.582 ms
[pulsar] light=false:quads=5:texture=false: FPS: 709 FrameTime: 1.410 ms
libpng warning: iCCP: known incorrect sRGB profile
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 598 FrameTime: 1.672 ms
libpng warning: iCCP: known incorrect sRGB profile
[desktop] effect=shadow:windows=4: FPS: 643 FrameTime: 1.555 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 417 FrameTime: 2.398 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 519 FrameTime: 1.927 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 413 FrameTime: 2.421 ms
[ideas] speed=duration: FPS: 691 FrameTime: 1.447 ms
[jellyfish] <default>: FPS: 671 FrameTime: 1.490 ms
[terrain] <default>: FPS: 301 FrameTime: 3.322 ms
[shadow] <default>: FPS: 689 FrameTime: 1.451 ms
[refract] <default>: FPS: 461 FrameTime: 2.169 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 722 FrameTime: 1.385 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 709 FrameTime: 1.410 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 714 FrameTime: 1.401 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 724 FrameTime: 1.381 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 705 FrameTime: 1.418 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 718 FrameTime: 1.393 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 718 FrameTime: 1.393 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 716 FrameTime: 1.397 ms
=======================================================
glmark2 Score: 652
=======================================================
不用说,这些分数不应该是这样的!当我使用prime-run
调用版本时,我可以听到风扇疯狂转动的声音,并且 GPU 会根据 变热psensor
,但性能似乎没有显示任何这些好处...我不明白 :(
根据报告,GPU 温度从未超过 80C psensor
,因此我认为它没有节流 - 而且我不是图形专家,因此我不确定如何解决此问题。有人可以提供任何建议吗?
谢谢你!
答案1
这个答案是基于一些猜测,但提出了为什么会出现这种情况的原因
glmark2 测试的简单性可能是双 GPU(集成/专用)设计实际上损害性能而不是帮助性能的情况之一。
对于具有专用卡的“普通”计算机,显示器通常连接到专用卡,并且该卡将帧渲染到帧缓冲区中,然后将图像输出到显示器本身。
在配备双显卡的笔记本电脑中,专用卡没有专用的显示输出。它渲染到帧缓冲区,但该帧缓冲区必须通过 PCIe 复制到系统 RAM,然后集成显卡才能输出到显示器。
我看到这样一种情况:在一些高度简化的测试中,两张卡都能够输出高帧速率,而瓶颈很可能是帧缓冲区复制。
您的英特尔显卡显然性能强大,而且 MX330 可能更好,但您可能需要进行更“严格”的测试,以免帧缓冲区复制成为真正的瓶颈。
少数测试中帧率似乎没有“限制”在 700FPS 左右,[terrain]
其中一个测试得分为 250FPS,另一个为 300FPS。这些测试很可能受到 CPU 限制。
快速计算
1920 * 1080 * 4 (= 4 bytes / 32 bits per pixel) * 700 (FPS) = 5.8GB/s = 46 Gb/s
如果你有全高清屏幕,你正在推送大约 5.8GB/s纯的屏幕数据通过总线传输。因此,取决于专用 GPU 有多少 PCIe 通道可能会影响峰值帧速率,请记住,CPU 还将使用系统 RAM 来运行程序和发送数据到专用 GPU。
欲了解详情,x16 的 PCIe v3 链路能够达到约 16GB/s,而 x8 链路能够达到约 8GB/s,这与您看到的情况有点相关。您可以使用GPU-z了解你的专用 GPU 的运行速度。
我建议尝试一个更严格的基准,该基准可能可以达到数百 FPS 而不是数千 FPS,这样 PCIe 带宽肯定不是问题。