You are not logged in.

#1 2025-03-29 09:52:54

MT Unixic
Member
Registered: 2025-03-29
Posts: 15

[SOLVED] nvidia-smi doesn't detect my GPU

hello, I've recently just reinstalled Arch on my computer after wayland completely failed to boot with crashes. Now everything works besides my NVIDIA GPU for some reason. I've followed this github nvidia tutorial that was always reliable but this time my GPU didn't even show up on system monitor nor did it show anything using nvidia-smi.

❯ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

output of lspci -k | grep -A 2 -E "(VGA|3D)"

❯ lspci -k | grep -A 2 -E "(VGA|3D)"
04:00.0 VGA compatible controller: NVIDIA Corporation GA107 [GeForce RTX 3050 6GB] (rev a1)
	Subsystem: NVIDIA Corporation GA107 [GeForce RTX 3050 6GB]
	Kernel driver in use: nouveau

pacman -Qs nvidia

❯ pacman -Qs nvidia
local/cuda 12.8.1-1
    NVIDIA's GPU programming toolkit
local/cuda-tools 12.8.1-1
    NVIDIA's GPU programming toolkit (extra tools: nvvp, nsight)
local/egl-gbm 1.1.2.1-1
    The GBM EGL external platform library
local/egl-wayland 4:1.1.18-1
    EGLStream-based Wayland external platform
local/egl-x11 1.0.0-1
    NVIDIA XLib and XCB EGL Platform Library
local/lib32-libvdpau 1.5-3
    Nvidia VDPAU library
local/lib32-nvidia-utils 570.133.07-1
    NVIDIA drivers utilities (32-bit)
local/libvdpau 1.5-3
    Nvidia VDPAU library
local/libxnvctrl 570.133.07-1
    NVIDIA NV-CONTROL X extension
local/nvidia-dkms 570.133.07-1
    NVIDIA kernel modules - module sources
local/nvidia-settings 570.133.07-1
    Tool for configuring the NVIDIA graphics driver
local/nvidia-utils 570.133.07-1
    NVIDIA drivers utilities
local/opencl-nvidia 570.133.07-1
    OpenCL implemention for NVIDIA

do note that i'm using linux-zen as my kernel instead of the normal linux, which is why I installed nvidia-dkms and dkms instead of just nvidia.

Kernel: linux-zen
GPU: NVIDIA GeForce 3050
CPU: AMD Ryzen 7 5800X
Bootloader: systemd-boot

Any help is greatly appreciated!! smile

Last edited by MT Unixic (2025-03-30 17:38:04)

Offline

#2 2025-03-29 09:55:30

seth
Member
Registered: 2012-09-03
Posts: 62,203

Re: [SOLVED] nvidia-smi doesn't detect my GPU

Kernel driver in use: nouveau

linux-zen as my kernel instead of the normal linux, which is why I installed nvidia-dkms

dkms status
pacman -Qs linux-zen-headers

Not sure how nouveau is loaded when nvidia-utils is installed, did you reboot after installing the nvidia drivers?

Offline

#3 2025-03-29 10:00:15

MT Unixic
Member
Registered: 2025-03-29
Posts: 15

Re: [SOLVED] nvidia-smi doesn't detect my GPU

❯ dkms status
nvidia/570.133.07, 6.13.8-zen1-1-zen, x86_64: installed
❯ pacman -Qs linux-zen-headers
local/linux-zen-headers 6.13.8.zen1-1
    Headers and scripts for building modules for the Linux ZEN kernel

wait what i didn't even install nouveau on my machine at all, and yes i did reboot several times.

Offline

#4 2025-03-29 10:18:04

seth
Member
Registered: 2012-09-03
Posts: 62,203

Re: [SOLVED] nvidia-smi doesn't detect my GPU

nouveau is part of the kernel and most likely in your initramfs - but the modprobe.conf blacklisting it isn't.
remove the kms hook and re-generate the initramfs.

