[SOLVED] How to remove nouveau from the initramfs on Slackware-current
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to remove nouveau from the initramfs on Slackware-current
Hello everyone,
last weekend reinstalled slackware-current (I messed up the last install) and wanted install the nvidia driver from the nvidia webpage. The only problem is, that I'm not able to completely disable nouveau.
I created the /etc/modprobe.d file named blacklist_nouveau with the content of
Code:
blacklist nouveau
options nouveau modeset=0
In addition I added the "nomodeset" to the grub cmd and updated the config. There was no modesetting anymore and the nvidia driver installed without a problem. But by accident I discovered the nouveau still is loaded, although you can easily remove it via modprobe -r. I did some research and as far as I understood, you have to rebuild the initramfs (via dracut on RedHat or update-ramfs on Debian/Ubuntu), but I can't manage to get this done under slackware. The mkinitrd doesn't have an option for this, has anyone tried this yet and can give me a hint on that?
Check the output of /usr/share/mkinitrd/mkinitrd_command_generator.sh and see if it includes the nouveau driver in the modules. If it does, it might be as simple as just removing that module from the generated list of modules.
Thanks for your answers. Bassmadrigals hint solved it. After /usr/share/mkinitrd/mkinitrd_command_generator.sh I could create the appropiate ramdisk, now there is no nouveau.
Thanks for your answers. Bassmadrigals hint solved it. After /usr/share/mkinitrd/mkinitrd_command_generator.sh I could create the appropiate ramdisk, now there is no nouveau.
Excellent, so what does that mean for the blacklist package - perhaps Pat may need to look that over, as I am now confused as to the purpose of it .
Excellent, so what does that mean for the blacklist package - perhaps Pat may need to look that over, as I am now confused as to the purpose of it .
It is because the nouveau is a module and having the blacklist prevents the system from loading the module. However, now that -current has switched to a generic kernel and needs an initrd to boot, if that initrd contains that module, the blacklist won't apply since it will be loaded before the system is booted enough to be able to read that file.
You could also try adding module_blacklist=nouveau to your kernel appends line in your bootloader. That might prevent the initrd from loading it, but I don't know for sure.
Last edited by bassmadrigal; 07-09-2020 at 03:59 PM.
It is because the nouveau is a module and having the blacklist prevents the system from loading the module. However, now that -current has switched to a generic kernel and needs an initrd to boot, if that initrd contains that module, the blacklist won't apply since it will be loaded before the system is booted enough to be able to read that file.
You could also try adding [FONT="Courier New"]module_blacklist=nouveau/FONT] to your kernel appends line in your bootloader. That might prevent the initrd from loading it, but I don't know for sure.
That is an interesting answer, so to confirm by what you are stating the package is essentially obsolete I guess? I think maybe this could also be the reason for the missing penguins in that other thread? All I can say also about that - is on my bare metal install of 14.2 , as soon as I removed the nouveau driver by blacklisting via package, the penguins were there and never disappeared after a while, but now I am getting off topic.
So - as for the package, maybe it should be dropped in current and just a little hint in the readme adding that that blurb if one wants to blacklist it that way?
That is an interesting answer, so to confirm by what you are stating the package is essentially obsolete I guess?
I don't know about obsolete, but if an initrd is generated with the nouveau driver and the system is booted off that initrd, I don't think the blacklist file is used.
Quote:
Originally Posted by Jeebizz
I think maybe this could also be the reason for the missing penguins in that other thread? All I can say also about that - is on my bare metal install of 14.2 , as soon as I removed the nouveau driver by blacklisting via package, the penguins were there and never disappeared after a while, but now I am getting off topic.
That's possible, but I am not familiar enough with Nvidia hardware to understand all that.
Quote:
Originally Posted by Jeebizz
So - as for the package, maybe it should be dropped in current and just a little hint in the readme adding that that blurb if one wants to blacklist it that way?
Either way probably works. I know there are people who recompile their kernels or switch to the huge so they don't require an initrd. They could still benefit from the package. And if someone builds an initrd without the nouveau module, the package could also be useful.
I created the /etc/modprobe.d file named blacklist_nouveau with the content of
Code:
blacklist nouveau
options nouveau modeset=0
It is interesting to note, that is very similar to the one created by the NVIDIA installer if it detects the nouveau driver and you allow it to create it. This is what is created by the installer.
Code:
# generated by nvidia-installer
blacklist nouveau
options nouveau modeset=0
The xf86-video-nouveau-blacklist-1.0-noarch-1.txz package add this.
Code:
# Do not load the kernel nouveau dri module, since it interferes with both
# the nv and binary nvidia drivers.
blacklist nouveau
I don't see the purpose of that options line. My logic is, your are blacklisting nouveau, why give it options.
It is interesting to note, that is very similar to the one created by the NVIDIA installer if it detects the nouveau driver and you allow it to create it. This is what is created by the installer.
Code:
# generated by nvidia-installer
blacklist nouveau
options nouveau modeset=0
The xf86-video-nouveau-blacklist-1.0-noarch-1.txz package add this.
Code:
# Do not load the kernel nouveau dri module, since it interferes with both
# the nv and binary nvidia drivers.
blacklist nouveau
I don't see the purpose of that options line. My logic is, your are blacklisting nouveau, why give it options.
Well, I had this from various Debian Forums, and they included even some aliases like lrm_nouveau. In Debian these contents of the blacklist file are mostly done by the packaged binary drivers from the non-free repository.
Well, I had this from various Debian Forums, and they included even some aliases like lrm_nouveau. In Debian these contents of the blacklist file are mostly done by the packaged binary drivers from the non-free repository.
Thanks! That is interesting. Still, it seems weird, at least to me, that option line is included.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.