Nvidia Enabled but not in use

Im new to fedora. would be very grateful if u help me resolve this and help me get familiar with fedora. Thank You

So be default, i had noveau in use. Since i wanted nvidia to reduce some load on cpu, i installed nvidia driver from rpm fusion(followed their instruction for installation too). Note that my system is optimus laptop, so i got intel+gtx.

After installing nvidia, nvidia-smi commands working, but the Settings show Mesa Intel® UHD Graphics and also there is no process listed in nvidia gpu.

Please do let know what more information is needed. Im still a newbie, so just gave more context and less debugging information(some is listed below).

Fedora 39
Wayland(X11 present too, but i dont use it)

On second thought added some outputs:


Sun Apr 21 22:50:52 2024       
| NVIDIA-SMI 550.67                 Driver Version: 550.67         CUDA Version: 12.4     |
| 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        Off |   00000000:01:00.0 Off |                  N/A |
| N/A   48C    P8              2W /   30W |       4MiB /   4096MiB |      0%      Default |
|                                         |                        |                  N/A |
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|  No running processes found                                                             |

dnf list installed \*nvidia\*

Installed Packages
akmod-nvidia.x86_64                                                                                                  3:550.67-1.fc39                                                                              @rpmfusion-nonfree-updates
kmod-nvidia-6.8.6-200.fc39.x86_64.x86_64                                                                             3:550.67-1.fc39                                                                              @@commandline             
nvidia-modprobe.x86_64                                                                                               3:550.67-1.fc39                                                                              @rpmfusion-nonfree-updates
nvidia-persistenced.x86_64                                                                                           3:550.67-1.fc39                                                                              @rpmfusion-nonfree-updates
nvidia-settings.x86_64                                                                                               3:550.67-1.fc39                                                                              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia.x86_64                                                                                           3:550.67-1.fc39                                                                              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda.x86_64                                                                                      3:550.67-1.fc39                                                                              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda-libs.i686                                                                                   3:550.67-1.fc39                                                                              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-cuda-libs.x86_64                                                                                 3:550.67-1.fc39                                                                              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-kmodsrc.x86_64                                                                                   3:550.67-1.fc39                                                                              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-libs.i686                                                                                        3:550.67-1.fc39                                                                              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-libs.x86_64                                                                                      3:550.67-1.fc39                                                                              @rpmfusion-nonfree-updates
xorg-x11-drv-nvidia-power.x86_64                                                                                     3:550.67-1.fc39                                                                              @rpmfusion-nonfree-updates

lspci -k | grep -i nvidia

01:00.0 VGA compatible controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] (rev a1)
        Kernel driver in use: nvidia
        Kernel modules: nouveau, nvidia_drm, nvidia
01:00.1 Audio device: NVIDIA Corporation Device 10fa (rev a1)

glxinfo | grep "OpenGL renderer"

OpenGL renderer string: Mesa Intel(R) UHD Graphics (CML GT2)

sudo lshw -c video

       description: VGA compatible controller
       product: TU117M [GeForce GTX 1650 Mobile / Max-Q]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: iomemory:600-5ff iomemory:600-5ff irq:157 memory:a0000000-a0ffffff memory:6000000000-600fffffff memory:6010000000-6011ffffff ioport:4000(size=128) memory:a1080000-a10fffff
       description: VGA compatible controller
       product: CometLake-H GT2 [UHD Graphics]
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 05
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: iomemory:600-5ff iomemory:400-3ff irq:144 memory:6012000000-6012ffffff memory:4000000000-400fffffff ioport:5000(size=64) memory:c0000-dffff

cat /etc/default/grub

GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_CMDLINE_LINUX="rd.driver.blacklist=nouveau modprobe.blacklist=nouveau resume=UUID=1c89d66a-f25b-4511-892c-aec873840a6c rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau"

Removed audio

At some point it seems that something you have done has removed the nvidia-gpu-firmware package, which is required for nvidia GPUs.
Please run sudo dnf reinstall linux-firmware to reinstall the nvidia firmware package, then reboot so the device is properly supported.

Note that if you are using wayland it appears the only time the nvidia gpu is used would be when the user chooses to right click on the icon before launching an app and then selects to launch using the discrete gpu.

If you wish to use x11 then you can follow the instructions here and set the nvidia gpu to be primary after which it would be used full time.

So folliwing that link, X11 uses nvidia now.

But wayland isnt showing any option to use “nvidia” when i tried to watch a video. moreover it said codec is not supported :

VLC could not decode the format "hevc" (MPEG-H Part2/HEVC (H.265))
VLC could not decode the format "eac3" (A/52 B Audio (aka E-AC3))

The codecs are a different issue and not GPU related.
The simplest way I know to enable (almost) all the available codecs is to run
sudo dnf install ffmpeg libavcodec-freeworld --allowerasing. Once done try using vlc again.

References for multimedia use on fedora are here.


Note that you may or may not need the part about hardware accelerated from rpmfusion. I suggest you simply do not install any extra until you test with the command I already provided, then only install what is absolutely necessary and do not just install everything in that reference page.

got it.

The nvidia is also being used when needed in wayland. Thank you