Bug 109171

Summary: AMD's GPU is Slower than Intel's
Product: Mesa Reporter: Sherif <ali.sherif10>
Component: Drivers/Gallium/r600Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED MOVED QA Contact: Default DRI bug account <dri-devel>
Severity: critical    
Priority: medium CC: ali.sherif10
Version: 18.2   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
URL: https://bugzilla.redhat.com/show_bug.cgi?id=1662535
Whiteboard:
i915 platform: i915 features:
Attachments: Xorg log files.
I used something like dmesg | vim.
Output of dmesg.
Output of DRI_PRIME=1 dmesg
Steam output wit Intel's GPU.
Steam output wit AMD's GPU.
glxinfo with(out) DRI_PRIME=1.

Description Sherif 2018-12-29 14:48:00 UTC
glxgears and CS: Go are much slower with AMD's GPU. Performance's much higher with Intel's.

Outputs:
$ glxgears
306 frames in 5.0 seconds = 61.029 FPS
299 frames in 5.0 seconds = 59.761 FPS
299 frames in 5.0 seconds = 59.762 FPS
299 frames in 5.0 seconds = 59.762 FPS
299 frames in 5.0 seconds = 59.762 FPS

$ DRI_PRIME=1 glxgears
304 frames in 5.0 seconds = 60.666 FPS
299 frames in 5.0 seconds = 59.762 FPS
299 frames in 5.0 seconds = 59.762 FPS
299 frames in 5.0 seconds = 59.763 FPS
299 frames in 5.0 seconds = 59.760 FPS

$ vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
32606 frames in 5.0 seconds = 6521.047 FPS
31516 frames in 5.0 seconds = 6302.010 FPS
32145 frames in 5.0 seconds = 6428.891 FPS
31443 frames in 5.0 seconds = 6288.595 FPS
31029 frames in 5.0 seconds = 6205.721 FPS

$ DRI_PRIME=1 vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
12031 frames in 5.0 seconds = 2406.195 FPS
10110 frames in 5.0 seconds = 2021.870 FPS
10122 frames in 5.0 seconds = 2022.474 FPS
9782 frames in 5.0 seconds = 1956.206 FPS
10175 frames in 5.0 seconds = 2034.901 FPS


Laptop: HP Pavilion g6.
AMD's GPU: Radeon HD 7670M.
OS: 64-bit Linux (Fedora 29 KDE Spin).
Comment 1 Sherif 2018-12-29 15:24:45 UTC
CS: Go is faster with Intel's GPU even without vblank_mode=0.
Comment 2 Alex Deucher 2018-12-29 17:27:58 UTC
Please attach your xorg log and dmesg output.  Note that using the dGPU involves extra copies to copy the rendered frame to the integrated GPU for display so there is additional overhead.  You need a relatively advanced 3D game to see an advantage on the dGPU as you have to overcome the overhead of the additional copies.
Comment 3 Sherif 2018-12-29 17:36:04 UTC
Created attachment 142914 [details]
Xorg log files.

I attached all files.
Comment 4 Sherif 2018-12-29 17:37:47 UTC
I reported it in Fedora Bugzilla, also. Please, check.
Comment 5 Sherif 2019-01-03 03:16:50 UTC
Created attachment 142951 [details]
I used something like dmesg | vim.
Comment 6 Sherif 2019-01-03 03:17:30 UTC
Sorry, I didn't pay attention to the dmesg part.
Comment 7 Christian K├Ânig 2019-01-03 08:34:53 UTC
The dmesg is only a fraction. Please provide the full dmesg directly after boot.

That glxgears is getting slower numbers on the secondary GPU is perfectly normal. It is a test how fast we can page flip and not how fast the GPU is.
Comment 8 Sherif 2019-01-03 12:16:16 UTC
Created attachment 142953 [details]
Output of dmesg.
Comment 9 Sherif 2019-01-03 12:16:45 UTC
Created attachment 142954 [details]
Output of DRI_PRIME=1 dmesg
Comment 10 Sherif 2019-01-03 12:25:19 UTC
I restarted, logged into KDE then $ dmesg >> dmesg. After a minute, $ DRI_PRIME=1 dmesg >> dmesg2. Did I do it correctly?

(In reply to Alex Deucher from comment #2)
> You need a relatively advanced 3D game to see an advantage on the dGPU as you
>  have to overcome the overhead of the additional copies.

Counter-Strike: Global Offensive is much slower, when I run Steam with DRI_PRIME=1.

Additional Info:
I installed Steam from RPMFusion.
Comment 11 Sherif 2019-01-03 12:34:24 UTC
Created attachment 142955 [details]
Steam output wit Intel's GPU.
Comment 12 Sherif 2019-01-03 12:34:44 UTC
Created attachment 142956 [details]
Steam output wit AMD's GPU.
Comment 13 Sherif 2019-01-03 12:39:45 UTC
I found that only CS: GO's main GUI is slow with AMD's GPU, but it's much faster during matches. On Intel's GPU, the main GUI's smooth, but there's some lag during matches.
I tried the tutorial only.

On both cases, fullscreen was enabled.
Comment 14 Sherif 2019-01-03 12:42:18 UTC
Note: I played CS: GO during recording Steam's output.
Comment 15 Sherif 2019-01-03 13:36:48 UTC
Created attachment 142957 [details]
glxinfo with(out) DRI_PRIME=1.

This can help.
Comment 16 GitLab Migration User 2019-09-18 19:26:51 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/649.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.