You are not logged in.

#1 2020-02-16 14:45:19

7marre
Member
Registered: 2020-02-16
Posts: 2

Dedicated GPU only using 256MB of memory instead of full 2GB

Hello, first post here, so sorry if I am posting in the wrong section, or not following a specific format. I have searched for a solution to this issue on search engines and on the forum for many hours now, but cannot find a solution.

My laptop (Lenovo Thinkpad E15 2019, specs here) has integrated Intel UHD Graphics, but also a dedicated AMD Radeon RX 640 2GB GDDR5 GPU. The issue is that it seems like the memory on the dedicated GPU is limited to 256MB, and not utilizing the full 2GB. I noticed this when running a benchmark using unigine-heaven, only getting 4-5 fps more than my Intel Graphics.

I have confirmed that the benchmark, and other gpu applications are using the dedicated GPU and not the integrated graphics, so that is not the issue. I am using DRI_PRIME=1 to make sure of this. Doing

glxinfo | grep "OpenGL renderer
DRI_PRIME=1 glxinfo | grep "OpenGL renderer"

gives me this output respectively:

OpenGL renderer string: Mesa DRI Intel(R) UHD Graphics (Comet Lake 3x8 GT2)
OpenGL renderer string: Radeon 550X Series (POLARIS12, DRM 3.36.0, 5.5.3-arch1-1, LLVM 9.0.1)

So DRI_PRIME=1 does work and does offload the dedicated gpu to applications.

Output of lspci -v, both gpus are detected, but I also notice the "Memory at c0000000 (64-bit, prefetchable) [size=256M]"

