How do I check if the dGPU is being used?


Just installed Manjaro for the first time and I’m having problems running games. I’m getting 10-15 fps less than ubuntu/kubuntu despite having the driver up-to-date, at least I think I do. Maybe that’s because the dGPU isn’t working for some reason and the iGPU surely can’t handle the load. How do I make sure the dGPU is working when running games?

My inxi output

 Kernel: 5.4.101-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.1 
 parameters: BOOT_IMAGE=/boot/vmlinuz-5.4-x86_64 
 root=UUID=4f905dfa-6008-4f20-92f2-68aa300841ea ro quiet 
 resume=UUID=951a929e-9c81-48e8-966d-c00446cb5bfe udev.log_priority=3 
 Desktop: Xfce 4.16.0 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm4 
 dm: LightDM 1.30.0 Distro: Manjaro Linux 
 Type: Laptop System: Dell product: Inspiron 7460 v: N/A serial: <filter> 
 Chassis: type: 10 serial: <filter> 
 Mobo: Dell model: 0V736W v: A01 serial: <filter> UEFI: Dell v: 1.12.0 
 date: 12/04/2019 
 RAM: total: 7.68 GiB used: 2.47 GiB (32.2%) 
 RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
 Info: Dual Core model: Intel Core i5-7200U bits: 64 type: MT MCP 
 arch: Amber/Kaby Lake note: check family: 6 model-id: 8E (142) stepping: 9 
 microcode: DE L2 cache: 3 MiB bogomips: 21607 
 Speed: 600 MHz min/max: 400/3100 MHz Core speeds (MHz): 1: 600 2: 600 3: 600 
 4: 600 
 Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat arch_perfmon art 
 avx avx2 bmi1 bmi2 bts clflush clflushopt cmov constant_tsc cpuid 
 cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts epb ept ept_ad erms est 
 f16c flexpriority flush_l1d fma fpu fsgsbase fxsr ht hwp hwp_act_window 
 hwp_epp hwp_notify ibpb ibrs ida intel_pt invpcid invpcid_single lahf_lm lm 
 mca mce md_clear mmx monitor movbe mpx msr mtrr nonstop_tsc nopl nx pae pat 
 pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pln pni popcnt pse pse36 pti pts 
 rdrand rdseed rdtscp rep_good sdbg sep smap smep ss ssbd sse sse2 sse4_1 
 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc tsc_adjust 
 tsc_deadline_timer vme vmx vnmi vpid x2apic xgetbv1 xsave xsavec xsaveopt 
 xsaves xtopology xtpr 
 Vulnerabilities: Type: itlb_multihit status: KVM: Split huge pages 
 Type: l1tf 
 mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
 Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
 Type: meltdown mitigation: PTI 
 Type: spec_store_bypass 
 mitigation: Speculative Store Bypass disabled via prctl and seccomp 
 Type: spectre_v1 
 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
 Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, 
 IBRS_FW, STIBP: conditional, RSB filling 
 Type: srbds mitigation: Microcode 
 Type: tsx_async_abort status: Not affected 
 Device-1: Intel HD Graphics 620 vendor: Dell driver: i915 v: kernel 
 bus ID: 00:02.0 chip ID: 8086:5916 class ID: 0300 
 Device-2: NVIDIA GM108M [GeForce 940MX] vendor: Dell driver: nvidia 
 v: 460.56 alternate: nouveau,nvidia_drm bus ID: 01:00.0 chip ID: 10de:134d 
 class ID: 0302 
 Device-3: Sunplus Innovation Integrated Webcam type: USB driver: uvcvideo 
 bus ID: 1-5:4 chip ID: 1bcf:2c00 class ID: 0e02 
 Display: x11 server: X.Org 1.20.10 driver: loaded: modesetting,nvidia 
 display ID: :0.0 screens: 1 
 Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") 
 s-diag: 582mm (22.9") 
 Monitor-1: eDP-1 res: 1920x1080 hz: 60 dpi: 158 size: 309x174mm (12.2x6.9") 
 diag: 355mm (14") 
 OpenGL: renderer: Mesa Intel HD Graphics 620 (KBL GT2) v: 4.6 Mesa 20.3.4 
 direct render: Yes 
 Device-1: Intel Sunrise Point-LP HD Audio vendor: Dell driver: snd_hda_intel 
 v: kernel alternate: snd_soc_skl bus ID: 00:1f.3 chip ID: 8086:9d71 
 class ID: 0403 
 Sound Server: ALSA v: k5.4.101-1-MANJARO 
 Device-1: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter 
 vendor: Dell driver: ath10k_pci v: kernel port: e000 bus ID: 02:00.0 
 chip ID: 168c:003e class ID: 0280 
 IF: wlp2s0 state: up mac: <filter> 
 IP v4: <filter> type: dynamic noprefixroute scope: global 
 broadcast: <filter> 
 IP v6: <filter> type: dynamic noprefixroute scope: global 
 IP v6: <filter> type: noprefixroute scope: link 
 Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
 vendor: Dell driver: r8169 v: kernel port: d000 bus ID: 03:00.0 
 chip ID: 10ec:8168 class ID: 0200 
 IF: enp3s0 state: down mac: <filter> 
 Device-3: Qualcomm Atheros type: USB driver: btusb bus ID: 1-8:6 
 chip ID: 0cf3:e007 class ID: e001 
 WAN IP: <filter> 
 Device-1: Qualcomm Atheros type: USB driver: btusb v: 0.8 bus ID: 1-8:6 
 chip ID: 0cf3:e007 class ID: e001 
 Message: Required tool hciconfig not installed. Check --recommends 
 Message: No RAID data was found. 
 Local Storage: total: 447.13 GiB used: 18.99 GiB (4.2%) 
 SMART Message: Required tool smartctl not installed. Check --recommends 
 ID-1: /dev/sda maj-min: 8:0 vendor: Kingston model: SA400S37480G 
 size: 447.13 GiB block size: physical: 512 B logical: 512 B speed: 6.0 Gb/s 
 rotation: SSD serial: <filter> rev: K1B3 scheme: GPT 
 Message: No Optical or Floppy data was found. 
 ID-1: / raw size: 83.99 GiB size: 82.17 GiB (97.84%) used: 18.82 GiB (22.9%) 
 fs: ext4 dev: /dev/sda5 maj-min: 8:5 label: N/A 
 uuid: 4f905dfa-6008-4f20-92f2-68aa300841ea 
 ID-2: /boot/efi raw size: 499 MiB size: 96 MiB (19.24%) 
 used: 25.2 MiB (26.3%) fs: vfat dev: /dev/sda1 maj-min: 8:1 label: N/A 
 uuid: 5EC1-D071 
 Kernel: swappiness: 60 (default) cache pressure: 100 (default) 
 ID-1: swap-1 type: partition size: 15.62 GiB used: 156 MiB (1.0%) 
 priority: -2 dev: /dev/sda6 maj-min: 8:6 label: N/A 
 uuid: 951a929e-9c81-48e8-966d-c00446cb5bfe 
 ID-1: /dev/sda2 maj-min: 8:2 size: 16 MiB fs: <superuser required> 
 label: N/A uuid: N/A 
 ID-2: /dev/sda3 maj-min: 8:3 size: 346.53 GiB fs: ntfs label: N/A 
 uuid: D6E0C6E1E0C6C749 
 ID-3: /dev/sda4 maj-min: 8:4 size: 499 MiB fs: ntfs label: N/A 
 uuid: F07A6B537A6B159E 
 Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 12 rev: 2.0 
 speed: 480 Mb/s chip ID: 1d6b:0002 class ID: 0900 
 Device-1: 1-2:2 info: Logitech Keyboard K120 type: Keyboard,HID 
 driver: hid-generic,usbhid interfaces: 2 rev: 1.1 speed: 1.5 Mb/s 
 chip ID: 046d:c31c class ID: 0300 
 Device-2: 1-3:3 info: Logitech M105 Optical Mouse type: Mouse 
 driver: hid-generic,usbhid interfaces: 1 rev: 2.0 speed: 1.5 Mb/s 
 chip ID: 046d:c077 class ID: 0301 
 Device-3: 1-5:4 info: Sunplus Innovation Integrated Webcam type: Video 
 driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s chip ID: 1bcf:2c00 
 class ID: 0e02 
 Device-4: 1-6:5 info: Realtek RTS5129 Card Reader Controller 
 type: <vendor specific> driver: rtsx_usb,rtsx_usb_ms,rtsx_usb_sdmmc 
 interfaces: 1 rev: 2.0 speed: 480 Mb/s chip ID: 0bda:0129 class ID: ff00 
 serial: <filter> 
 Device-5: 1-8:6 info: Qualcomm Atheros type: Bluetooth driver: btusb 
 interfaces: 2 rev: 2.0 speed: 12 Mb/s chip ID: 0cf3:e007 class ID: e001 
 Hub-2: 2-0:1 info: Full speed (or root) Hub ports: 6 rev: 3.0 speed: 5 Gb/s 
 chip ID: 1d6b:0003 class ID: 0900 
 System Temperatures: cpu: 49.0 C mobo: 42.0 C sodimm: SODIMM C 
 Fan Speeds (RPM): cpu: 0 
 Processes: 209 Uptime: 57m wakeups: 1 Init: systemd v: 247 Compilers: 
 gcc: 10.2.0 Packages: pacman: 1071 lib: 401 Shell: Bash v: 5.1.0 
 running in: xfce4-terminal inxi: 3.3.01 

edit1: So, I have confirmed through nvidia-smi dmon that while running games through Steam the Nvidia dGPU is not being used. I haven’t tested this thoroughly.
edit2: Installed optimus-manager and switched to hybrid but still the nvidia-smi dmon shows no gpu usage

How can I make this hybrid GPU work?

This line tell you which driver you currently run. Now you use iGPU.

If you want to use your Nvidia card you need to use prime-run like:

prime-run your-app

If you don’t know if prime-run work you can check it by:

prime-run glxinfo | grep OpenGL 
1 Like

Ok, so that works, but is this actually the only way? optimus-manager or even prime isn’t able to autoswitch to Nvidia GPU when a more demanding task is in process? Or the system needs my input in order to be able to use the dGPU?

So you want your system automatically switch to dGPU when already running task will become more demanding – I doubt if this is possible.

You don’t need always use prime-run command – you can create aliases and desktop files if you want to run some apps always with dGPU. Some work, but you do it only once.

I believe in some desktop environments right clicking an app will show you a “Run on discrete GPU” or similar option. But generally, no, unlike Windows, without your input, everything will run on the default renderer, which in this case happens to be the Intel GPU. With optimus-manager you “switch” to the NVIDIA GPU, which means that everything will run on the NVIDIA GPU, and you get high performance by default in games, however, it has considerable implications for battery life.

1 Like

I may have expressed myself poorly. I actually meant that I want a way to make the system detect by itself if an application should be rendered by the dGPU instead of iGPU and make it happen. I could’ve misunderstood the description of optimus-manager but I thought that was its purpose. I’m wrong to think that the switch hybrid command states that it’s capable of doing just that?
I’m sorry if this sounds like I’m being insistent on the matter, but I’m a bit confused.

What about the --switch hybrid command? Isn’t it supposed to do exactly that? That is, identify the best GPU to render each application.

Every program that is Vulkan capable can detect the dGPU automatically without you putting the prime-run command,like for example the Dolphin Emulator can detect the iGPU and dGPU at the same time when you have the Vulkan renderer and you can select what gpu to use,but if you select OpenGL dolphin only detects the iGPU,so in that case you need to launch Dolphin with prime-run to use the dGPU (prime-run dolphin-emu for example)

Steam with Proton 5.13 you need to put the prime-run %command% as well in each game launch options for the game use the dGPU (no matter if its DXVK,Vulkan or OpenGL)

But looks like with Proton 6.1 GE,there is no need to use the prime-run command anymore,looks like Proton can detect the dGPU automatically,you should give it a shot.

1 Like

No, the "hybrid" mode does not do that. It merely enables you to instruct an application with the prime-run command to use the NVIDIA GPU, it won’t do that automatically.

1 Like

Ok, I think I get it now. Thanks for clarifying that, I may try that at some point.

Oh my bad then. I guess that makes things clear. Too bad Manjaro still can’t handle the GPU switch automatically. I may give it a try at some point in the future, seems like a very resourceful distro. Thanks for helping.

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