Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Poor performance with games
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gamers & Players
View previous topic :: View next topic  
Author Message
Elaman
n00b
n00b


Joined: 28 Jul 2016
Posts: 32

PostPosted: Tue Sep 13, 2016 4:51 pm    Post subject: Poor performance with games Reply with quote

I am quite a beginner with gentoo so this might as well be really simple things missing.

Let this output from xonotic serve as example:

Code:
xonotic-glx -benchmark demos/the-big-keybench 2>&1 | egrep -e '[0-9]+ frames'
319 frames 51.2171841 seconds 6.2283783 fps, one-second fps min/avg/max: 4 7 9 (10 seconds)


At these fps the game is hardly playable.

I have an intel core i7 laptop with Radeon R7 M370 graphics card. I am using the amdgpu drivers.

(/etc/portage/make.conf:)
Code:
VIDEO_CARDS="amdgpu radeonsi"


I am using KDE plasma. My profile (from "eselect profile list") is:
"default/linux/amd64/13.0/desktop/plasma"
Back to top
View user's profile Send private message
stqn
n00b
n00b


Joined: 07 Apr 2015
Posts: 51

PostPosted: Wed Sep 14, 2016 1:11 am    Post subject: Reply with quote

Since you’re on a laptop with an i7 and an AMD GPU, I guess this is one of these dual GPU laptops… Are you sure you’re using the AMD GPU and not the Intel GPU? What does glxinfo say?

For dual-GPU laptops with Nvidia GPUs, there is primusrun or bumblebee that lets you use the secondary GPU, but I don’t know what you should use for AMD GPUs.
Back to top
View user's profile Send private message
fturco
Veteran
Veteran


Joined: 08 Dec 2010
Posts: 1181
Location: Italy

PostPosted: Wed Sep 14, 2016 11:11 am    Post subject: Reply with quote

@Elaman: please make sure you read this wiki article; perhaps your user is not in the "video" group...
Back to top
View user's profile Send private message
Elaman
n00b
n00b


Joined: 28 Jul 2016
Posts: 32

PostPosted: Wed Sep 14, 2016 7:19 pm    Post subject: Reply with quote

Quote:
please make sure you read this wiki article

The wiki article helped. There is one part that I don't have configured:
file: /etc/X11/xorg.conf.d/10-dri.conf
Code:
Section "Device"
  Driver "radeon"
EndSection
Section "dri"
  Mode 0666
EndSection

Because xorg would give me the following error:
Code:
Parse error on line 3 of section Device in file /etc/X11/xorg.conf.d/10-dri.conf
        This section must have an Identifier line.


- The drivers package is installed: "x11-drivers/xf86-video-amdgpu"
Quote:
perhaps your user is not in the "video" group...

- The user is in the "video" group.
Quote:
Since you’re on a laptop with an i7 and an AMD GPU, I guess this is one of these dual GPU laptops…

- Yes, it is a dual GPU laptop.
Quote:
What does glxinfo say?

Code:
glxinfo | grep rendering
direct rendering: Yes
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3150

PostPosted: Wed Sep 14, 2016 8:54 pm    Post subject: Reply with quote

Just a quick remark, direct rendering: yes is not accurate anymore, and completely useless with dual gpu. Check out this example:
Quote:

glxinfo | grep render
direct rendering: Yes
GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
OpenGL renderer string: Gallium 0.4 on AMD SUMO (DRM 2.43.0, LLVM 3.7.1)
GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
GL_NV_conditional_render, GL_NV_depth_clamp, GL_NV_packed_depth_stencil,
GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
GL_NV_conditional_render, GL_NV_depth_clamp, GL_NV_fog_distance,
GL_OES_fbo_render_mipmap, GL_OES_get_program_binary, GL_OES_mapbuffer,
Back to top
View user's profile Send private message
fturco
Veteran
Veteran


Joined: 08 Dec 2010
Posts: 1181
Location: Italy

PostPosted: Thu Sep 15, 2016 8:57 am    Post subject: Reply with quote

The following Gentoo wiki articles may help too:
Please note that I don't have a Radeon card and that I haven't read those articles myself.
Back to top
View user's profile Send private message
Elaman
n00b
n00b


Joined: 28 Jul 2016
Posts: 32

PostPosted: Thu Sep 15, 2016 3:18 pm    Post subject: Reply with quote

Quote:
Just a quick remark, direct rendering: yes is not accurate anymore


Good point. In any case I already know that I don't have DRI in use, since introducing the following config file:
( /etc/X11/xorg.conf.d/10-dri.conf )

Code:

Section "Device"
  Driver "radeon"
EndSection
Section "dri"
  Mode 0666
EndSection


Resulted in the error:

Code:
Parse error on line 3 of section Device in file /etc/X11/xorg.conf.d/10-dri.conf
        This section must have an Identifier line.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Thu Sep 15, 2016 3:47 pm    Post subject: Reply with quote

Looks like that wiki page is totally wrong. That config file would be placebo if it worked, and what it does have is incorrect for your video card anyway.
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Thu Sep 15, 2016 4:16 pm    Post subject: Reply with quote

To have a complete Section Device the Identifier name must be unique
Code:
Section "Device"
Identifier "Radeon"
Driver "radeon"
EndSection


When a user is in the video group, the Section "dri" is facultative for him because being in the video group give read and write permissions. mode 0666 set the read and write permissions globally for all users even if they are not in the video group.

I think it is better to use the video group per user then the Section "dri" to set users permissions on Direct Rendering Infrastructure. Have-you try to use only the default Xorg configuration without any Xorg personnalisation?
_________________
Paul
Back to top
View user's profile Send private message
Elaman
n00b
n00b


Joined: 28 Jul 2016
Posts: 32

PostPosted: Thu Sep 15, 2016 5:02 pm    Post subject: Reply with quote

Quote:
Have-you try to use only the default Xorg configuration without any Xorg personnalisation?

Yes. This is what I get from glxinfo if I do that:
Code:

glxinfo | grep render
direct rendering: Yes
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.7, 256 bits)
    GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
    GL_NV_conditional_render, GL_NV_depth_clamp, GL_NV_packed_depth_stencil,
    GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
    GL_NV_blend_square, GL_NV_conditional_render, GL_NV_depth_clamp,
    GL_OES_fbo_render_mipmap, GL_OES_get_program_binary, GL_OES_mapbuffer,


So, as expected, no DRM there.

I tried now the following configuration file:

Code:
Section "Device"
        Identifier "AMDGPU"
        Driver "amdgpu"
EndSection
#Section "dri"
#     Mode 0666
# EndSection


For which I get the following error (I attach part of the xorg log):

Code:
[    51.795] (II) LoadModule: "amdgpu"
[    51.795] (II) Loading /usr/lib64/xorg/modules/drivers/amdgpu_drv.so
[    51.795] (II) Module amdgpu: vendor="X.Org Foundation"
[    51.795]    compiled for 1.17.4, module version = 0.0.1
[    51.795]    Module class: X.Org Video Driver
[    51.795]    ABI class: X.Org Video Driver, version 19.0
[    51.795] (II) AMDGPU: Driver for AMD Radeon chipsets: BONAIRE, BONAIRE, BONAIRE,
   BONAIRE, BONAIRE, BONAIRE, BONAIRE, BONAIRE, BONAIRE, KABINI, KABINI,
   KABINI, KABINI, KABINI, KABINI, KABINI, KABINI, KABINI, KABINI,
   KABINI, KABINI, KABINI, KABINI, KABINI, KABINI, KAVERI, KAVERI,
   KAVERI, KAVERI, KAVERI, KAVERI, KAVERI, KAVERI, KAVERI, KAVERI,
   KAVERI, KAVERI, KAVERI, KAVERI, KAVERI, KAVERI, KAVERI, KAVERI,
   KAVERI, KAVERI, KAVERI, HAWAII, HAWAII, HAWAII, HAWAII, HAWAII,
   HAWAII, HAWAII, HAWAII, HAWAII, HAWAII, HAWAII, HAWAII, TOPAZ, TOPAZ,
   TOPAZ, TOPAZ, TOPAZ, TONGA, TONGA, TONGA, TONGA, TONGA, TONGA, TONGA,
   TONGA, TONGA, CARRIZO, CARRIZO, CARRIZO, CARRIZO, CARRIZO, FIJI
