Page 1 of 4 123 ... LastLast
Results 1 to 10 of 34

Thread: Problems adding nvidia proprietary drivers to initrd file

  1. #1

    Default Problems adding nvidia proprietary drivers to initrd file

    Hello,

    I'm trying to add the nVidia proprietary drivers and a modprobe.conf file to the initrd file.

    I run dracut -f to create the initrd file. It fails.

    These are the two files that I've created:
    Code:
    #/etc/dracut.conf.d/nvidia.conf
    
    add_drivers+="nvidia nvidia_modeset nvidia_uvm nvidia_drm"
    install_items+="/etc/modprobe.d/nvidia.conf"
    Code:
    #/etc/modprobe.d/nvidia.conf
    
    options nvidia_drm modeset=1
    The lines starting with the #'s aren't actually in the file, that's just the filenames. And there's no new blank lines at the top of the files, I just added that so it's a bit easier to read.

    Anyway, I create these two files. Then I execute dracut -f and this is the output:
    Code:
    eugene:/mnt/initrd # dracut -f
    dracut: Executing: /usr/bin/dracut -f
    dracut: *** Including module: bash ***
    dracut: *** Including module: systemd ***
    dracut: *** Including module: warpclock ***
    dracut: *** Including module: systemd-initrd ***
    dracut: *** Including module: i18n ***
    dracut: *** Including module: drm ***
    dracut: *** Including module: plymouth ***
    dracut: *** Including module: kernel-modules ***
    dracut: *** Including module: resume ***
    dracut: *** Including module: rootfs-block ***
    dracut: *** Including module: suse-xfs ***
    dracut: *** Including module: terminfo ***
    dracut: *** Including module: udev-rules ***
    dracut: Skipping udev rule: 40-redhat.rules
    dracut: Skipping udev rule: 50-firmware.rules
    dracut: Skipping udev rule: 50-udev.rules
    dracut: Skipping udev rule: 91-permissions.rules
    dracut: Skipping udev rule: 80-drivers-modprobe.rules
    dracut: *** Including module: dracut-systemd ***
    dracut: *** Including module: haveged ***
    dracut: *** Including module: usrmount ***
    dracut: *** Including module: base ***
    dracut: *** Including module: fs-lib ***
    dracut: *** Including module: shutdown ***
    dracut: *** Including module: suse ***
    dracut: *** Including modules done ***
    dracut: *** Installing kernel module dependencies and firmware ***
    dracut: *** Installing kernel module dependencies and firmware done ***
    dracut-install: ERROR: installing '/usr/lib/udev/rules.d/11-dm-parts.rules/etc/modprobe.d/nvidia.conf'
    dracut: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.3ipW9s/initramfs -a /usr/lib/udev/rules.d/11-dm-parts.rules/etc/modprobe.d/nvidia.conf
    dracut: *** Resolving executable dependencies ***
    dracut: *** Resolving executable dependencies done***
    dracut: *** Hardlinking files ***
    dracut: *** Hardlinking files done ***
    dracut: *** Stripping files ***
    dracut: *** Stripping files done ***
    dracut: *** Generating early-microcode cpio image ***
    dracut: *** Constructing GenuineIntel.bin ****
    dracut: *** Store current command line parameters ***
    dracut: Stored kernel commandline:
    dracut:  resume=UUID=ac985b5e-fb17-442f-b6ac-24c1c53e5bff
    dracut:  root=UUID=3c6e7faf-093a-49df-83db-ca247620f093 rootfstype=ext4 rootflags=rw,relatime,data=ordered
    dracut: *** Creating image file '/boot/initrd-4.14.15-1-default' ***
    dracut: *** Creating initramfs image file '/boot/initrd-4.14.15-1-default' done ***
    Not sure what I'm doing wrong here. For some reason, it seems like it's looking for some /usr/lib/udev/rules.d/11-dm-parts.rules/etc/modprobe.d/nvidia.conf file.
    /usr/lib/udev/rules.d/11-dm-parts.rules is a file that exists, but it appears there's no space between that and the /etc/modprobe.d/nvidia.conf file I try adding to my image.

    If I add a space before /etc/modprobe.d/nvidia.conf in the install_items+= area, like this:
    Code:
    add_drivers+="nvidia nvidia_modeset nvidia_uvm nvidia_drm"
    install_items+=" /etc/modprobe.d/nvidia.conf"
    I don't actually see where dracut adds my files. I've tried extracting the contents of the ASCII CPIO file, but there's two files inside, nothing else (when I add the space and the initramfs file is created successfully.
    Code:
    early_cpio  
    kernel
      kernel->x86
        kernel->x86->microcode
          kernel->x86->microcode->GenuineIntel.bin
    Neither of the files are big. 8KB for the GenuineIntel.bin file, and the early_cpio was 2 bytes.

    Any ideas what I'm doing wrong here? I'm sure there's more to the initrd file that I'm attempting to extract, but I couldn't find any other ways to extract the files except for using:
    Code:
    cpio -id < /boot/initrd-4.14.15-1-default
    I'm running the latest Linux proprietary drivers from nVidia, I'm also running kernel 4.14.15-1-default. I did a zypper dup the other night because I haven't used this box in a while.

    Any help would be greatly appreciated.

    Thank you.

  2. #2

    Default Re: Problems adding nvidia proprietary drivers to initrd file

    I'd like to add that I also tried using dracut's skipcpio and piping the output to cpio. I just found out about this command, so far, it just errors out and complains about premature end of file if I run it like this.
    Code:
    /usr/lib/dracut/skipcpio initrd-4.14.15-1-default | cpio -i -d -H newc --no-absolute-filenames
    If I remove the -H newc, I get lots of garbage. I'll read the man page on it and see what I can find out.

    Thanks.

  3. #3

    Default Re: Problems adding nvidia proprietary drivers to initrd file

    Quote Originally Posted by Spork_Schivago View Post
    I'd like to add that I also tried using dracut's skipcpio and piping the output to cpio. I just found out about this command, so far, it just errors out and complains about premature end of file if I run it like this.
    Code:
    /usr/lib/dracut/skipcpio initrd-4.14.15-1-default | cpio -i -d -H newc --no-absolute-filenames
    If I remove the -H newc, I get lots of garbage. I'll read the man page on it and see what I can find out.

    Thanks.
    I found a way to extract, using the following command:
    Code:
    /usr/lib/dracut/skipcpio initrd-4.14.15-1-default | unxz | cpio -ivd
    Looks like the files are there, when I add the space at least the the insert_files+=" <filename> "

    I also fixed my modprobe nvidia.conf file so it has options for nvidia-drm, instead of nvidia_drm

    The man page for draculat.conf shows spaces for the before and after the filename for insert_files+=. I just didn't think they where being added. I think we're good now and I figured it out myself. If anything looks wrong, please feel free to let me know.

  4. #4

    Default Re: Problems adding nvidia proprietary drivers to initrd file

    What do you hope to achieve by doing this? I'm just curious. I don't remember doing anything like this when I installed my nvidia driver manually the first time. I install the driver, and run mkinitrd (no idea if that's actually needed though).

  5. #5
    Join Date
    Sep 2012
    Posts
    7,100

    Default Re: Problems adding nvidia proprietary drivers to initrd file

    Quote Originally Posted by Spork_Schivago View Post
    there's two files inside, nothing else
    Use /usr/lib/dracut/skipcpio to skip early cpio archive. Or lsinitrd to see content (file list) of initrd.

  6. #6

    Default Re: Problems adding nvidia proprietary drivers to initrd file

    Quote Originally Posted by xorbe View Post
    What do you hope to achieve by doing this? I'm just curious. I don't remember doing anything like this when I installed my nvidia driver manually the first time. I install the driver, and run mkinitrd (no idea if that's actually needed though).
    Loading the nVidia drivers from the initramfs image. It worked, but I had to include a blacklist_nouveau.conf modprobe configuration file.

    Now i can set high resolutions from grub that I couldn't set before and have a nice resolution during boot. Before, the nouveau kernel module was being loaded and used in the initramfs image. Now, the nVidia module is. That was my goal. To fully use the nvidia driver, during boot, and after boot, which I have now accomplished.

    From this site,
    Code:
    With the recent 364.x releases of the NVIDIA binary drivers, KMS (Kernel-Mode-Setting) support for Linux was added.
    A couple things on that page are wrong, and I couldn't find a place to leave comments to inform the gentleman who wrote it. But it got me pointed in the right direction. Bootup looks a lot nicer now than it did before.

    My next step is to try and change the boot-up heme. I used plymouth-set-default-theme but it only shows during shutdown.

    I'll research more on how to change the boot-up theme.

  7. #7

    Default Re: Problems adding nvidia proprietary drivers to initrd file

    Quote Originally Posted by arvidjaar View Post
    Use /usr/lib/dracut/skipcpio to skip early cpio archive. Or lsinitrd to see content (file list) of initrd.
    Thank you. I had figured it out though. I also discovered the lsinitrd command but didn't mention it.

    At first, I had trouble with the skipcpio command. I was piping it to cpio and getting just garbage. So Instead, I ran it, redirected it to a file, ran file on it, discovered it was xz compressed, then pipped it to unxz, then cpio, and I was successfully able to extract the files.

  8. #8

    Default Re: Problems adding nvidia proprietary drivers to initrd file

    Quote Originally Posted by Spork_Schivago View Post
    Now i can set high resolutions from grub that I couldn't set before and have a nice resolution during boot. Before, the nouveau kernel module was being loaded and used in the initramfs image.
    Well, I suppose the nouveau module was *not* loaded, and that probably was the reason why you couldn't use a higher resolution (nouveau should support that).

    AFAIK, a blacklist (that you need anyway to use the nvidia driver) should be added to the initrd automatically (at least if you use mkinitrd to create it, which is normally used by "the system"), and that will force a generic framebuffer to be used (unless the nvidia driver is in the initrd of course).

    I think if nouveau would have been loaded, it would have also prevented the nvidia driver from working.

    But anyway...

    My next step is to try and change the boot-up heme. I used plymouth-set-default-theme but it only shows during shutdown.
    Did you use the "-R" (--rebuild-initrd) option?
    Only this will add the theme's files to the initrd, which is necessary for them to be accessible during boot (plymouth is started very early, from the initrd).

  9. #9

    Default Re: Problems adding nvidia proprietary drivers to initrd file

    Quote Originally Posted by wolfi323 View Post
    Well, I suppose the nouveau module was *not* loaded, and that probably was the reason why you couldn't use a higher resolution (nouveau should support that).

    AFAIK, a blacklist (that you need anyway to use the nvidia driver) should be added to the initrd automatically (at least if you use mkinitrd to create it, which is normally used by "the system"), and that will force a generic framebuffer to be used (unless the nvidia driver is in the initrd of course).

    I think if nouveau would have been loaded, it would have also prevented the nvidia driver from working.

    But anyway...


    Did you use the "-R" (--rebuild-initrd) option?
    Only this will add the theme's files to the initrd, which is necessary for them to be accessible during boot (plymouth is started very early, from the initrd).
    nouveau was loaded, but it doesn't work quite right with my card for some reason. It's a bit of an older card, the nVidia GTX 670 FTW.

    Yes, the nouveau was preventing the nVidia module from loading.

    I did add the -R option to plymouth. Plymouth calls dracut, just like I call, to build the initrd file. Are you sure I should be using mkinitrd, instead of dracut? I was under the impression that dracut is what I'm supposed to be using. And plymouth-set-default-theme solar -R does in fact call dracut. I was looking at the source for it, but I checked anyways.

    I noticed a few things since I can now boot into Linux with the nVidia drivers loaded. lsmod | grep nvidia shows that one module's name is nvidia_drm. In my /etc/modprobe.conf.d/nvidia.conf file, I have just the following line:
    Code:
    options nvidia-drm modeset=1
    I'm thinking I need to change that nvidia-drm to an nvidia_drm. Then perhaps my plymouth theme will load. From reading about tumbleweed and plymouth though, it seems other people have had this issue in the past, with just tumbleweed. I haven't seen anything where it says it's fixed though. When the system boots up, I see a green screen with three little bars. The first bar is lit up. Then further along the boot process, the second bar lights up and the first turns off. Then finally the third, then it's all replaced with some text-mode [OK] messages, finally I get to gdm login screen.

    Finally, nvidia_uvm doesn't appear to get loaded unless it's needed, according to the nVidia documentation and some googling. I would like it to load automatically though. From what I understand, I'm going to have to create some sort of init script that will load it automatically on boot though. Does that sound about right?

  10. #10

    Default Re: Problems adding nvidia proprietary drivers to initrd file

    Too late to edit.

    I believe changing the options nvidia_drm modeset=1 in the conf file was the proper way to go, because when I cat /sys/module/nvidia_drm/parameters/modeset, I see Y.

    I didn't check before I made the modifications, rebuilt the initrd using plymouth-set-default-theme solar -R.

    It's not a green screen I see during boot, but a gray screen, with three green bars that are a bit dark. Then as the boot process furthers along, one will light up, then the it'll move to the second, then the third, like a progress indicator as to how far along I am in the boot process.

Page 1 of 4 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •