You are not logged in.

#1 2017-09-09 18:49:51

bade
Member
Registered: 2015-11-08
Posts: 19

Glxgears low FPS for hybrid graphics

Hi,

I've installed Arch with GNOME3. Problem is that glxgears gives me low FPS for both of my graphics.
I had the same problem on previous Mint installation and got it fixed with installing proprietary drivers.
I ran the GNOME3 both as Wayland and Xorg sessions and the result is the same.
I have Radeon HD8760 on my notebook.

I've installed following packages:
xf86-video-ati (as stated in https://wiki.archlinux.org/index.php/
xf86-video-nouveau (as stated in https://wiki.archlinux.org/index.php/PRIME)
xf86-video-amdgpu (PRIME)
xf86-video-intel (PRIME)
and some dependency packages related to those (like mesa)

When I'm logged through Xorg session, I have these outputs:

$ lspci -vnnn | perl -lne 'print if /^\d+\:.+(\[\S+\:\S+\])/' | grep VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller [8086:0416] (rev 06) (prog-if 00 [VGA controller])
$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x67 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 4 outputs: 4 associated providers: 1 name:Intel
Provider 1: id: 0x3f cap: 0xd, Source Output, Source Offload, Sink Offload crtcs: 0 outputs: 0 associated providers: 1 name:HAINAN @ pci:0000:01:00.0

I've set the GPU offloading (whatever thath means big_smile )

$ xrandr --setprovideroffloadsink 1 0

And then:

$ DRI_PRIME=1 glxinfo | grep "OpenGL renderer"
OpenGL renderer string: Gallium 0.4 on AMD HAINAN (DRM 2.50.0 / 4.12.10-1-ARCH, LLVM 4.0.1)
$ DRI_PRIME=1 glxgears
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
331 frames in 5.0 seconds = 66.091 FPS
301 frames in 5.0 seconds = 60.041 FPS

Is there any way to make this work since glxgears was giving me ~5000 FPS on Mint ?

Thank you in advance,
bade

Offline

#2 2017-09-09 19:28:06

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: Glxgears low FPS for hybrid graphics

Read your output

That which you posted wrote:

Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.

Edit:  Hint:

ewaller@turing ~/devel/python [16]1070 %glxgears              
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
304 frames in 5.0 seconds = 60.785 FPS
301 frames in 5.0 seconds = 60.052 FPS
^C
ewaller@turing ~/devel/python [130]1071 %vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
7157 frames in 5.0 seconds = 1431.295 FPS
6744 frames in 5.0 seconds = 1348.737 FPS
6615 frames in 5.0 seconds = 1322.872 FPS
^C
ewaller@turing ~/devel/python [130]1072 %

But, don't use glxgears as a benchmark.  It isn't one.

Last edited by ewaller (2017-09-09 19:33:19)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 2017-09-09 19:46:31

bade
Member
Registered: 2015-11-08
Posts: 19

Re: Glxgears low FPS for hybrid graphics

Oh, I see. So this is because vsync is turned on by default?
It says on wiki that this "is perfectly fine except for benchmarking". Does that mean that my driver is working fine? Does GPU switching works when needed?
If it is better to be turned on, where should I add it (both for Xorg and Wayland) to be set on boot?

Thanks

Offline

#4 2017-09-09 20:03:44

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: Glxgears low FPS for hybrid graphics

I have a feeling it is fine.  In my second example, I showed how to turn it off for a given run of glxgears; just set the vblank_mode variable to zero before running glxgears.  See what you get.
As to GPU switching, I am not a gamer and have consciously stuck with single GPU Intel systems to avoid the drama surround nVIDIA and AMD.  I am not the one to ask about hybrid graphics.

Even though you may see dramatic frame rate increases by doing this, allow me to to reiterate that glxgears should not be used as a benchmark.  See this: http://wiki.cchtml.com/index.php/Glxgea … _Benchmark


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#5 2017-09-09 20:33:08

bade
Member
Registered: 2015-11-08
Posts: 19

Re: Glxgears low FPS for hybrid graphics

Ok, so I downloaded gtkperf and ran the tests with every combination of DRI_PRIME=1/0 and vblank_mode=0/1.
Actually there's no difference.
I ran the glxgears with vblank_mode=0 and got ~7000 FPS, but I could see the frames tearing.

What I did see in gtkperf is that Xorg is almost twice as faster then Wayland. So I guess I'm leaving everything as it is and using Xorg session.

Thank you for clarification!

Offline

#6 2017-09-09 20:49:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,877

Re: Glxgears low FPS for hybrid graphics

because gtkperf on wayland runs on xwayland ...

what are you trying to do? are you aware that wayland so far does not support hybrid graphics?

Offline

#7 2017-09-09 21:02:58

bade
Member
Registered: 2015-11-08
Posts: 19

Re: Glxgears low FPS for hybrid graphics

Oh, I see...
I wasn't aware of that. I only was not sure if I use the GPU at all. I tried to install Ubuntu GNOME the other day and I think it was using CPU for rendering and made my notebook hot.

Anyway, I am happy now. Will leave it this way.
Thanks!

Offline

Board footer

Powered by FluxBB