[    51.796] (--) using VT number 7

[    51.800] (EE) No devices detected.
[    51.800] (EE)
Fatal server error:
[    51.800] (EE) no screens found(EE)
[    51.800] (EE)
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Thu Sep 15, 2016 5:48 pm    Post subject: Reply with quote

Have a look to /var/log/Xorg.0.log when you start X without any customisation. Check which module driver Xorg use by default. It may not be amdgpu. Like fturco, I have not an Amd/ati video card and I never ever use amdgpu, only radeon and fglrx several years ago.

How have-you compile the Linux kernel for video support? Which video support have-you enable? Have-you compile them in the kernel image itself or in modules? A lot of video drivers like amdgpu need to have all the firmware files they need in the Linux image itself if the video support have been compile in the kernel image [y].

If the support is compile in module and you use an initramfs, both amdgpu and the firmware files need to be in the initramfs.

Is all the firmware files the amdgpu need are installed? Check the dmesg command output to see if Linux complain about amdgpu missing firmware files. A command like
Code:
dmesg | grep -i -e amd -e drm -e firm -e micro

should tell you which firmwares and microcodes the Linux kernel use and miss. To work on Xorg side, amdgpu must work on the Linux side first.
_________________
Paul
Back to top
View user's profile Send private message
rh
n00b
n00b


Joined: 19 Sep 2006
Posts: 58

PostPosted: Sat Sep 17, 2016 4:35 am    Post subject: Re: Poor performance with games Reply with quote

Elaman wrote:
I have an intel core i7 laptop with Radeon R7 M370 graphics card. I am using the amdgpu drivers.


I would guess your issue is that
1. your GPU isn't yet supported (yet) by amdgpu driver, use radeon insted
2. your have a dual-gpu setup, and your display is connected to intel GPU

Running lspci or googling your laptop model could give an answer. You also could enable support for radeon and intel graphics and see if that helps, doing it will not do any harm. Just remove any xorg configuration files you made, X should pick the right driver for you.
Back to top
View user's profile Send private message
Elaman
n00b
n00b


Joined: 28 Jul 2016
Posts: 32

PostPosted: Sat Sep 24, 2016 3:35 pm    Post subject: Re: Poor performance with games Reply with quote

rh wrote:

I would guess your issue is that
1. your GPU isn't yet supported (yet) by amdgpu driver, use radeon insted


I switched to amdgpu because it's the other way around, M370 appears on the list (https://wiki.gentoo.org/wiki/Amdgpu) while it doesn't appear on the "radeon" list. I noticed this too late as I already tried enabling support for radeon and intel graphics. Later I re-did more or less everything from scratch following the steps in amdgpu wiki.

rh wrote:

2. your have a dual-gpu setup, and your display is connected to intel GPU


Definitely, I am guessing the same.

lspci shows both:

Code:
00:02.0 VGA compatible controller: Intel Corporation Sky Lake Integrated Graphics (rev 07)

(...)
Code:
03:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Mars [Radeon HD 8670A/8670M/8750M] (rev 81)


Here is part of the output from Xorg.log without customization (as I have run it now):

Code:
[ 13488.257] (==) ModulePath set to "/usr/lib64/xorg/modules"
[ 13488.257] (II) The server relies on udev to provide the list of input devices.
   If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 13488.257] (II) Loader magic: 0x810c80
