LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 11-13-2018, 06:24 PM   #1
robertkwild
Member
 
Registered: Feb 2015
Posts: 382

Rep: Reputation: Disabled
best way to disable nouveau


hi guys,

i have googled on how to disable or blacklist nouveau and i dont know the best way to do it and i would like to know your opinions

1st-

edit the line "GRUB_CMDLINE_LINUX" in file "/etc/default/grub"

GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet rd.driver.blacklist=nouveau nouveau.modeset=0"'

make a new file "/etc/modprobe.d/blacklist.conf" and append 1 line to it

blacklist nouveau

2nd

or make a new file "/etc/modprobe.d/blacklist.conf" and append 2 lines to it

blacklist nouveau
options nouveau modeset=0

what do you think

thanks,
rob
 
Old 11-13-2018, 06:31 PM   #2
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
The second method that you posted is the best choice. I say that because that is what I've found from all of the searching I've done over the years. It's also the most practiced method that I have seen here in the forums.
 
1 members found this post helpful.
Old 11-13-2018, 07:08 PM   #3
robertkwild
Member
 
Registered: Feb 2015
Posts: 382

Original Poster
Rep: Reputation: Disabled
thanks ztcoracat

i imagine i need to run this command after i make the changes for the modprobe changes

dracut /boot/initramfs-$(uname -r).img $(uname -r)

or can i just restart and it takes affect straight away

if i was to do the first option i would eed to run this command wouldnt i aswell

grub2-mkconfig -o /boot/grub2/grub.cfg

Last edited by robertkwild; 11-13-2018 at 07:12 PM.
 
Old 11-13-2018, 07:17 PM   #4
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by robertkwild View Post
thanks ztcoracat

i imagine i need to run this command after i make the changes for the modprobe changes

dracut /boot/initramfs-$(uname -r).img $(uname -r)

or can i just restart and it takes affect straight away

if i was to do the first option i would eed to run this command wouldnt i aswell

grub2-mkconfig -o /boot/grub2/grub.cfg
You're Welcome.

Yes if you were to perform the first option you would have to run:
Code:
grub2-mkconfig -o /boot/grub2/grub.cfg
I'm not sure about the dracut command. I've never used it:-
You may want to do some searching online to make sure.

What distro are you running?
 
Old 11-13-2018, 07:22 PM   #5
robertkwild
Member
 
Registered: Feb 2015
Posts: 382

Original Poster
Rep: Reputation: Disabled
think the dracut command is for this

Backup your old initramfs and then build a new one

mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
dracut /boot/initramfs-$(uname -r).img $(uname -r)

but i see no reason to make a backup and re create my initramfs?

my workstations are on centos 7 1804 min
 
1 members found this post helpful.
Old 11-13-2018, 07:32 PM   #6
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by robertkwild View Post
think the dracut command is for this

Backup your old initramfs and then build a new one

mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
dracut /boot/initramfs-$(uname -r).img $(uname -r)

but i see no reason to make a backup and re create my initramfs?

my workstations are on centos 7 1804 min
Ok, yeah, than that makes sense with CentOS:-

Those directories are associated with the rootfs; it's up to you if you make a backup.

Since the boot loader loads the kernel and the initramfs image into memory and starts the kernel and you will be updating grub anyway it's most likely not necessary to backup and re-create your initramfs:-
 
Old 11-14-2018, 03:06 PM   #7
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
How did things go?
 
Old 11-14-2018, 06:40 PM   #8
robertkwild
Member
 
Registered: Feb 2015
Posts: 382

Original Poster
Rep: Reputation: Disabled
you do need to rebuild the initramfs after you add in a new file in "/etc/modprobe.d/" ie if you add "blacklist.conf"

then you do -

dracut /boot/initramfs-$(uname -r).img $(uname -r) --force

but its wierd as i have got another file i added to block all usb storage and that works and i didnt need to run the dracut command -

Method 1 – Fake install

In this method, we add a line ‘install usb-storage /bin/true’ which causes the ‘/bin/true’ to run instead of installing usb-storage module & that’s why it’s also called ‘Fake Install’ . To do this, create and open a file named ‘block_usb.conf’ (it can be something as well) in the folder ‘/etc/modprobe.d’,

$ sudo vim /etc/modprobe.d/block_usb.conf

& add the below mentioned line,

install usb-storage /bin/true

Now save the file and exit.

all i did was reboot the centos 7 machine and i could no longer see any usb storage i plugged in
 
Old 11-14-2018, 07:38 PM   #9
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Does the usb storage show in lsusb or fdisk -l (small letter L)?
 
Old 11-15-2018, 03:11 AM   #10
robertkwild
Member
 
Registered: Feb 2015
Posts: 382

Original Poster
Rep: Reputation: Disabled
no when i attach a usb storage drive in and when i do "fdisk -l" to show all my drives plugged in it doesnt show up

and all i did was reboot my machine after making that file in modprobe, so thats what i dont understand as i would had thought it would had been the same

maybe its because its a kernal driver the nouveau bit and usb isnt?
 
Old 11-15-2018, 11:22 AM   #11
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
When I was running CentOS my usb drives and memory stick weren't being seen either.

I had to install ntfs-3g:-

https://www.centos.org/forums/viewtopic.php?t=62931

https://centos.pkgs.org/7/epel-x86_6...86_64.rpm.html
 
1 members found this post helpful.
Old 11-17-2018, 07:55 PM   #12
robertkwild
Member
 
Registered: Feb 2015
Posts: 382

Original Poster
Rep: Reputation: Disabled
mmmm... not having any luck, i ned to run the "dracut -f" even if the file is in the modprobe folder and even after a reboot

i tried another way but didnt work

echo 'omit_drivers+="nouveau"' >> /etc/dracut.conf.d/nouveau.conf

reboot and its still there

so i have just done this

echo 'install nouveau /bin/false' >> /etc/modprobe.d/nouveau.conf
 
Old 11-18-2018, 01:12 PM   #13
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
so i have just done this
echo 'install nouveau /bin/false' >> /etc/modprobe.d/nouveau.conf
Did it work?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
lilo breaks after disable nouveau Rita G. Slackware 10 07-05-2016 02:37 PM
[SOLVED] Disable nouveau VisionIncision Slackware 2 07-04-2016 09:22 AM
CentOS 6.4 nouveau delete, disable Streamc Linux - Newbie 13 06-30-2013 01:10 PM
[SOLVED] How to disable nouveau arubin Slackware 5 05-02-2011 09:47 AM
F15, Disable Nouveau driver in prep to install Nvidia drvr toddbailey Fedora 7 04-30-2011 06:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 07:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration