You are not logged in.

#1 2024-06-15 09:03:44

marennn342352
Member
Registered: 2024-06-14
Posts: 5

Nvidia driver not working - stuck at black screen

Hello,

I originally installed arch with archinstall and everything was working. However, now when I turn on the pc I just see a black screen.
PC: ThinkPad W541
Graphic card: Nvidia Quadro K2100M and an Intel graphic card too.

I'm currently booting with a USB ISO, mounting the filesystem and arch-chrooting in /mnt.

The command

nvidia-smi

gives:

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

The output of

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

is

00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
	Subsystem: Lenovo Device 221e
	Kernel driver in use: i915
--
01:00.0 VGA compatible controller: NVIDIA Corporation GK106GLM [Quadro K2100M] (rev a1)
	Subsystem: Lenovo Device 221e
	Kernel driver in use: nouveau

Current nvidia installed driver:

pacman -Qs nvidia
local/egl-wayland 2:1.1.13-2
    EGLStream-based Wayland external platform
local/libvdpau 1.5-2
    Nvidia VDPAU library
local/nvidia-470xx-dkms 470.256.02-2
    NVIDIA drivers - module sources
local/nvidia-470xx-utils 470.256.02-2
    NVIDIA drivers utilities

From the previous command it seems I'm using Wayland.

However, the output of

nvidia-xconfig

is

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 470.256.02


Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Also, the kernel versions of uname and pacman differs:

uname -r
6.9.3-arch1-1
pacman -Q linux
linux 6.9.4.arch1-1

Content of /etc/mkinitcpio.conf:

cat /etc/mkinitcpio.conf
MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm vfat)
BINARIES=()
FILES=()
HOOKS=(base udev autodetect microcode keyboard keymap modconf block filesystems fsck)

And output of

mkinitcpio -P
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux -g /boot/initramfs-linux.img
==> Starting build: '6.9.4-arch1-1'
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [microcode]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux.img'
  -> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: '6.9.4-arch1-1'
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [microcode]
  -> Running build hook: [keyboard]


Could you please help me to solve this? I'm quite new so any help would be very useful

Last edited by marennn342352 (2024-06-15 12:50:13)

Offline

#2 2024-06-15 12:51:17

FishBoneEK
Member
Registered: 2023-09-26
Posts: 60

Re: Nvidia driver not working - stuck at black screen

First, are you running nvidia-smi in USB Arch ISO environment? If so, I don't think your your nvidia driver is loaded since Arch ISO provides only command line interface. Actually from the output of `lspci` you can actually find that it's nouveau that got loaded, and running nvidia-smi will of course throw errors since it requires proprietary driver instead of open source neouvau. So, it's still not sure if the cause of your problem is broken nvidia driver.

Second, you can't be sure whether u r using wayland or Xorg judging from pacman output. I have wayland packages installed too, but I use Xorg because of my graphic card is too old. To be sure if you are using Xorg or Wayland, you should check what graphical program you are starting at boot time. If you are using Xorg, it is the display manager which provides the graphical login screen. If you are using Wayland, well emmm...I have never used Wayland so sorry I can't answer it. Anyways, there should be a display manager that gets started when you boot up, you can see which one it is by executing `systemctl status display-manager.service`, then find out whether it's using Wayland or Xorg by reading its config and documents. Plus you can also just read your system journal: display managers should output errors to the journal.

Third, if you are indeed using Wayland, Arch wiki https://wiki.archlinux.org/title/Wayland states that your graphic card or graphical setup might not be compatible. Read the wiki for more info.

Offline

#3 2024-06-15 13:01:15

marennn342352
Member
Registered: 2024-06-14
Posts: 5

Re: Nvidia driver not working - stuck at black screen

thanks for the reply. The problem is that I dont even reach a graphical program, I just get a black screen

Offline

#4 2024-06-15 14:14:32

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,314

Re: Nvidia driver not working - stuck at black screen

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

strips the most relevant iformation, but you're running on the nouveau driver.
Also (and because this is a hybrid system) remove th nvidia-xconfig generated config file, you neither want nor need that and it's getting in the way.
You'll most likely still be able to boot the multi-user.target (2nd link below)

dkms status
pacman -Qs headers # you need the linux-headers to build dkms modules

The uname discrepancy was just because of the install iso chroot?

Offline

#5 2024-06-15 15:39:56

marennn342352
Member
Registered: 2024-06-14
Posts: 5

Re: Nvidia driver not working - stuck at black screen

Thanks for the answer! Indeed, I might have generated the nvidia-xconfig just by running the command.
I opted to backup my files and reinstall arch with archinstall through the USB ISO.

When selecting options in archinstall, I choose kde->nvidia proprietary drivers for the Profile option (in case it might be helpful for someone reading this).

After the installation, nvidia-smi was giving me the same problem as my first message of this thread, but I then realized I had to install the nvidia driver from the AUR that are compatible with my graphic card (i.e., Nvidia Quadro K2100M).
For future reader: check which nvidia version you should use here in the wiki: https://wiki.archlinux.org/title/NVIDIA

Therefore, I installed an AUR package manager (paru) as following:

sudo pacman -S --needed base-devel
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si

and after that I install the driver from AUR compatible with my Nvidia graphic card:

paru -Sy nvidia-470xx-dkms

by choosing "y" when asked to replace nvidia driver version 450 with the 470 version to make.

Drivers are now fine.

lspci -k | grep -A 2 -E "(VGA|3D)"
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
        Subsystem: Lenovo Device 221e
        Kernel driver in use: i915
--
01:00.0 VGA compatible controller: NVIDIA Corporation GK106GLM [Quadro K2100M] (rev a1)
        Subsystem: Lenovo Device 221e
        Kernel driver in use: nvidia

However, is there a way to check if the GPU is correctly functioning?
Because now nvidia-smi works, but I don't understand if the GPU is working or not:

nvidia-smi
Sat Jun 15 17:38:33 2024       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.256.02   Driver Version: 470.256.02   CUDA Version: 11.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  Quadro K2100M       Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   42C    P8    N/A /  N/A |      5MiB /  2000MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A       619      G   /usr/lib/Xorg                       2MiB |
+-----------------------------------------------------------------------------+

Offline

#6 2024-06-15 19:42:16

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,314

Re: Nvidia driver not working - stuck at black screen

Please post your Xorg log, https://wiki.archlinux.org/title/Xorg#General
Most likely it's available for prime-run, https://wiki.archlinux.org/title/PRIME

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

Board footer

Powered by FluxBB