Not switching to discrete GPU when under load

New Manjaro install on a laptop I haven’t run Linux on previously. I was under the impression Manjaro would switch to the discrete GPU when load demands, however I don’t believe this is occurring. I’m not familiar with how this is managed in Manjaro (I’ve not run LInux on a dual GPU machine before) but I do seem to be able to force an application to use the dGPU by appending “DRI_PRIME=1” when launching an application. I was under the impression this shouldn’t be required though and the system would switch on demand. Can anyone point me to more info or provide an explanation on how to troubleshoot this?

System:
  Kernel: 6.12.44-3-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 15.2.1
    clocksource: tsc avail: acpi_pm
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-6.12-x86_64
    root=UUID=c644b20e-9513-464b-a581-ea9771b369b5 rw rootflags=subvol=@
    quiet splash zswap.enabled=1
    resume=UUID=fa33a5cf-fd27-4ff1-95a1-2f401aec0d69 udev.log_priority=3
  Desktop: KDE Plasma v: 6.3.6 tk: Qt v: N/A info: frameworks v: 6.17.0
    wm: kwin_wayland vt: 1 dm: SDDM Distro: Manjaro base: Arch Linux
Machine:
  Type: Convertible System: Dell product: XPS 15 9575 v: N/A
    serial: <superuser required> Chassis: type: 31 serial: <superuser required>
  Mobo: Dell model: 0C32VW v: A00 serial: <superuser required> part-nu: 080D
    uuid: <superuser required> UEFI: Dell v: 1.28.0 date: 07/11/2023
Battery:
  ID-1: BAT0 charge: 47.3 Wh (100%) condition: 47.3/75 Wh (63.1%) volts: 12.52
    min: 11.4 model: BYD DELL TMFYT8C type: Li-poly serial: <filter> charging:
    status: full type: trickle avail: adaptive,custom,fast,standard,trickle
    cycles: N/A
Memory:
  System RAM: total: 16 GiB available: 15.34 GiB used: 5.46 GiB (35.6%)
  Message: For most reliable report, use superuser + dmidecode.
  Array-1: capacity: 16 GiB slots: 1 modules: 1 EC: None
    max-module-size: 16 GiB note: est.
  Device-1: Motherboard type: DDR4 detail: synchronous unbuffered
    (unregistered) size: 16 GiB speed: 2400 MT/s volts: note: check curr: 1
    min: 1 max: 1 width (bits): data: 64 total: 64 manufacturer: SK Hynix
    part-no: HMAA51S6AMR6N-UH serial: N/A
PCI Slots:
  Permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: Intel Core i7-8705G bits: 64 type: MT MCP arch: Kaby Lake
    gen: core 8 level: v3 note: check built: 2018 process: Intel 14nm family: 6
    model-id: 0x9E (158) stepping: 9 microcode: 0xF8
  Topology: cpus: 1x dies: 1 clusters: 4 cores: 4 threads: 8 tpc: 2
    smt: enabled cache: L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB
    desc: 4x256 KiB L3: 8 MiB desc: 1x8 MiB
  Speed (MHz): avg: 800 min/max: 800/4100 scaling: driver: intel_pstate
    governor: powersave cores: 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 7: 800
    8: 800 bogomips: 49618
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat
    arch_capabilities 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 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
    sgx 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: gather_data_sampling mitigation: Microcode
  Type: indirect_target_selection status: Not affected
  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: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed mitigation: IBRS
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: IBRS; IBPB: conditional; STIBP: conditional;
    RSB filling; PBRSB-eIBRS: Not affected; BHI: Not affected
  Type: srbds mitigation: Microcode
  Type: tsa status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel HD Graphics 630 vendor: Dell driver: i915 v: kernel
    arch: Gen-9.5 process: Intel 14nm built: 2016-20 ports: active: eDP-1
    empty: DP-1,DP-2,DP-3 bus-ID: 00:02.0 chip-ID: 8086:591b class-ID: 0300
  Device-2: Advanced Micro Devices [AMD/ATI] Polaris 22 XL [Radeon RX Vega
    M GL] vendor: Dell driver: amdgpu v: kernel arch: GCN-4
    code: Arctic Islands process: GF 14nm built: 2016-20 pcie: gen: 3
    speed: 8 GT/s lanes: 8 bus-ID: 01:00.0 chip-ID: 1002:694e class-ID: 0380
    temp: 47.0 C
  Device-3: Realtek Integrated_Webcam_HD driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-1:2 chip-ID: 0bda:58f4
    class-ID: 0e02 serial: <filter>
  Display: wayland server: X.org v: 1.21.1.18 with: Xwayland v: 24.1.8
    compositor: kwin_wayland driver: X: loaded: amdgpu,modesetting
    alternate: fbdev,vesa dri: iris,radeonsi gpu: i915 display-ID: 0
  Monitor-1: eDP-1 model: Sharp 0x148d built: 2018 res: mode: 3840x2160
    hz: 60 scale: 190% (1.9) to: 2021x1137 dpi: 284 gamma: 1.2 chroma: red:
    x: 0.667 y: 0.325 green: x: 0.208 y: 0.737 blue: x: 0.145 y: 0.047 white:
    x: 0.318 y: 0.337 size: 344x194mm (13.54x7.64") diag: 395mm (15.5")
    ratio: 16:9 modes: 3840x2160
  EDID-Warnings: 1: parse_edid: unknown flag 0
  API: EGL v: 1.5 hw: drv: intel iris drv: amd radeonsi platforms: device: 0
    drv: radeonsi device: 1 drv: iris device: 2 drv: swrast gbm: drv: radeonsi
    surfaceless: drv: radeonsi wayland: drv: iris x11: drv: iris
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 25.2.1-arch1.4
    glx-v: 1.4 direct-render: yes renderer: Mesa Intel HD Graphics 630 (KBL GT2)
    device-ID: 8086:591b memory: 14.98 GiB unified: yes display-ID: :1.0
  API: Vulkan v: 1.4.321 layers: N/A device: 0 type: discrete-gpu name: AMD
    Radeon RX Vega M GL Graphics (RADV VEGAM) driver: mesa radv
    v: 25.2.1-arch1.4 device-ID: 1002:694e surfaces: N/A device: 1
    type: integrated-gpu name: Intel HD Graphics 630 (KBL GT2)
    driver: mesa intel v: 25.2.1-arch1.4 device-ID: 8086:591b surfaces: N/A
  Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo
    de: kscreen-console,kscreen-doctor wl: wayland-info x11: xdpyinfo,xprop
Audio:
  Device-1: Intel CM238 HD Audio vendor: Dell driver: snd_hda_intel v: kernel
    alternate: snd_soc_avs bus-ID: 00:1f.3 chip-ID: 8086:a171 class-ID: 0403
  API: ALSA v: k6.12.44-3-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 1.4.7 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter
    vendor: Rivet Networks Killer 1435 Wireless-AC driver: ath10k_pci v: kernel
    pcie: gen: 1 speed: 2.5 GT/s lanes: 1 bus-ID: 02:00.0 chip-ID: 168c:003e
    class-ID: 0280 temp: 44.0 C
  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
  Info: services: NetworkManager, systemd-timesyncd, wpa_supplicant
  WAN IP: <filter>
Bluetooth:
  Device-1: Foxconn / Hon Hai driver: btusb v: 0.8 type: USB rev: 1.1
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-6:3 chip-ID: 0489:e0a2
    class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 1 state: up address: see --recommends
Logical:
  Message: No logical block device data found.
RAID:
  Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci
    v: 3.0 port: f060 bus-ID: 00:17.0 chip-ID: 8086:282a rev: N/A class-ID: 0104
Drives:
  Local Storage: total: 920.39 GiB used: 22.03 GiB (2.4%)
  ID-1: /dev/sda maj-min: 8:0 vendor: SanDisk model: USB 3.2Gen1
    size: 920.39 GiB block-size: physical: 512 B logical: 512 B type: USB
    rev: 3.2 spd: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1 tech: N/A serial: <filter>
    fw-rev: 1.00 scheme: GPT
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 500.85 GiB size: 500.85 GiB (100.00%)
    used: 22.03 GiB (4.4%) fs: btrfs dev: /dev/sda2 maj-min: 8:2 label: Manjaro
    uuid: c644b20e-9513-464b-a581-ea9771b369b5
  ID-2: /boot/efi raw-size: 1.95 GiB size: 1.95 GiB (99.80%)
    used: 632 KiB (0.0%) fs: vfat dev: /dev/sda1 maj-min: 8:1 label: EFI
    uuid: 106B-CBDA
  ID-3: /home raw-size: 500.85 GiB size: 500.85 GiB (100.00%)
    used: 22.03 GiB (4.4%) fs: btrfs dev: /dev/sda2 maj-min: 8:2 label: Manjaro
    uuid: c644b20e-9513-464b-a581-ea9771b369b5
  ID-4: /var/cache raw-size: 500.85 GiB size: 500.85 GiB (100.00%)
    used: 22.03 GiB (4.4%) fs: btrfs dev: /dev/sda2 maj-min: 8:2 label: Manjaro
    uuid: c644b20e-9513-464b-a581-ea9771b369b5
  ID-5: /var/log raw-size: 500.85 GiB size: 500.85 GiB (100.00%)
    used: 22.03 GiB (4.4%) fs: btrfs dev: /dev/sda2 maj-min: 8:2 label: Manjaro
    uuid: c644b20e-9513-464b-a581-ea9771b369b5
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) zswap: yes
    compressor: zstd max-pool: 20%
  ID-1: swap-1 type: partition size: 16.11 GiB used: 268 KiB (0.0%)
    priority: -2 dev: /dev/sda3 maj-min: 8:3 label: SWAP
    uuid: fa33a5cf-fd27-4ff1-95a1-2f401aec0d69