Offline

#5 2025-03-29 10:33:19

MT Unixic
Member
Registered: 2025-03-29
Posts: 15

Re: [SOLVED] nvidia-smi doesn't detect my GPU

seth wrote:

remove the kms hook and re-generate the initramfs.

it already is though

(/etc/mkinitcpio.conf)
HOOKS=(base udev autodetect microcode modconf keyboard keymap plymouth consolefont block filesystems fsck)

i'm confused; it already isn't in mkinitcpio.conf (while already regenerated btw) but nouveau is there. how?
i did replace grub with systemd-boot when i reinstalled for faster bootup times but thats about it.

if you have any idea please enlighten me, thanks.

Last edited by MT Unixic (2025-03-29 11:17:08)

Offline

#6 2025-03-29 10:39:13

seth
Member
Registered: 2012-09-03
Posts: 62,203

Re: [SOLVED] nvidia-smi doesn't detect my GPU

Please post your complete system journal for the boot:

sudo journalctl -b | curl -F 'file=@-' 0x0.st

Offline

#7 2025-03-29 10:44:04

MT Unixic
Member
Registered: 2025-03-29
Posts: 15

Re: [SOLVED] nvidia-smi doesn't detect my GPU

seth wrote:

Please post your complete system journal for the boot:

sudo journalctl -b | curl -F 'file=@-' 0x0.st

it's very big, here you go:

❯ sudo journalctl -b | curl -F 'file=@-' 0x0.st
[sudo] password for MT: 
http://0x0.st/8el5.txt

Last edited by MT Unixic (2025-03-29 11:16:57)

Offline

#8 2025-03-29 10:51:07

seth
Member
Registered: 2012-09-03
Posts: 62,203

Re: [SOLVED] nvidia-smi doesn't detect my GPU

lol, 4604 lines. "big". pfff… wink

nouveau is still in the initramfs, either the regeneration failed or was done before you removed the kms hook or the nouveau module is listed explicitly in teh MODULES array.
Post your mkinitcpio.conf and the I/O of regenerating the initramfs (once more)

Offline

#9 2025-03-29 10:57:10

MT Unixic
Member
Registered: 2025-03-29
Posts: 15

Re: [SOLVED] nvidia-smi doesn't detect my GPU

seth wrote:

lol, 4604 lines. "big". pfff… wink

oh wow they can be much bigger, huh?

nouveau is still in the initramfs, either the regeneration failed or was done before you removed the kms hook or the nouveau module is listed explicitly in the MODULES array.

it maybe bootctl's fault but i have no idea

Post your mkinitcpio.conf and the I/O of regenerating the initramfs (once more)

here you go:

sudo vim /etc/mkinitcpio.conf
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(usbhid xhci_hcd)
MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=()

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No RAID, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect modconf block filesystems fsck)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev modconf block filesystems fsck)
#
##   This setup assembles a mdadm array with an encrypted root file system.
##   Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
#    HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
#
##   This setup loads an lvm2 volume group.
#    HOOKS=(base udev modconf block lvm2 filesystems fsck)
#
##   This will create a systemd based initramfs which loads an encrypted root filesystem.
#    HOOKS=(base systemd autodetect modconf kms keyboard sd-vconsole sd-encrypt block filesystems fsck)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr and fsck hooks.
HOOKS=(base udev autodetect microcode modconf keyboard keymap plymouth consolefont block filesystems fsck)

# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used for Linux ≥ 5.9 and gzip compression is used for Linux < 5.9.
# Use 'cat' to create an uncompressed image.
#COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

# MODULES_DECOMPRESS
# Decompress loadable kernel modules and their firmware during initramfs
# creation. Switch (yes/no).
# Enable to allow further decreasing image size when using high compression
# (e.g. xz -9e or zstd --long --ultra -22) at the expense of increased RAM usage
# at early boot.
# Note that any compressed files will be placed in the uncompressed early CPIO
# to avoid double compression.
#MODULES_DECOMPRESS="no"
❯ sudo mkinitcpio -P
[sudo] password for MT: 
==> Building image from preset: /etc/mkinitcpio.d/linux-zen.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux-zen -g /boot/initramfs-linux-zen.img
==> Starting build: '6.13.8-zen1-1-zen'
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [microcode]
  -> Running build hook: [modconf]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [plymouth]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [block]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-zen.img'
  -> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux-zen.preset: 'fallback'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux-zen -g /boot/initramfs-linux-zen-fallback.img -S autodetect
==> Starting build: '6.13.8-zen1-1-zen'
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [microcode]
  -> Running build hook: [modconf]
  -> Running build hook: [keyboard]
==> WARNING: Possibly missing firmware for module: 'xhci_pci_renesas'
  -> Running build hook: [keymap]
  -> Running build hook: [plymouth]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'qla1280'
==> WARNING: Possibly missing firmware for module: 'qed'
==> WARNING: Possibly missing firmware for module: 'aic94xx'
==> WARNING: Possibly missing firmware for module: 'wd719x'
==> WARNING: Possibly missing firmware for module: 'qla2xxx'
==> WARNING: Possibly missing firmware for module: 'bfa'
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-zen-fallback.img'
  -> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful

Last edited by MT Unixic (2025-03-29 11:16:43)

Offline

#10 2025-03-29 11:09:24

seth
Member
Registered: 2012-09-03
Posts: 62,203

Re: [SOLVED] nvidia-smi doesn't detect my GPU

You're booting from a boot partition, but the journal only shows

Mar 29 10:55:17 ArchMyBeloved systemd[1]: Mounting /boot/efi...
Mar 29 10:55:17 ArchMyBeloved systemd[1]: Mounted /boot/efi.

being mounted, so the initramfs is possibly written into the wrong location.
Is there (an old) one in /boot/efi ?

Offline

#11 2025-03-29 11:15:47

MT Unixic
Member
Registered: 2025-03-29
Posts: 15

Re: [SOLVED] nvidia-smi doesn't detect my GPU

seth wrote:

You're booting from a boot partition, but the journal only shows

Mar 29 10:55:17 ArchMyBeloved systemd[1]: Mounting /boot/efi...
Mar 29 10:55:17 ArchMyBeloved systemd[1]: Mounted /boot/efi.

being mounted, so the initramfs is possibly written into the wrong location.
Is there (an old) one in /boot/efi ?

hm, it is a possibility, i don't know though.
here's the tree for /boot/efi btw (arch-zen.conf is the one set to default)

❯ cd /boot/efi
❯ tree
.
├── EFI
│   ├── BOOT
│   │   └── BOOTX64.EFI
│   ├── Linux
│   └── systemd
│       └── systemd-bootx64.efi
├── initramfs-linux-zen-fallback.img
├── initramfs-linux-zen.img
├── loader
│   ├── entries
│   │   ├── arch-zen.conf
│   │   └── arch.conf
│   ├── entries.srel
│   ├── keys
│   ├── loader.conf
│   └── random-seed
└── vmlinuz-linux-zen

8 directories, 10 files

Offline

#12 2025-03-29 11:19:49

seth
Member
Registered: 2012-09-03
Posts: 62,203

Re: [SOLVED] nvidia-smi doesn't detect my GPU

That's your boot partition and belongs into /boot, not /boot/efi, otherwise not only will you not be able to update the initramfs but also not the kernel (and then run into trouble because booted kernel and installed modules fall apart)

Offline

#13 2025-03-29 11:22:06

MT Unixic
Member
Registered: 2025-03-29
Posts: 15

Re: [SOLVED] nvidia-smi doesn't detect my GPU

That's your boot partition and belongs into /boot, not /boot/efi, otherwise not only will you not be able to update the initramfs but also not the kernel (and then run into trouble because booted kernel and installed modules fall apart)

