Ask Your Question

Need to launch dracut at each kernel update [NVIDIA driver]

asked 2017-05-07 06:36:17 -0500

elegos gravatar image


I've noticed that every time I install a new kernel (and thus a new initramfs), I need to update the initramfs starting dracut. I've even created a simple bash script that does this for me on the latest initramfs image, but I was wondering why I have to do it manually, and if there is already a meta-package that does this for me. If I don't do that, it appears the driver is not loaded, giving me the resolution of 800x640 only (instead of 3440 x 1440).

This is the script which regenerates the initramfs (if anyone interested):

#!/usr/bin/env bash
LAST_INITRAMFS=/boot/`ls /boot -lt|grep initramfs|head -n 1|grep -oP "([^\s]+)$"`

sudo dracut -vf $LAST_INITRAMFS

Honestly I don't remember if I installed akmod-nvidia or followed this guide, because I think I tried both. Thing is I don't have to install the kernel all the times, just launch dracut.

Thank you for all the assistance :)


P.S. As extra bit, not that I'm eager to use Wayland, but even if I select "GNOME" (and not "GNOME with Xorg") in the login screen, loginctl show-session <num> -p Type always shows me Type=X11. Is this some form of fallback? (curently using nVidia drivers 375.39)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-05-07 09:53:05 -0500

SteveEbey73701 gravatar image

Here is what explicitly works for me. I do not use dracut, or rpms. I downloaded the 381.09 beta from the ftp site at nvidia, went to init 3 installed the driver with dkms and 32 bit compatible, let it overwrite the libglvnd and I have had no issues for the past 3 kernel updates. dkms status shows the drivers built for each kernel, and I only have to reinstall, if the mesalibgl dependencies change. I run sudo nvidia-installer --sanity just to make sure, and if anything is changed, simply repeat the steps shown here. dkms does the compile, every time the kernel updates, and as stated, I have had 0 issues with this setup. Hope this helps.

edit flag offensive delete link more


Strange enough. Why isn't this explicitly suggested in the wiki? Now that I've got this setup, how can I do this avoiding any kind of double-installations of any sort? And last but not least: can't you just stop GDM/X11, instead of going init 3?

elegos gravatar imageelegos ( 2017-05-07 18:43:25 -0500 )edit

the drivers are not open source, so people tend to lean that way with linux. i trust nvidia. as to init 3, it is the fastest way, without having to kill other processes manually. login as root, init 3 and then install. why add extra steps? and since you reboot after installation, it automatically goes into on the reboot. to avoid double installation, run dnf remove akmod-nvidia, before installing the driver.

SteveEbey73701 gravatar imageSteveEbey73701 ( 2017-05-08 07:18:56 -0500 )edit

Question Tools

1 follower


Asked: 2017-05-07 06:28:01 -0500

Seen: 965 times

Last updated: May 07 '17