Unmounted:
  ID-1: /dev/sda4 maj-min: 8:4 size: 401.47 GiB fs: exfat label: USB_Shared
    uuid: EBBF-310F
USB:
  Hub-1: 1-0:1 info: hi-speed hub with single TT ports: 16 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Device-1: 1-1:2 info: Realtek Integrated_Webcam_HD type: video
    driver: uvcvideo interfaces: 4 rev: 2.0 speed: 480 Mb/s (57.2 MiB/s)
    lanes: 1 mode: 2.0 power: 500mA chip-ID: 0bda:58f4 class-ID: 0e02
    serial: <filter>
  Device-2: 1-6:3 info: Foxconn / Hon Hai type: bluetooth driver: btusb
    interfaces: 2 rev: 1.1 speed: 12 Mb/s (1.4 MiB/s) lanes: 1 mode: 1.1
    power: 100mA chip-ID: 0489:e0a2 class-ID: e001
  Device-3: 1-10:4 info: Shenzhen Goodix Fingerprint Reader
    type: abstract (modem),CDC-data driver: N/A interfaces: 2 rev: 2.0
    speed: 12 Mb/s (1.4 MiB/s) lanes: 1 mode: 1.1 power: 100mA
    chip-ID: 27c6:5395 class-ID: 0a00 serial: <filter>
  Hub-2: 2-0:1 info: super-speed hub ports: 8 rev: 3.0
    speed: 5 Gb/s (596.0 MiB/s) lanes: 1 mode: 3.2 gen-1x1 chip-ID: 1d6b:0003
    class-ID: 0900
  Device-1: 2-1:2 info: SanDisk 3.2Gen1 type: mass storage driver: uas
    interfaces: 1 rev: 3.2 speed: 5 Gb/s (596.0 MiB/s) lanes: 1
    mode: 3.2 gen-1x1 power: 896mA chip-ID: 0781:55ab class-ID: 0806
    serial: <filter>
Sensors:
  System Temperatures: cpu: 55.0 C pch: 53.0 C mobo: 45.0 C sodimm: 44.0 C
    gpu: amdgpu temp: 47.0 C
  Fan Speeds (rpm): cpu: 2477
Repos:
  Packages: pm: pacman pkgs: 1319 libs: 354 tools: pamac pm: flatpak pkgs: 0
  Active pacman repo servers in: /etc/pacman.d/mirrorlist
    1: https://gsl-syd.mm.fcix.net/manjaro/stable/$repo/$arch
Processes:
  CPU top: 5 of 340
  1: cpu: 22.5% command: firefox pid: 29960 mem: 910.4 MiB (5.7%)
  2: cpu: 6.9% command: firefox pid: 32713 mem: 464.9 MiB (2.9%)
  3: cpu: 3.7% command: kwin_wayland pid: 1789 mem: 588.2 MiB (3.7%)
  4: cpu: 2.2% command: firefox pid: 30175 mem: 315.2 MiB (2.0%)
  5: cpu: 1.8% command: firefox pid: 30347 mem: 444.9 MiB (2.8%)
  Memory top: 5 of 340
  1: mem: 910.4 MiB (5.7%) command: firefox pid: 29960 cpu: 22.5%
  2: mem: 588.2 MiB (3.7%) command: kwin_wayland pid: 1789 cpu: 3.7%
  3: mem: 464.9 MiB (2.9%) command: firefox pid: 32713 cpu: 6.9%
  4: mem: 455.0 MiB (2.8%) command: plasmashell pid: 2029 cpu: 0.2%
  5: mem: 444.9 MiB (2.8%) command: firefox pid: 30347 cpu: 1.8%
Info:
  Processes: 340 Power: uptime: 4h 8m states: freeze,mem,disk suspend: deep
    avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
    suspend, test_resume image: 6.11 GiB services: org_kde_powerdevil,upowerd
    Init: systemd v: 257 default: graphical tool: systemctl
  Compilers: gcc: 15.2.1 Shell: Zsh v: 5.9 running-in: konsole inxi: 3.3.39