oh, so what can i do now?

Last edited by MT Unixic (2025-03-29 11:42:37)

Offline

#14 2025-03-29 11:41:54

MT Unixic
Member
Registered: 2025-03-29
Posts: 15

Re: [SOLVED] nvidia-smi doesn't detect my GPU

seth?

Offline

#15 2025-03-29 11:44:48

MT Unixic
Member
Registered: 2025-03-29
Posts: 15

Re: [SOLVED] nvidia-smi doesn't detect my GPU

here's the lsblk if that helps wink

❯ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 953.9G  0 disk 
├─sda1   8:1    0   500M  0 part /boot/efi
├─sda2   8:2    0    16G  0 part [SWAP]
├─sda3   8:3    0  99.6G  0 part /
└─sda4   8:4    0 837.8G  0 part /home

Offline

#16 2025-03-29 11:52:10

MT Unixic
Member
Registered: 2025-03-29
Posts: 15

Re: [SOLVED] nvidia-smi doesn't detect my GPU

i have to go for a bit, i'll respond back in a lil while sad

Offline

#17 2025-03-29 13:28:48

MT Unixic
Member
Registered: 2025-03-29
Posts: 15

Re: [SOLVED] nvidia-smi doesn't detect my GPU

i'm back

Offline

#18 2025-03-29 17:34:15

seth
Member
Registered: 2012-09-03
Posts: 62,203

Re: [SOLVED] nvidia-smi doesn't detect my GPU

Though it might seem different (and wrt your DM inquiry), I'm not an AI running this 24/7 tongue
Also please don't blog or bump, edit your previous post if nobody has replied yet and being AFK is the default premise.
The forum is asynchronous, people will post when they've time.

Mount sda1 into /boot intead of /boot/efi and regenerate the initramfs.
Also fix your fstab itr.

That alone should do.

Offline

#19 2025-03-29 18:42:00

MT Unixic
Member
Registered: 2025-03-29
Posts: 15

Re: [SOLVED] nvidia-smi doesn't detect my GPU

seth wrote:

Though it might seem different (and wrt your DM inquiry), I'm not an AI running this 24/7 tongue
Also please don't blog or bump, edit your previous post if nobody has replied yet and being AFK is the default premise.
The forum is asynchronous, people will post when they've time.

my bad man, i didn't want to be rude but i got anxious, thanks for the tips.

Mount sda1 into /boot intead of /boot/efi and regenerate the initramfs.
Also fix your fstab itr.