lspci -v
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics (rev 02) (prog-if 00 [VGA controller])
	Subsystem: Lenovo UHD Graphics
	Flags: bus master, fast devsel, latency 0, IRQ 136
	Memory at d1000000 (64-bit, non-prefetchable) [size=16M]
	Memory at a0000000 (64-bit, prefetchable) [size=512M]
	I/O ports at 4000 [size=64]
	[virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
	Capabilities: <access denied>
	Kernel driver in use: i915
	Kernel modules: i915

03:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Lexa [Radeon 540X/550X/630 / RX 640 / E9171 MCM] (rev c0)
	Subsystem: Lenovo Lexa [Radeon 540X/550X/630 / RX 640 / E9171 MCM]
	Flags: bus master, fast devsel, latency 0, IRQ 135
	Memory at c0000000 (64-bit, prefetchable) [size=256M]
	Memory at d0000000 (64-bit, prefetchable) [size=2M]
	I/O ports at 3000 [size=256]
	Memory at d2300000 (32-bit, non-prefetchable) [size=256K]
	Expansion ROM at d2340000 [disabled] [size=128K]
	Capabilities: <access denied>
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu

Output of dmesg, here I think you can see that only 256M of memory can be used because of "PCIE GART of 256M enabled"

dmesg | grep drm
[    2.191361] [drm] amdgpu kernel modesetting enabled.
[    2.191829] [drm] initializing kernel modesetting (POLARIS12 0x1002:0x6987 0x17AA:0x507A 0xC0).
[    2.191837] [drm] register mmio base: 0xD2300000
[    2.191838] [drm] register mmio size: 262144
[    2.191841] [drm] PCIE atomic ops is not supported
[    2.191845] [drm] add ip block number 0 <vi_common>
[    2.191846] [drm] add ip block number 1 <gmc_v8_0>
[    2.191846] [drm] add ip block number 2 <tonga_ih>
[    2.191847] [drm] add ip block number 3 <gfx_v8_0>
[    2.191847] [drm] add ip block number 4 <sdma_v3_0>
[    2.191847] [drm] add ip block number 5 <powerplay>
[    2.191848] [drm] add ip block number 6 <dm>
[    2.191848] [drm] add ip block number 7 <uvd_v6_0>
[    2.191849] [drm] add ip block number 8 <vce_v3_0>
[    2.242042] [drm] UVD is enabled in VM mode
[    2.242042] [drm] UVD ENC is enabled in VM mode
[    2.242045] [drm] VCE enabled in VM mode
[    2.242055] [drm] GPU posting now...
[    2.257257] [drm] vm size is 64 GB, 2 levels, block size is 10-bit, fragment size is 9-bit
[    2.257315] [drm] Detected VRAM RAM=2048M, BAR=256M
[    2.257316] [drm] RAM width 64bits GDDR5
[    2.257502] [drm] amdgpu: 2048M of VRAM memory ready
[    2.257504] [drm] amdgpu: 3072M of GTT memory ready.
[    2.257511] [drm] GART: num cpu pages 65536, num gpu pages 65536
[    2.258242] [drm] PCIE GART of 256M enabled (table at 0x000000F400000000).
[    2.258341] [drm] Chained IB support enabled!
[    2.259723] [drm] Found UVD firmware Version: 1.130 Family ID: 16
[    2.260923] [drm] Found VCE firmware Version: 53.26 Binary ID: 3
[    2.340011] [drm] DM_PPLIB: values for Engine clock
[    2.340012] [drm] DM_PPLIB:	214000
[    2.340013] [drm] DM_PPLIB:	428000
[    2.340013] [drm] DM_PPLIB:	708000
[    2.340013] [drm] DM_PPLIB:	937000
[    2.340014] [drm] DM_PPLIB:	1082000
[    2.340014] [drm] DM_PPLIB:	1141000
[    2.340014] [drm] DM_PPLIB:	1197000
[    2.340014] [drm] DM_PPLIB:	1218000
[    2.340015] [drm] DM_PPLIB: Validation clocks:
[    2.340015] [drm] DM_PPLIB:    engine_max_clock: 121800
[    2.340016] [drm] DM_PPLIB:    memory_max_clock: 150000
[    2.340016] [drm] DM_PPLIB:    level           : 8
[    2.340017] [drm] DM_PPLIB: values for Memory clock
[    2.340017] [drm] DM_PPLIB:	300000
[    2.340017] [drm] DM_PPLIB:	625000
[    2.340018] [drm] DM_PPLIB:	1500000
[    2.340018] [drm] DM_PPLIB: Validation clocks:
[    2.340018] [drm] DM_PPLIB:    engine_max_clock: 121800
[    2.340019] [drm] DM_PPLIB:    memory_max_clock: 150000
[    2.340019] [drm] DM_PPLIB:    level           : 8
[    2.340026] [drm] Display Core initialized with v3.2.56!
[    2.340914] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    2.340915] [drm] Driver supports precise vblank timestamp query.
[    2.390154] [drm] UVD and UVD ENC initialized successfully.
[    2.501306] [drm] VCE initialized successfully.
[    2.505086] [drm] Initialized amdgpu 3.36.0 20150101 for 0000:03:00.0 on minor 0
[    2.536024] fb0: switching to inteldrmfb from EFI VGA
[    2.537154] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    2.537154] [drm] Driver supports precise vblank timestamp query.
[    2.538349] [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4)
[    2.550663] [drm] Initialized i915 1.6.0 20191101 for 0000:00:02.0 on minor 1
[    2.691449] fbcon: i915drmfb (fb0) is primary device
[    2.724122] i915 0000:00:02.0: fb0: i915drmfb frame buffer device
[   12.087833] [drm] PCIE GART of 256M enabled (table at 0x000000F400000000).
[   12.202930] [drm] UVD and UVD ENC initialized successfully.
[   12.351890] [drm] VCE initialized successfully.
[   19.315554] [drm] PCIE GART of 256M enabled (table at 0x000000F400000000).
[   19.432957] [drm] UVD and UVD ENC initialized successfully.
[   19.581923] [drm] VCE initialized successfully.

When i run unigine-heaven using DRI_PRIME=1 and launch a benchmark, this is logged in the terminal, showing that it uses the correct dedicated gpu, but also only 256MB of memory:

---- System ----
System: Linux 5.5.3-arch1-1 x86_64
CPU: Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz 2303MHz MMX SSE SSE2 SSE3 SSSE3 SSE41 SSE42 AVX HTT x8
GPU: Unknown GPU x1
System memory: 15725 MB
Video memory:  256 MB
Sync threads:  7
Async threads: 8

---- Render ----
GLRender::GLRender(): Unknown ATI GPU
OpenGL vendor:   X.Org
OpenGL renderer: Radeon 550X Series (POLARIS12, DRM 3.36.0, 5.5.3-arch1-1, LLVM 9.0.1)
OpenGL version:  4.5 (Core Profile) Mesa 19.3.4
OpenGL flags:    Core Profile