[ 13488.257] (II) Module ABI versions:
[ 13488.257]    X.Org ANSI C Emulation: 0.4
[ 13488.257]    X.Org Video Driver: 19.0
[ 13488.257]    X.Org XInput driver : 21.0
[ 13488.257]    X.Org Server Extension : 9.0
[ 13488.257] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 13488.257] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
[ 13488.258] (--) PCI:*(0:0:2:0) 8086:1916:17aa:5049 rev 7, Mem @ 0xe0000000/16777216, 0xd0000000/268435456, I/O @ 0x00004000/64
[ 13488.258] (--) PCI: (0:3:0:0) 1002:6600:17aa:5049 rev 129, Mem @ 0xc0000000/268435456, 0xe1000000/262144, I/O @ 0x00003000/256, BIOS @ 0x????????/131072
[ 13488.258] (II) LoadModule: "glx"
[ 13488.259] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
[ 13488.259] (II) Module glx: vendor="X.Org Foundation"
[ 13488.259]    compiled for 1.17.4, module version = 1.0.0
[ 13488.259]    ABI class: X.Org Server Extension, version 9.0
[ 13488.259] (==) AIGLX enabled
[ 13488.259] (==) Matched intel as autoconfigured driver 0
[ 13488.259] (==) Matched modesetting as autoconfigured driver 1
[ 13488.259] (==) Matched fbdev as autoconfigured driver 2
[ 13488.259] (==) Matched vesa as autoconfigured driver 3
[ 13488.259] (==) Assigned the driver to the xf86ConfigLayout
[ 13488.259] (II) LoadModule: "intel"
[ 13488.259] (WW) Warning, couldn't open module intel
[ 13488.259] (II) UnloadModule: "intel"
[ 13488.259] (II) Unloading intel
[ 13488.260] (EE) Failed to load module "intel" (module does not exist, 0)
[ 13488.260] (II) LoadModule: "modesetting"
[ 13488.260] (II) Loading /usr/lib64/xorg/modules/drivers/modesetting_drv.so
[ 13488.260] (II) Module modesetting: vendor="X.Org Foundation"
[ 13488.260]    compiled for 1.17.4, module version = 1.17.4
[ 13488.260]    Module class: X.Org Video Driver
[ 13488.260]    ABI class: X.Org Video Driver, version 19.0
[ 13488.260] (II) LoadModule: "fbdev"
[ 13488.260] (II) Loading /usr/lib64/xorg/modules/drivers/fbdev_drv.so
[ 13488.260] (II) Module fbdev: vendor="X.Org Foundation"
[ 13488.260]    compiled for 1.17.4, module version = 0.4.4
[ 13488.260]    Module class: X.Org Video Driver
[ 13488.260]    ABI class: X.Org Video Driver, version 19.0
[ 13488.260] (II) LoadModule: "vesa"
[ 13488.260] (II) Loading /usr/lib64/xorg/modules/drivers/vesa_drv.so
[ 13488.260] (II) Module vesa: vendor="X.Org Foundation"
[ 13488.260]    compiled for 1.17.4, module version = 2.3.4
[ 13488.260]    Module class: X.Org Video Driver
[ 13488.260]    ABI class: X.Org Video Driver, version 19.0
[ 13488.260] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 13488.260] (II) FBDEV: driver for framebuffer: fbdev
[ 13488.260] (II) VESA: driver for VESA chipsets: vesa
[ 13488.260] (++) using VT number 8

[ 13488.415] (**) modeset(0): claimed PCI slot 0@0:2:0
[ 13488.415] (II) modeset(0): using default device
[ 13488.415] (WW) Falling back to old probe method for fbdev
[ 13488.415] (II) Loading sub module "fbdevhw"
[ 13488.415] (II) LoadModule: "fbdevhw"
[ 13488.415] (II) Loading /usr/lib64/xorg/modules/libfbdevhw.so
[ 13488.415] (II) Module fbdevhw: vendor="X.Org Foundation"
[ 13488.415]    compiled for 1.17.4, module version = 0.0.2
[ 13488.415]    ABI class: X.Org Video Driver, version 19.0
[ 13488.415] (WW) Falling back to old probe method for vesa
[ 13488.415] (II) modeset(0): Creating default Display subsection in Screen section
   "Default Screen Section" for depth/fbbpp 24/32