I think this was/is the wrong impression.

From the Manjaro wiki (Configure Graphics Cards - Manjaro):

PRIME GPU offloading

If your hardware includes more than one GPU card you can make use of PRIME offloading. PRIME is a technology used to manage hybrid graphics found on recent desktops and laptops (Optimus for NVIDIA, AMD Dynamic Switchable Graphics for Radeon). PRIME detects both cards and automatically selects Intel card by default; using the more powerful discrete graphics card, when called, for more demanding applications.

… when called …
This may be a bit ambiguous but for me, this never was automatic.
How would an application know whether it is demanding enough to warrant switching on your behalf (rhetorical question).

I myself have tried to use (years ago) it but apparently none of my applications where heavy enough to yield significantly better results with the extra AMD GPU.
The only result was more extra heat. :wink:
So I switched it off permanently.
(this is a at least 12 years old Sony Vajo Laptop)

It may not be entirely obvious when that content is quickly skimmed, but no, Manjaro does not automatically handle this for you.

Likewise, wheels on your car might turn automatically; if you have fuel in the tank, the engine is switched on, the transmission has been engaged, and you’ve taken your foot off the brake pedal.

In the case of dual GPUs a user is expected to configure the system as needed, and this may include manual installation and subsequent configuration of required packages, and (from observation) research, depending upon the hardware in play.

There are many forum topics regarding prime-run – mostly, from those having some amount of difficulty with it – however, you might be able to glean something useful from;

I’ve also taken the liberty of tailoring a forum search which might be helpful; limited to results from a former Manjaro moderator:

Regards.


Welcome to the Manjaro community

As a new or infrequent forum user, please take some time to familiarise yourself with Forum requirements, and the many ways to use the forum to your benefit.

To that end, links are provided (below) - Please use them.


Be prepared to provide outputs from various commands when asked. It’s equally important to provide as much actionable information as possible in your first post, rather than simply indicating there is a problem.

Waiting for someone to blindly ask questions is also counter-productive – typically, nobody has a :crystal_ball: at their disposal – Instead, please help others to make informed suggestions, based on information you provide.


Update Announcements

The Update Announcements contain important information and a Known Issues and Solutions section that should generally be checked before posting a request for support.

System Information

While information from *-fetch type apps might be fine for someone wishing to buy your computer, for Support purposes it’s better to ask your system directly; :eyes:

Output of the inxi command (with appropriate parameters, and formatted according to forum guidelines) will generate information useful for those wishing to help:

inxi --filter --verbosity=8

or the short form (preferred):

inxi -zv8
Highly Recommended
Technical Resources
Required Reading

This is not helpful as I do not have a NVIDIA card and prime-run is NVIDIA specific.

The section I referred to (quoted below) absolutely alludes to this happening automatically - twice. Perhaps it is worded incorrectly, but nonetheless still says it.

PRIME GPU offloading
If your hardware includes more than one GPU card you can make use of PRIME offloading. PRIME is a technology used to manage hybrid graphics found on recent desktops and laptops (Optimus for NVIDIA, AMD Dynamic Switchable Graphics for Radeon). PRIME detects both cards and automatically selects Intel card by default; using the more powerful discrete graphics card, when called, for more demanding applications.
In Manjaro this will automatically be available for hybrid graphics systems using intel/modesetting for the integrated card and free drivers (AMDGPU or Nouveau) for the dGPU.
You may choose to run a program with a specific GPU, prepending the application’s command with DRI_PRIME=x, where x is the card priority number.

Indeed, it is Nvidia specific. I have avoided Nvidia for perhaps a decade, myself. Apologies.

Based on the text you initially quoted it remains a description only of PRIME GPU offloading. However with that said, and with the additional text you have now included, I have to agree.

I therefore retract my previous comments as they were moreover based on momentary confusion with prime-run.

This tailored search might be more fruitful. :eyes:

Regards.

What it means is that both methods will be available when hybrid graphics are detected.
As opposed to: only one driver for one graphics card

There is one default - and one optional.
One of the two can be chosen with:
DRI_PRIME=1 program_name

DRI_PRIME=0 program_name is normally the default, as far as I remember, so prepending this is not needed.

I have seen in some distro that menu items where provided, where you could choose on program launch whether you wanted to use one or the other card.
Can’t remember which it was - it was some time ago.

It was never automatic - it was always the default card (the internal) and the external had to be explicitly specified with:
DRI_PRIME=1 program_name
(one can edit the .desktop file or create a second one to have a clickable option)