I actually managed to fix the issue while you were gone; I did a lil more digging and the issue wasn't it being mounted into /boot/efi, it's actually correct since my pc is UEFI (i didn't know i had to mention that). i searched and looked and i found out you can just blacklist nouveau from even starting up if you create and edit /etc/modprobe.d/nouveau.conf and fill it with

blacklist nouveau
options nouveau modeset=0

then after that i regenerated mkinitcpio
and reinstalled nvidia packages

sudo mkinitcpio -P
sudo pacman -Syu nvidia-dkms
sudo pacman -S nvidia-utils nvidia-settings egl-wayland  #just in case egl-wayland might be important to reinstall

after that i simply rebooted and the GPU is now properly working infront of my eyes
it might not be the best fix but if it works, it works tongue

Thank you again for all your help, wouldn't have done it without you. If i'm missing anything or need me for any question, go ahead! smile

Last edited by MT Unixic (2025-03-29 18:45:21)

Offline

#20 2025-03-29 22:22:50

seth
Member
Registered: 2012-09-03
Posts: 62,203

Re: [SOLVED] nvidia-smi doesn't detect my GPU

The nvidia-utils package contains a modprobe config file that blacklists nouveau, you don't have to do that manually.

No matter where you want to boot the ESP, the kernel and initramfs go into /boot - if you want to boot from that partition, you *have* to mount it into /boot or the next kernel update will come to bite you.
Alternatively you can change your bootloader to boot from the root partition (where you're currently installing kernel and initramfs)

Offline

#21 2025-03-30 08:48:45

MT Unixic
Member
Registered: 2025-03-29
Posts: 15

Re: [SOLVED] nvidia-smi doesn't detect my GPU

whoops, sorry for the time gap tongue

seth wrote:

The nvidia-utils package contains a modprobe config file that blacklists nouveau, you don't have to do that manually.

interesting, i'lll look into it.

if you want to boot from that partition, you have to mount it into /boot or the next kernel update will come to bite you.

oh wow, thank you for the head-up i would NOT have known this yikes

Alternatively you can change your bootloader to boot from the root partition (where you're currently installing kernel and initramfs)

yeah that seems like a good fix, i'll try that.

If you have any suggestions or warning to tell, please enlighten me i'll respond back. smile

Offline

#22 2025-03-30 09:18:47

MT Unixic
Member
Registered: 2025-03-29
Posts: 15

Re: [SOLVED] nvidia-smi doesn't detect my GPU

seth wrote:

No matter where you want to boot the ESP, the kernel and initramfs go into /boot - if you want to boot from that partition, you *have* to mount it into /boot or the next kernel update will come to bite you.
Alternatively you can change your bootloader to boot from the root partition (where you're currently installing kernel and initramfs)

welp, i took your advice, and everything still works the same! Thanks man. smile

❯ lsblk -f

NAME   FSTYPE FSVER LABEL   UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                             
├─sda1 vfat   FAT32         B165-7B96                             152.3M    69% /boot
├─sda2 swap   1             4edf9674-da60-48fb-95db-af2cfdbd41cc                [SWAP]
├─sda3 ext4   1.0           9d0f8ecc-1e39-4b7a-96d0-627e30f1beac   57.4G    36% /
└─sda4 ext4   1.0           ea2842f5-e7a7-42ed-b274-fdd378d288d2  568.6G    26% /home

here's what i did if you're interested:

sudo cp -r /boot /boot_backup #just in case
sudo mv /boot/initramfs-linux-zen* /boot/EFI/
sudo mv /boot/vmlinuz-linux-zen /boot/EFI/
sudo mv /boot/loader /boot/EFI/
sudo vim /etc/fstab #i changed /dev/sda1 to boot into /boot instead of /boot/efi
sudo mv /boot/EFI/* /boot/
sudo rmdir /boot/EFI

after this, I booted into a live arch iso to complete rebuilding systemd-boot since it doesn't work when i run it on my home user.

swapon /dev/sda2
mount /dev/sda3 /mnt
mount /dev/sda4 /mnt/home
mount /dev/sda1 /mnt/boot
arch-chroot /mnt

after that i simply did:

sudo mkinitcpio -P
cp -r /boot/loader/entries/arch-zen.conf /boot/loader/entries/arch-zen_backup.conf # just in case i override the main default config
cp -r /boot/loader/entries/arch-zen.conf /boot/loader/entries/arch-.conf # this is more of a just in case thing, it isn't necessary but i wanted to be safe
sudo bootctl install

exit
umount -a
reboot

and then after that everything worked again. tongue
again, if you have any suggestions or warning to tell, please enlighten me and i'll try to respond back.

Last edited by MT Unixic (2025-03-30 09:20:20)

Offline

#23 2025-03-30 10:42:30

seth
Member
Registered: 2012-09-03
Posts: 62,203

Re: [SOLVED] nvidia-smi doesn't detect my GPU

\o/
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#24 2025-03-30 17:36:19

MT Unixic
Member
Registered: 2025-03-29
Posts: 15

Re: [SOLVED] nvidia-smi doesn't detect my GPU

seth wrote:

\o/
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

No, thank YOU for all your help seth, seriously.
I'll mark it as solved now.

If you need anything i'll respond.

Offline

Board footer

Powered by FluxBB