Which confirms that applications only can use 256MB of video memory ("Video memory:  256 MB")

My xorg.conf file (located in /etc/X11/xorg.conf) has this, which enabled me to use DRI_PRIME=1, and the problem persists without the xorg.conf file:

Section "Device"
  Identifier "iGPU"
  Driver "modesetting"
EndSection

Section "Screen"
  Identifier "iGPU"
  Device "iGPU"
EndSection

Section "Device"
  Identifier "dGPU"
  Driver "amdgpu"
EndSection

There is also no other conf files in /etc/X11/xorg.conf.d/ other than 00-keyboard.conf

As for packages, I got these installed:

mesa
mesa-demos
mesa-vdpau
xf86-video-amdgpu
intel-ucode

I do not have xf86-video-intel installed, as it breaks my system, after startx the screen becomes glitchy, not updating frames for many seconds, and system is pretty much unusable.

This is all the infromation I have. I dont know where to go from here to troubleshoot further, and I hope someone out there can help me.

Last edited by 7marre (2020-02-16 14:53:42)

Offline

#2 2020-02-16 15:30:44

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: Dedicated GPU only using 256MB of memory instead of full 2GB

Post the output of

$ DRI_PRIME-1 glxinfo -B

so we can see more details about video memory.

Usually the GART size is configurable through efi/bios software, but laptops often allow very little customization .
Maybe you're lucky, check the firmware options.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2020-02-16 15:45:17

7marre
Member
Registered: 2020-02-16
Posts: 2

Re: Dedicated GPU only using 256MB of memory instead of full 2GB

Lone_Wolf wrote:

Post the output of

$ DRI_PRIME-1 glxinfo -B

so we can see more details about video memory.

Usually the GART size is configurable through efi/bios software, but laptops often allow very little customization .
Maybe you're lucky, check the firmware options.

Here is the output:

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: X.Org (0x1002)
    Device: Radeon 550X Series (POLARIS12, DRM 3.36.0, 5.5.3-arch1-1, LLVM 9.0.1) (0x6987)
    Version: 19.3.4
    Accelerated: yes
    Video memory: 2048MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.5
    Max compat profile version: 4.5
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
    VBO free memory - total: 2034 MB, largest block: 2034 MB
    VBO free aux. memory - total: 3055 MB, largest block: 3055 MB
    Texture free memory - total: 2034 MB, largest block: 2034 MB
    Texture free aux. memory - total: 3055 MB, largest block: 3055 MB
    Renderbuffer free memory - total: 2034 MB, largest block: 2034 MB
    Renderbuffer free aux. memory - total: 3055 MB, largest block: 3055 MB
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 2048 MB
    Total available memory: 5120 MB
    Currently available dedicated video memory: 2034 MB
OpenGL vendor string: X.Org
OpenGL renderer string: Radeon 550X Series (POLARIS12, DRM 3.36.0, 5.5.3-arch1-1, LLVM 9.0.1)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 19.3.4
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.5 (Compatibility Profile) Mesa 19.3.4
OpenGL shading language version string: 4.50
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 19.3.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

I have checked all settings in BIOS, where the only related setting is integrated graphics memory, which is set to the maximum 512MB. The BIOS is updated. I don't know if this can be related, but in my bootloader I am also just using default options, only adding intel-ucode. Problem persists without intel-ucode:

menuentry "Arch Linux" {
    icon     /EFI/refind/icons/os_arch.png
    volume   "68E8-A169"
    loader   /vmlinuz-linux
    initrd   /initramfs-linux.img
    options  "ro root=UUID=0aba3f9d-95c4-49cc-b2fa-9028a06f57fe initrd=\intel-ucode.img"   
    submenuentry "Boot using fallback initramfs" {
        initrd /initramfs-linux-fallback.img     
    }
    submenuentry "Boot to terminal" {
        add_options "systemd.unit=multi-user.target"
    }
}

Offline

#4 2020-06-06 10:06:27

kkkkkking
Member
Registered: 2019-12-16
Posts: 3

Re: Dedicated GPU only using 256MB of memory instead of full 2GB

Have you fixed it yet? I have similar problem, with an much older gpu, and managed to use full 2g with radeon driver. Would love to fix this issue and use amdgpu instead.

Offline

Board footer

Powered by FluxBB