You are not logged in.

#1 2023-08-20 18:43:54

sniffierpond
Member
From: Switzerland
Registered: 2023-08-20
Posts: 4

[SOLVED] unable to install NVIDIA driver

Hello,
I tried to install the NVIDIA official driver. I read the wiki page.

  • First I installed the packages nvidia and lib32-nvidia-utils (I plan to use Steam so I thought adding support for 32-bit applications would be a good idea).

  • Then I removed kms from the /etc/mkinitcpio.conf configuration file, and I ran 

    mkinitcpio -P

    Here's the output of the command:

    ==> 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 --microcode /boot/intel-ucode.img
    /etc/mkinitcpio.conf: line 1: 0: command not found
    ==> ERROR: Unable to write to '/boot/initramfs-linux.img'
    ==> 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 --microcode /boot/intel-ucode.img
    /etc/mkinitcpio.conf: line 1: 0: command not found
    ==> ERROR: Unable to write to '/boot/initramfs-linux-fallback.img'
  • I verified if the file /usr/lib/modprobe.d/nvidia.conf existed but it didn't seem to exist.

  • I rebooted.

  • I ran the command

    sudo nvidia-smi

    to verify if I managed to install NVIDIA but I got the output

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

Could you help me to figure out what I've done wrong or to resolve my problem ?
Thank you in advance for your answers.

Last edited by sniffierpond (2023-08-23 20:28:14)

Offline

#2 2023-08-20 19:46:20

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,104

Re: [SOLVED] unable to install NVIDIA driver

/etc/mkinitcpio.conf: line 1: 0: command not found
==> ERROR: Unable to write to '/boot/initramfs-linux.img'

There's some stray nonsense in the /etc/mkinitcpio.conf and you didn't run mkinitcpio as root…

Offline

#3 2023-08-21 18:14:28

lfitzgerald
Member
Registered: 2021-07-16
Posts: 175

Re: [SOLVED] unable to install NVIDIA driver

I think one of your steps failed, so the driver didn't get installed properly.

mkinitcpio generates the initial ramdisk, which then starts up the kernel with the appropriate configuration. In this case, it will ensure that the kernel uses the nvidia driver. mkinitcpio uses /etc/mkinitcpio.conf to figure out what exactly the ramdisk will do.

It looks like you're using one kernel version, so mkinitcpio is trying to create two images: One normal and one fallback. Both are failing because of the error `/etc/mkinitcpio.conf: line 1: 0: command not found`. Something in the first line is broken, might be an incorrect comment character or maybe some non-standard whitespace.

The default /etc/mkinitcpio.conf file comes from the package mkinitcpio which is usually installed as part of the normal OS install. You can see here what the default file looks like: https://gitlab.archlinux.org/archlinux/ … tcpio.conf

Download the default file somewhere on your computer, and use some tools like diff and delta to see how yours differs from the other. These tools have CLI switches to show normally invisible chars like whitespace in case you need them. You can also see special chars with `bat -a`.

If it's obvious how to fix the differences, just fix them and try again. Otherwise post the diff here (including special chars) so we can see.

Offline

#4 2023-08-22 09:10:52

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: [SOLVED] unable to install NVIDIA driver

Please change your thread title, it has nothing to do with your problem.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#5 2023-08-23 20:26:55

sniffierpond
Member
From: Switzerland
Registered: 2023-08-20
Posts: 4

Re: [SOLVED] unable to install NVIDIA driver

thank you, apparently I just forgot to run the command as root

Offline

Board footer

Powered by FluxBB