FeralInteractive / gamemode

Optimise Linux system performance on demand
BSD 3-Clause "New" or "Revised" License
4.84k stars 188 forks source link

Intel A770 Support? #496

Closed freeze-dolphin closed 2 months ago

freeze-dolphin commented 2 months ago

I'm trying to specify GPU for my games using gamemode, here is the gpu part of my gamemode.ini:

...

[gpu]
apply_gpu_optimisations=accept-responsibility
gpu_device=0

...

gamemoded -t output:

freeze-dolphin@abyss:~$ gamemoded -t
: Loading config
Loading config file [/usr/share/gamemode/gamemode.ini]
: Running tests

:: Basic client tests
:: Passed

:: Dual client tests
gamemode request succeeded and is active
Quitting by request...
:: Passed

:: Gamemoderun and reaper thread tests
...Waiting for child to quit...
...Waiting for reaper thread (reaper_frequency set to 5 seconds)...
:: Passed

:: Supervisor tests
:: Passed

:: Feature tests
::: Verifying CPU governor setting
ERROR: Governor was not set to performance (was actually powersave)!
::: Failed!
::: Verifying Scripts
::: Passed (no scripts configured to run)
::: Verifying GPU Optimisations
ERROR: Currently unsupported GPU vendor 0x8086, doing nothing!
ERROR: Currently unsupported GPU vendor 0x8086, doing nothing!
ERROR: Currently unsupported GPU vendor 0x8086, doing nothing!
::: Passed
::: Verifying renice
::: Passed (no renice configured)
::: Verifying ioprio
::: Passed
ERROR: :: Failed!
: Tests Failed!

Running Minecraft (Nomifactory Modpack, based on 1.12.2), apparently it's not using the dedicated GPU:

Optifine Shader Menu:

The amd gpu above is the iGPU of my CPU.

Gamemode ensured:

freeze-dolphin commented 2 months ago

GPU information:

freeze-dolphin@abyss:~$ lspci -vnnn | perl -lne 'print if /^\d+\:.+(\[\S+\:\S+\])/' | grep VGA
03:00.0 VGA compatible controller [0300]: Intel Corporation DG2 [Arc A770] [8086:56a0] (rev 08) (prog-if 00 [VGA controller])
13:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raphael [1002:164e] (rev c2) (prog-if 00 [VGA controller])
freeze-dolphin commented 2 months ago

Solved:

Finally I found the solution myself.

As you can see when setting DRI_PRIME to '1', it will use the iGPU. While setting to '0', it uses the dGPU. That's why the 'Use discrete GPU' option confused me a lot.

image image

Originally posted by @freeze-dolphin in https://github.com/PrismLauncher/PrismLauncher/issues/2834#issuecomment-2357416049