3

I know there is plenty of documentation on blacklisting the Nouveau driver. However the normal methods are not working for me. I tried adding the below lines in the /etc/modprobe.d/blacklist.conf file, however this does not work. Nouveau still gets loaded anyway.

blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off

I tried to disable the kernel modules using this command:

echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf

followed by:

update-initramfs -u

but it doesn't work. Nouveau still gets loaded anyway.

karel
  • 122,695
  • 134
  • 305
  • 337
  • I did it yesterday... did you reboot? check this out: http://askubuntu.com/questions/457850/x-server-doesnt-work-on-ubuntu-14-04-what-may-be-happening/457928#457928 – Wagner Patriota May 01 '14 at 01:09
  • @Wagner Patriota Yes I did a reboot. I however do not see how that link applies as I am not having problems getting the nvidia driver working. I can not even blacklist nouveau. I haven't installed any propriety drivers yet as nouveau has to be blacklisted first. – Sandman007 May 01 '14 at 01:15
  • oh sure, the only thing in common is the blacklist... it worked to me just writing those lines and rebooting... – Wagner Patriota May 01 '14 at 01:28
  • @Wagner Patriota. I just realized what you are talking about. I feel as if you didn't even read my post which is why I was so confused. If you read the OP I had stated that I already added those blacklist commands in my blacklist.conf. – Sandman007 May 01 '14 at 02:00
  • Yes, I know! I read it! I am just showing that I did the same thing [almost] and for me it worked. I posted because my "block-list" is different than yours. – Wagner Patriota May 01 '14 at 02:21
  • @Wagner. My apologies,I forgot to mention that I had tried that list as well as I found them on the internet somewhere else. I just tried it again for good measure and no dice. Thanks for the suggestions though. – Sandman007 May 01 '14 at 02:42
  • @Wagner. Ok I think I really do have it disabled and I am rendering the desktop on just my intel gpu now (Mesa?), as I have an optimus system. I came to conclusion as I did an "lsmod | grep nouveau". Nothing outputs. I also ran grep nouveau /var/log/Xorg.0.log. I then checked the log. It says nothing about loading nouveau. I sit safe to assume nouveau is in fact not loading at start and loading the GUI strictly with MESA? – Sandman007 May 01 '14 at 02:57
  • I am not 100% sure. But I think so. Everything related to the current instance of your X Server is on /var/log/Xorg.0.log. You are using the device (Mesa in your case) the log says. As far as I know this is what's happening. – Wagner Patriota May 01 '14 at 03:02
  • @Wagner. Ok so I just installed the Nvidia337 drivers and I got stuck on the boot animation screen just like before. I tty'd and purged the driver and I am back so that tells me nouveau is still being loaded :( :( – Sandman007 May 01 '14 at 03:09
  • I am not using Desktop version. I am using the Ubuntu Server version actually. try install both drivers from apt-get and from NVIDIA website. For me, the one is working is the version from the website. [337 is beta, did not work for me. I got the last release version] – Wagner Patriota May 01 '14 at 03:13
  • @Wagner I am trying to use the 337-beta drivers from xorg repository which I know worked fine on 13.04. I also tried 331 from the driver manager in Ubuntu. both end up with me forcing a terminal. – Sandman007 May 01 '14 at 03:18
  • Sorry, I can't help. :-( I am not an expert. I just shared the experience I had with NVIDIA drivers until now. 337 didn't work for me. I have GeForce GTX 650 Ti. In Ubuntu 13 I used to just to "apt-get install nvidia-current" and it worked! With Ubuntu 14, I installed from NVIDIA using the instructions from the post I sent... it's all I have... sorry :-( – Wagner Patriota May 01 '14 at 03:34
  • 1
    @WagnerPatriota Its Ok. I am sure I'll find something in the next few days, and I'll post back when I do. Thanks again for your help! – Sandman007 May 01 '14 at 03:36
  • @WagnerPatriota That's because the driver for your card is 352, 355, 358, and 361 does anybody look these things up? http://www.geforce.com/drivers – mchid Feb 01 '16 at 13:02
  • Exactly the same situation as mine. I have Nvidia GTX 1060 and tried to install nvidia-396(recommended one) from PPA. Stubborn nouveau is not going away and i did everything what 'Sandman007' did. I am using Ubuntu 18.04 LTS Desktop version. – Ashu May 16 '18 at 21:23
  • @Ashu You know that you can install the 390 driver which is also recommended for your card and this version is available if you enable the "restricted" repository and the name of the metapackage is nvidia-driver-390. – mchid Jun 10 '18 at 19:59
  • @Sandman007 Using this method, you cannot blacklist a kernel module which is already in use (loaded at boot time). This is why the module must be blacklisted in grub to prevent the kernel from loading the module at boot time. – mchid Jun 10 '18 at 20:02
  • @mchid. Mine is resolved...i tried a lot of stuff(didn't kept track of everything)...so unfortunately i cannot comment what really solved my issue. Thanks for the help/suggestions. – Ashu Jun 11 '18 at 02:45

1 Answers1

2

You may need to edit grub to prevent the kernel from ever loading nouveau at boot. Run the following commands:

cp /etc/default/grub ~/grubbackup
sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="/GRUB_CMDLINE_LINUX_DEFAULT="nouveau.blacklist=1 /g' /etc/default/grub
sudo update-grub

Reboot.


The file should look like this:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="nouveau.blacklist=1 quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

You can run the following command to verify the contents of the file to be safe before you reboot:

cat /etc/default/grub

If you need to make changes, you can run the following command to edit the file:

sudo nano /etc/default/grub

Press CTR+o to save the file and then press CTRL+x to exit nano.

Also, don't forget to update grub after making changes:

sudo update-grub
mchid
  • 45,159
  • is it possible for you to post the contents of grub file rather than the sed command(sorry i am not good at sed). Right now that line reads like this:GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" with your changes i believe it should be GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nouveau.blacklist=1". Am I right? When playing with boot and O/S I just want to be extra cautious and careful to save countless hours to recover later. Please clarify. – Ashu May 16 '18 at 23:36
  • @Ashu Additionally, you should also be able to bypass this setting, if the configuration does not work, by booting into recovery or safe mode. – mchid Jun 10 '18 at 20:04
  • 1
    mine worked with putting that extra nouveau.blacklist=1 for the GRUB_CMDLINE_LINUX_DEFAULT. But glad we have some dedicated and committed discussion for nvidia cards to make them work with Ubuntu. – Ashu Jun 11 '18 at 02:48