I also need to use these cuda with nvidia drivers and found this working for me. I run these steps and then able to run cuda core apps afterwards. Thanks for that.

Now the issue i’m facing is now both the igpu and dpgu shows blank screen. I’m able to access the system only with remote ssh now.
Please help me how to fix this now.
The command lspci -k | grep -i nvidia
shows:
01:00.0 VGA compatible controller: NVIDIA Corporation GM107GL [Quadro K620] (rev a2)
Subsystem: NVIDIA Corporation Device 1098
Kernel driver in use: nvidia
Kernel modules: nouveau, nvidia_drm, nvidia
01:00.1 Audio device: NVIDIA Corporation GM107 High Definition Audio Controller [GeForce 940MX] (rev a1)
Subsystem: NVIDIA Corporation Device 1098
The command nvidia-smi
shows:
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 560.35.03 Driver Version: 560.35.03 CUDA Version: 12.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 Quadro K620 Off | 00000000:01:00.0 On | N/A |
| 34% 44C P8 1W / 30W | 10MiB / 2048MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
+-----------------------------------------------------------------------------------------+
The command sudo dnf repolist
shows:
repo id repo name
copr:copr.fedorainfracloud.org:phracek:PyCharm Copr repo for PyCharm owned by phracek
copr:copr.fedorainfracloud.org:rockowitz:ddcutil Copr repo for ddcutil owned by rockowitz
cuda-fedora39-12-6-local cuda-fedora39-12-6-local
fedora Fedora 39 - x86_64
fedora-cisco-openh264 Fedora 39 openh264 (From Cisco) - x86_64
gitlab.com_paulcarroty_vscodium_repo download.vscodium.com
google-chrome google-chrome
microsoft-edge microsoft-edge
packages.microsoft.com_yumrepos_edge created by dnf config-manager from https://packages.microsoft.com/yumrepos/edge
rpmfusion-free RPM Fusion for Fedora 39 - Free
rpmfusion-free-updates RPM Fusion for Fedora 39 - Free - Updates
rpmfusion-nonfree RPM Fusion for Fedora 39 - Nonfree
rpmfusion-nonfree-nvidia-driver RPM Fusion for Fedora 39 - Nonfree - NVIDIA Driver
rpmfusion-nonfree-steam RPM Fusion for Fedora 39 - Nonfree - Steam
rpmfusion-nonfree-updates RPM Fusion for Fedora 39 - Nonfree - Updates
updates Fedora 39 - x86_64 - Updates
The command lsmod | grep nouveau
shows nothing. It’s just blank .
The command dnf list installed '*nvidia*'
shows :
Installed Packages
akmod-nvidia.x86_64 3:560.35.03-1.fc39 @rpmfusion-nonfree-nvidia-driver
kmod-nvidia-6.11.4-101.fc39.x86_64.x86_64
3:560.35.03-1.fc39 @@commandline
libnvidia-cfg.x86_64 3:560.35.03-1.fc39 @cuda-fedora39-x86_64
libnvidia-fbc.x86_64 3:560.35.03-1.fc39 @cuda-fedora39-x86_64
libnvidia-ml.x86_64 3:560.35.03-1.fc39 @cuda-fedora39-x86_64
nvidia-driver-cuda.x86_64 3:560.35.03-1.fc39 @cuda-fedora39-12-6-local
nvidia-driver-cuda-libs.x86_64 3:560.35.03-1.fc39 @cuda-fedora39-x86_64
nvidia-driver-libs.x86_64 3:560.35.03-1.fc39 @cuda-fedora39-x86_64
nvidia-kmod-common.noarch 3:560.35.03-1.fc39 @cuda-fedora39-12-6-local
nvidia-libXNVCtrl.x86_64 3:560.35.03-1.fc39 @cuda-fedora39-x86_64
nvidia-libXNVCtrl-devel.x86_64 3:560.35.03-1.fc39 @cuda-fedora39-x86_64
nvidia-modprobe.x86_64 3:560.35.03-1.fc39 @cuda-fedora39-x86_64
nvidia-persistenced.x86_64 3:560.35.03-1.fc39 @cuda-fedora39-x86_64
nvidia-xconfig.x86_64 3:560.35.03-1.fc39 @cuda-fedora39-x86_64
xorg-x11-drv-nvidia-kmodsrc.x86_64 3:560.35.03-5.fc39 @rpmfusion-nonfree-nvidia-driver
The command inxi -Fzxx
shows :
System:
Kernel: 6.11.4-101.fc39.x86_64 arch: x86_64 bits: 64 compiler: gcc
v: 2.40-14.fc39
Console: pty pts/0 DM: GDM Distro: Fedora Linux 39 (Workstation Edition)
Machine:
Type: Desktop Mobo: Gigabyte model: B85M-D3H v: x.x
serial: <superuser required> UEFI: American Megatrends v: FD
date: 08/12/2015
CPU:
Info: quad core model: Intel Core i7-4770 bits: 64 type: MT MCP
arch: Haswell rev: 3 cache: L1: 256 KiB L2: 1024 KiB L3: 8 MiB
Speed (MHz): avg: 2532 high: 3864 min/max: 800/3900 cores: 1: 3854 2: 800
3: 3864 4: 3792 5: 800 6: 2553 7: 800 8: 3793 bogomips: 54274
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics
vendor: Gigabyte driver: i915 v: kernel arch: Gen-7.5 ports: active: none
empty: HDMI-A-1,HDMI-A-2,VGA-1 bus-ID: 00:02.0 chip-ID: 8086:0412
Device-2: NVIDIA GM107GL [Quadro K620] driver: nvidia v: 560.35.03
arch: Maxwell pcie: speed: 2.5 GT/s lanes: 16 ports: active: none off: DP-1
empty: DVI-I-1 bus-ID: 01:00.0 chip-ID: 10de:13bb
Display: server: X.org v: 1.20.14 with: Xwayland v: 23.2.7 driver:
gpu: nvidia,nvidia-nvswitch note: X driver n/a, try sudo/root tty: 80x24
Monitor-1: DP-1 model: BenQ GW2490 res: 1920x1080 dpi: 93
diag: 604mm (23.8")
API: EGL v: 1.5 platforms: device: 0 drv: nvidia device: 1 drv: crocus
device: 3 drv: swrast surfaceless: drv: nvidia
inactive: gbm,wayland,x11,device-2
API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: mesa v: 23.3.6
note: console (EGL sourced) renderer: Quadro K620/PCIe/SSE2, Mesa Intel HD
Graphics 4600 (HSW GT2), llvmpipe (LLVM 17.0.6 256 bits)
API: Vulkan v: 1.3.275 surfaces: N/A device: 0 type: discrete-gpu
driver: N/A device-ID: 10de:13bb device: 1 type: integrated-gpu driver: N/A
device-ID: 8086:0412 device: 2 type: cpu driver: N/A device-ID: 10005:0000
Audio:
Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio
driver: snd_hda_intel v: kernel bus-ID: 00:03.0 chip-ID: 8086:0c0c
Device-2: Intel 8 Series/C220 Series High Definition Audio
vendor: Gigabyte driver: snd_hda_intel v: kernel bus-ID: 00:1b.0
chip-ID: 8086:8c20
Device-3: NVIDIA GM107 High Definition Audio [GeForce 940MX]
driver: snd_hda_intel v: kernel pcie: speed: 5 GT/s lanes: 16
bus-ID: 01:00.1 chip-ID: 10de:0fbc
API: ALSA v: k6.11.4-101.fc39.x86_64 status: kernel-api
Server-1: JACK v: 1.9.22 status: off
Server-2: PipeWire v: 1.0.8 status: off with: 1: pipewire-pulse
status: off 2: wireplumber status: off 3: pipewire-alsa type: plugin
Network:
Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
vendor: Gigabyte driver: r8169 v: kernel pcie: speed: 2.5 GT/s lanes: 1
port: d000 bus-ID: 03:00.0 chip-ID: 10ec:8168
IF: enp3s0 state: up speed: 100 Mbps duplex: full mac: <filter>
Drives:
Local Storage: total: 465.76 GiB used: 98.53 GiB (21.2%)
ID-1: /dev/sda vendor: Crucial model: CT500BX500SSD1 size: 465.76 GiB
speed: 6.0 Gb/s serial: <filter> temp: 33 C
Partition:
ID-1: / size: 464.17 GiB used: 98.12 GiB (21.1%) fs: btrfs dev: /dev/sda3
ID-2: /boot size: 973.4 MiB used: 397.8 MiB (40.9%) fs: ext4
dev: /dev/sda2
ID-3: /boot/efi size: 598.8 MiB used: 19 MiB (3.2%) fs: vfat
dev: /dev/sda1
ID-4: /home size: 464.17 GiB used: 98.12 GiB (21.1%) fs: btrfs
dev: /dev/sda3
Swap:
ID-1: swap-1 type: zram size: 7.64 GiB used: 0 KiB (0.0%) priority: 100
dev: /dev/zram0
Sensors:
System Temperatures: cpu: 39.0 C mobo: N/A
Fan Speeds (rpm): N/A
Info:
Memory: total: 8 GiB available: 7.64 GiB used: 946.2 MiB (12.1%)
Processes: 221 Power: uptime: 3h 45m wakeups: 0 Init: systemd v: 254
target: graphical (5) default: graphical
Packages: pm: flatpak pkgs: 6 Compilers: gcc: 13.3.1 Shell: Bash v: 5.2.26
running-in: pty pts/0 inxi: 3.3.34
cat /proc/cmdline
BOOT_IMAGE=(hd0,gpt2)/vmlinuz-6.11.4-101.fc39.x86_64 root=UUID=0640163d-c97b-49a8-8249-bdb3990268ea ro rootflags=subvol=root rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau
the output of sudo dmesg | grep -iE "nouveau|nvidia|secure"
[ 0.000000] Command line: BOOT_IMAGE=(hd0,gpt2)/vmlinuz-6.11.4-101.fc39.x86_64 root=UUID=0640163d-c97b-49a8-8249-bdb3990268ea ro rootflags=subvol=root rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau
[ 0.000000] secureboot: Secure boot disabled
[ 0.007551] secureboot: Secure boot disabled
[ 0.036497] Kernel command line: BOOT_IMAGE=(hd0,gpt2)/vmlinuz-6.11.4-101.fc39.x86_64 root=UUID=0640163d-c97b-49a8-8249-bdb3990268ea ro rootflags=subvol=root rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau
[ 4.058066] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2/input11
[ 4.058133] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2/input12
[ 4.058187] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2/input13
[ 4.058241] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2/input14
[ 5.733030] nvidia: loading out-of-tree module taints kernel.
[ 5.733040] nvidia: module license 'NVIDIA' taints kernel.
[ 5.733044] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[ 5.733045] nvidia: module license taints kernel.
[ 6.225974] nvidia-nvlink: Nvlink Core is being initialized, major device number 234
[ 6.227139] nvidia 0000:01:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=none:owns=none
[ 6.455404] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 560.35.03 Fri Aug 16 21:39:15 UTC 2024
[ 6.576055] nvidia_uvm: module uses symbols nvUvmInterfaceDisableAccessCntr from proprietary module nvidia, inheriting taint.
[ 6.718065] nvidia-uvm: Loaded the UVM driver, major device number 510.
[ 6.789142] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms 560.35.03 Fri Aug 16 21:21:48 UTC 2024
[ 6.796067] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[ 7.760767] [drm] Initialized nvidia-drm 0.0.0 for 0000:01:00.0 on minor 2
[ 7.779637] nvidia 0000:01:00.0: vgaarb: deactivate vga console
[ 7.880175] fbcon: nvidia-drmdrmfb (fb0) is primary device
[ 7.880178] nvidia 0000:01:00.0: [drm] fb0: nvidia-drmdrmfb frame buffer device
I understand i had to do something with switching the display to igpu and install specific driver for the igpu. But i’m not sure how to work out that.Thanks.