Nvidia DGPU & Setting It Up As Main/Secondary GPU

To start, yes, I’ve installed the drivers; my machine recognizes the GPU just fine (hell, it’s in my fetch!) but for some reason only wants to fully acknowledge my Intel IGPU:

> glxinfo | grep -e OpenGL.vendor -e OpenGL.renderer
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) UHD Graphics (CML GT2)

And here’s proof that the drivers ARE installed:

> nvidia-smi
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.126.18             Driver Version: 580.126.18     CUDA Version: 13.0     |
+-----------------------------------------+------------------------+----------------------+
| 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 GTX 1650 Ti     Off |   00000000:01:00.0 Off |                  N/A |
| N/A   38C    P8              1W /   50W |       4MiB /   4096MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A            3352      G   /usr/bin/gnome-shell                      1MiB |
+-----------------------------------------------------------------------------------------+

I’ve done pretty much almost everything under the sun, including but not limited to:

  • Creating a script that runs the DGPU in the bin & making that an executable: __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia "$@"
  • Using that line of code on Modrinth (a Minecraft Launcher) for one of the two options: pre-wrapper and line commands.
  • Trying to access my BIOS and enable it from there, but for some reason the option was missing. Genuinely stumped me there because I remember seeing that option before I installed Linux on this machine.
  • Trying to use the Nvidia driver GUI to enable it, but to no avail, the option was not there as well.

I’ve run out of options and this seems to have been an ongoing problem for the Linux community as a whole for a nearly decade (i’ve dug through posts that were 7< years old to try and find a solution).

Does anyone have any other suggestions? I thought about trying to force Java to use my DGPU but there doesn’t seem to be many Linux-friendly resources for that. If anyone has a relatively easy solution that doesn’t require me reading another 5< year old post, that’d be great. Either that, or I’m missing something entirely that’s super accessible and I’m just blind.

And just for clarity, my Fedora version is the following (on Wayland too):

cat /etc/fedora-release
Fedora release 43 (Forty Three)

Thanks.

You can try using the switcherooctl command. Example:

  switcherooctl list
  Device: 0
    Name:        NVIDIA Corporation [...]
  [...]

  switcherooctl launch --gpu=0 glxinfo ...

Also, I guess that you are using the nvidia driver from rpmfusion.
What gives: dnf -q list --installed \*nvidia\*

Finally, what is the output of: inxi -Gzxx

I know cinnamon and gnome-shell have builtin support for switcheroo, right click on the menu item and and select “Launch using Dedicated Graphics Card”

1 Like

Yeah, this worked for applications that are directly on the desktop. I ran Half-Life under it and my DGPU did start to work.

> nvidia-smi   
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.126.18             Driver Version: 580.126.18     CUDA Version: 13.0     |
+-----------------------------------------+------------------------+----------------------+
| 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 GTX 1650 Ti     Off |   00000000:01:00.0 Off |                  N/A |
| N/A   35C    P5              5W /   50W |     229MiB /   4096MiB |     25%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A            3709      G   /usr/bin/gnome-shell                      1MiB |
|    0   N/A  N/A           14539      G   ...share/Steam/ubuntu12_32/steam          3MiB |
|    0   N/A  N/A           14768      G   ./steamwebhelper                         33MiB |
|    0   N/A  N/A           14804    C+G   ...am/ubuntu12_64/steamwebhelper          4MiB |
|    0   N/A  N/A           15661      G   ...pps/common/Half-Life/hl_linux        181MiB |
+-----------------------------------------------------------------------------------------+

But, it doesn’t work for the MC launcher, because it has to open a brand new application under Java that doesn’t need to be launched with the DGPU as well.
(Little update: now running the DGPU under Modrinth crashes it :+1:)

I’m going to find a way to just make my DGPU default rather than doing this entire workaround for every single application I want to launch.

To answer, yes it was RPMFusion:

> dnf -q list --installed \*nvidia\*


Installed packages
akmod-nvidia.x86_64                       3:580.126.18-1.fc43 rpmfusion-nonfree-updates
kmod-nvidia-6.19.8-200.fc43.x86_64.x86_64 3:580.126.18-1.fc43 @commandline
nvidia-gpu-firmware.noarch                20260309-1.fc43     <unknown>
nvidia-modprobe.x86_64                    3:580.126.18-1.fc43 rpmfusion-nonfree-updates
nvidia-persistenced.x86_64                3:580.126.18-1.fc43 rpmfusion-nonfree-nvidia-driver
nvidia-settings.x86_64                    3:580.126.18-1.fc43 rpmfusion-nonfree-updates
xorg-x11-drv-nvidia.x86_64                3:580.126.18-1.fc43 rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda.x86_64           3:580.126.18-1.fc43 rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.i686        3:580.126.18-1.fc43 rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.x86_64      3:580.126.18-1.fc43 rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-kmodsrc.x86_64        3:580.126.18-1.fc43 rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-libs.i686             3:580.126.18-1.fc43 rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-libs.x86_64           3:580.126.18-1.fc43 rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-power.x86_64          3:580.126.18-1.fc43 rpmfusion-nonfree-updates

And the output from inxi was:

> inxi -Gzxx
Graphics:
  Device-1: Intel CometLake-H GT2 [UHD Graphics] vendor: ASUSTeK driver: i915
    v: kernel arch: Gen-9.5 ports: active: eDP-1 empty: none bus-ID: 00:02.0
    chip-ID: 8086:9bc4
  Device-2: NVIDIA TU117M [GeForce GTX 1650 Ti Mobile] vendor: ASUSTeK
    driver: nvidia v: 580.126.18 arch: Turing pcie: speed: 2.5 GT/s lanes: 8
    ports: active: none empty: DP-1,HDMI-A-1 bus-ID: 01:00.0
    chip-ID: 10de:1f95
  Display: wayland server: Xwayland v: 24.1.9 compositor: gnome-shell
    v: 49.4 driver: gpu: i915 display-ID: 0
  Monitor-1: eDP-1 model: Najing CEC Panda 0x004d res: 1920x1080 dpi: 142
    diag: 395mm (15.5")
  API: OpenGL v: 4.6 vendor: intel mesa v: 25.3.6 glx-v: 1.4 es-v: 3.2
    direct-render: yes renderer: Mesa Intel UHD Graphics (CML GT2)
    device-ID: 8086:9bc4 display-ID: :0.0
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
  Info: Tools: api: glxinfo gpu: nvidia-settings,nvidia-smi x11: xdriinfo,
    xdpyinfo, xprop, xrandr

I also read up on switcherooctl:

https://en.opensuse.org/SDB:NVIDIA_Switcheroo_Control

(FYI: switcherootctl showed that my Nvidia card was device 1 as opposed to device 0; as can be seen with inxi above)

It doesn’t exactly help me in my situation; it only helped for what Scott commented on. I tried digging for a “how can I switch graphics card defaults” but nothing turned up for this command.

I mean yeah, sure, I can just do this every single time:
switcherooctl launch -gpu=1 <application>

But like I said, it’s the same as right-clicking the application and selecting the “Run on Discrete Graphics” option.

I’m still not entirely sure why it defaulted to the Intel IGPU; as I’ve seen instances of people having the DGPU set to default rather than the issue I’m having.

It’s simple (now) with Xorg, but you are using wayland.

I dig a little, found NVIDIA “PrimaryGPU” Support Wayland, but no real solution in it.

No solution either in the Related topics below.