Is my app use a discrete graphics card (NVIDIA)?

Hello everyone. My system is Manjaro KDE 21.2.3 (Qonos). I’ve tried to configure my graphics cards and run some steam games. I’ll describe my question and provide some information about my configuration. As I understand, I can check if my app use a NVIDIA card by nvidia-smi. Below is the output of this command when the game is running.

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 510.47.03    Driver Version: 510.47.03    CUDA Version: 11.6     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   70C    P0    N/A /  N/A |   1847MiB /  4096MiB |     94%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1031      G   /usr/lib/Xorg                      32MiB |
|    0   N/A  N/A      5232    C+G   ...e Council\The Council.exe     1803MiB |
+-----------------------------------------------------------------------------+

The game uses the NVIDIA card, am I right? If I’m right, there’s another question. I have the video-hybrid-intel-nvidia-prime driver on my laptop. As I understand without any option it should use an integrated GPU by default. I didn’t specify any option to run this game. So how it use my NVIDIA card? In my case I should use prime-run %command%. But I can’t run any game with this option. I press play and nothing happens.

The output of the command inxi -G.

Graphics:
  Device-1: Intel 4th Gen Core Processor Integrated Graphics driver: i915
    v: kernel
  Device-2: NVIDIA GM107M [GeForce GTX 960M] driver: nvidia v: 510.47.03
  Device-3: Acer Lenovo EasyCamera type: USB driver: uvcvideo
  Display: x11 server: X.org 1.21.1.3 driver: loaded: modesetting,nvidia
    unloaded: nouveau resolution: <missing: xdpyinfo>
  OpenGL: renderer: Mesa DRI Intel HD Graphics 4600 (HSW GT2)
    v: 4.5 Mesa 21.3.5

The output of the command mhwd -li.

Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2021.12.18               false            PCI
   network-broadcom-wl            2018.10.07               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI


Warning: No installed USB configs!

Please post text, not screenshots

How to increase your chances of solving your issue:

Please provide Information:

Where are you putting the prime-run %command% ?

What happens if you launch steam itself with prime-run from terminal?

1 Like

Not anymore since 470+ NVIDIA drivers,the game now detects the NVIDIA card and now its the default,unless the game uses OpenGL and not Vulkan/DXVK,the game will then use the iGPU instead and you should use the prime-run command.

1 Like

Please use text instead of photo’s.

I put it in game launch options. I open STEAM, open game Properties,GENERAL,LAUNCH OPTIONS.

I use STEAM from FLATPACK. So my system doesn’t know the steam command. When I try to launch STEAM in terminal by prime-run steam I get the following message:“steam: command not found”.

Could you clarify to me, how can I detect precisely a game use OpenGL or Vulkan/DXVK? Also, am I correct in assuming that if the driver automatically selects my NVIDIA card, this should not interfere with running games using prime-run?

I think that’s not how you should run flatpak app from the terminal. Try prime-run flatpak run com.valvesoftware.steam instead to utilize prime offload.

If you’re playing steam proton games then you’re most likely using vulkan on them. But if you need to make sure of it then add DXVK_HUD=1 in your steam game launcher command, or enable NVidia visual indicator in nvidia settings.

1 Like

Any reason your using flatpak rather than steam native? I know there can be issues with steam flatpak

1 Like

I haven’t tried to use it. Before using STEAM from Flatpack, I tried to use steam-manjaro. But there were problems with the activation CD key feature. So I decided to use Steam from Flatpack because this problem doesn’t appear there.

I get this message:"error: app/com.valvesoftware.steam/x86_64/master not installed
".

Oops, sorry. Typo. The correct one is prime-run flatpak run com.valvesoftware.Steam with capital S.

1 Like

Thanks, now STEAM runs from terminal. But when I try to use prime-run %command% to launch games, they don’t run. As I understand, if I run STEAM from terminal by prime-run I don’t need to use prime-run %command% in game launch options, am I right?
The logs.

GameAction [AppID 47780, ActionID 3] : LaunchApp waiting for user response to ShowLaunchOption ""
GameAction [AppID 47780, ActionID 3] : LaunchApp continues with user response "0"
GameAction [AppID 47780, ActionID 3] : LaunchApp changed task to ShowCDKey with ""
GameAction [AppID 47780, ActionID 3] : LaunchApp waiting for user response to ShowCDKey ""
GameAction [AppID 47780, ActionID 3] : LaunchApp continues with user response ""
GameAction [AppID 47780, ActionID 3] : LaunchApp changed task to ProcessingInstallScript with ""
fsync: up and running.
wine: RLIMIT_NICE is <= 20, unable to use setpriority safely
MESA-INTEL: warning: Haswell Vulkan support is incomplete
MESA-INTEL: warning: Haswell Vulkan support is incomplete
MESA-INTEL: warning: Haswell Vulkan support is incomplete
GameAction [AppID 47780, ActionID 3] : LaunchApp changed task to RunningInstallScript with ""
GameAction [AppID 47780, ActionID 3] : LaunchApp changed task to SiteLicenseSeatCheckout with ""
GameAction [AppID 47780, ActionID 3] : LaunchApp changed task to CreatingProcess with ""
GameAction [AppID 47780, ActionID 3] : LaunchApp waiting for user response to CreatingProcess ""
GameAction [AppID 47780, ActionID 3] : LaunchApp continues with user response "CreatingProcess"
/bin/sh\0-c\0prime-run /home/oldman/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=47780 -- '/home/oldman/.var/app
/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/SteamLinuxRuntime_soldier'/_v2-entry-point --verb=waitforexitandrun -- '/home/oldman/.var/app/c
om.valvesoftware.Steam/.local/share/Steam/steamapps/common/Proton 7.0'/proton waitforexitandrun  '/home/oldman/.var/app/com.valvesoftware.Steam/.local/share
/Steam/steamapps/common/Dead Space 2/deadspace2.exe'\0
Game process added : AppID 47780 "prime-run /home/oldman/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=47780 -- '
/home/oldman/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/SteamLinuxRuntime_soldier'/_v2-entry-point --verb=waitforexitandrun -- '/h
ome/oldman/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Proton 7.0'/proton waitforexitandrun  '/home/oldman/.var/app/com.valvesoftwa
re.Steam/.local/share/Steam/steamapps/common/Dead Space 2/deadspace2.exe'", ProcID 906, IP 0.0.0.0:0
chdir /home/oldman/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Dead Space 2
ERROR: ld.so: object '/home/oldman/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preload
ed (wrong ELF class: ELFCLASS32): ignored.
/bin/sh: line 1: prime-run: command not found
GameAction [AppID 47780, ActionID 3] : LaunchApp changed task to WaitingGameWindow with ""
GameAction [AppID 47780, ActionID 3] : LaunchApp changed task to Completed with ""
Game process removed: AppID 47780 "prime-run /home/oldman/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=47780 --
'/home/oldman/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/SteamLinuxRuntime_soldier'/_v2-entry-point --verb=waitforexitandrun -- '/
home/oldman/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Proton 7.0'/proton waitforexitandrun  '/home/oldman/.var/app/com.valvesoftw
are.Steam/.local/share/Steam/steamapps/common/Dead Space 2/deadspace2.exe'", ProcID 906
Uploaded AppInterfaceStats to Steam
No cached sticky mapping in ActivateActionSet.

Also I’ve used DXVK_HUD=fps,devinfo %command% to check if the driver use automatically my NVIDIA card with Vulkan API without any launch option. And it use them. So the main problem is solved. Thank you all for your help.

Yes, you don’t need to pass prime-run again in the game launcher if you already pass it to steam.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.