[ 13488.415] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[ 13488.415] (==) modeset(0): RGB weight 888
[ 13488.415] (==) modeset(0): Default visual is TrueColor


I am not liking the "permission denied" part of the Xorg log. It looks like I have wrong permissions on some files.

dmesg does not mention amdgpu nor amd other than referring to the ACPI:

Code:
[    0.000000] ACPI: SSDT 0x00000000B7FD3000 00034E (v01 LENOVO AmdTabl  00001000 INTL 20141107)
[    0.108280] [Firmware Bug]: ACPI: BIOS _OSI(Linux) query ignored
[    0.138771] ACPI: Power Resource [AMD2] (on)
[    0.351196] microcode: CPU0 sig=0x406e3, pf=0x80, revision=0x88
[    0.352047] microcode: CPU1 sig=0x406e3, pf=0x80, revision=0x88
[    0.352919] microcode: CPU2 sig=0x406e3, pf=0x80, revision=0x88
[    0.353742] microcode: CPU3 sig=0x406e3, pf=0x80, revision=0x88
[    0.354756] microcode: Microcode Update Driver: v2.01 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
[    0.799053] usb 1-1: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
[    2.152489] [drm] Initialized drm 1.1.0 20060810
[    2.155609] iwlwifi 0000:01:00.0: Direct firmware load for iwlwifi-7265D-19.ucode failed with error -2
[    2.155630] iwlwifi 0000:01:00.0: Direct firmware load for iwlwifi-7265D-18.ucode failed with error -2
[    2.155641] iwlwifi 0000:01:00.0: Direct firmware load for iwlwifi-7265D-17.ucode failed with error -2
[    2.167233] iwlwifi 0000:01:00.0: loaded firmware version 16.242414.0 op_mode iwlmvm
[    2.179439] [drm] Memory usable by graphics device = 4096M
[    2.179445] fb: switching to inteldrmfb from EFI VGA
[    2.179638] [drm] Replacing VGA console driver
[    2.186251] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    2.186253] [drm] Driver supports precise vblank timestamp query.
[    2.387726] fbcon: inteldrmfb (fb0) is primary device
[    3.715065] [drm] RC6 on
[    3.781832] [drm] Initialized i915 1.6.0 20151010 for 0000:00:02.0 on minor 0
[    3.785802] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54304
Location: 56N 3W

PostPosted: Sat Sep 24, 2016 6:00 pm    Post subject: Reply with quote

Elaman,

I guess you have an Intel/AMD muxless graphics system. If that the case, you can't use the Radeon card alone because it can't refresh the display.
Lets start right at the beginning. Tell us the make and model of your laptop then we can check out how the hardware is put together.

Also make friends with wgetpaste so you can put whole log files on the web and post a link to them here.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
rh
n00b
n00b


Joined: 19 Sep 2006
Posts: 58

PostPosted: Sun Oct 02, 2016 12:21 pm    Post subject: Re: Poor performance with games Reply with quote

Elaman wrote:
I switched to amdgpu because it's the other way around, M370 appears on the list (https://wiki.gentoo.org/wiki/Amdgpu) while it doesn't appear on the "radeon" list.


All the sources I have seen list M370 as Southern Islands (GCN 1.0). Reverse lookup with your lspci output gives pci id 1002:6600, and kernel sources confirm that your chip is supported by radeon. I would guess that the wiki is wrong. You can verify the pci id with lspci -nn. In any case there is no harm enabling both radeon and amdgpu in kernel and VIDEO_CARDS. Both kernel and X should pick the right driver for you, and that's actually how most distros, including gentoo installation media, work.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gamers & Players All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum