30

I'm going to be installing Ubuntu 15.10 soon after a break from Linux for a while. I would like to know if nomodeset is still required on newer Ubuntu releases and newer nVidia GPUs. I have a GTX970.

Also, would be better to install the proprietary driver from nVidia, or choose the driver from "Additional Drivers", or use the edgers PPA and grab the latest one from there?

cl-netbox
  • 31,163
  • 7
  • 94
  • 131
xXToYeDXx
  • 303
  • 1
  • 3
  • 4
  • 4
    nomodeset is a temporary solution in case a system does not boot without a proprietary driver. This is not to be used permanently. If your systems does boot, nomodeset is not needed at all. – Pilot6 Mar 18 '16 at 10:47

4 Answers4

37

You should use the parameter nouveau.modeset=0 instead of nomodeset.
Install the Ubuntu system and the proprietary NVIDIA drivers in this way :

Boot from the Ubuntu DVD/USB installation media you had created before.

Highlight the option 'Try Ubuntu without installing' and press the E key.
Add nouveau.modeset=0 to the end of the linux line - press F10 to boot.

Install the Ubuntu operating system - when finished reboot the computer.

Highlight the Ubuntu entry in the GRUB boot menu and press the E key.
Add nouveau.modeset=0 to the end of the linux line - press F10 to boot.

On the login screen press Ctrl+Alt+F1
Enter user name and password - execute :

sudo apt-get update
sudo apt-get install nvidia-352
sudo reboot  

Generally it is recommended to use the NVIDIA drivers from the official Ubuntu repositories.
But as you have very new graphics hardware, you can install the latest official NVIDIA drivers.
The xorg-edgers PPA does not provide the drivers anymore and was replaced by GPU Drivers.

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-361
sudo reboot  

After the installation adding the parameter nouveau.modeset=0 is not necessary anymore.

cl-netbox
  • 31,163
  • 7
  • 94
  • 131
  • 6
    What does the nouveau.modeset=0 parameter actually do? I used it before having installed the drivers in Ubuntu 18.04, but if I remove it, the system (Dell XPS 15 9560) freezes at login. Also, I do not have the feeling that the graphics card is intensely used as the effects stutter a bit and there is nothing to be set within the Ubuntu drivers. – Socrates Sep 05 '18 at 04:14
  • 2
    @Socrates nouveau.modeset=0 disables the nouveau drivers when booting the system. :) – cl-netbox Sep 05 '18 at 07:33
  • 2
    On my system nomodeset works, but nouveau.modeset=0 does not let me boot. What's the difference, and why do you recommend the latter? – Elliott B Nov 09 '18 at 21:35
  • 1
    @ElliottB nomodeset disables more features than the nouveau drivers for the NVIDIA GPU and nouveau.modeset=0 disables only the nouveau drivers for making use of the NVIDIA GPU. :) – cl-netbox Nov 10 '18 at 10:44
  • I have tried several times with Dell Latitude E6400. Ubuntu 18.04 installed successfuly but running slowly. Xubuntu 18.04 always stucks. I would like to have encrypted disk which means LVM, but it does not work even not encrypted. Withoud LVM, the installation started. Or may be caused by bluetooth turned on. – banterCZ May 10 '19 at 18:48
  • You can check list of the last available driver versions by typing ubuntu-drivers devices Then you can autoinstall the last available driver by sudo ubuntu-drivers autoinstall and then sudo reboot – fedotsoldier Dec 08 '19 at 11:39
  • Was stuck with a black screen after prime-select intel and then suspend ... Went to grub changed from nomodeset to nouveau.modeset=0. This seemed to get back to the screen. Any explanation on why? – Pandian Le Oct 05 '20 at 09:09
  • disables other stuff like what? and do I need to keep nouveau.modeset=0 in the grub forever? or can I remove it? – Pandian Le Oct 05 '20 at 16:51
  • @PandianLe Possibly I didn't express myself clear enough, so I've deleted my former comment. You can find a lot of information about nomodeset on the internet ... if you are having issues with the proprietary NVIDIA drivers, the boot parameter nouveau.modeset=0 should be used. The same is valid if you are having issues with the open source nouveau drivers, in case you don't have the NVIDIA drivers installed. – cl-netbox Oct 06 '20 at 07:34
4

I had the same problem with my Xubuntu 18.04 version that runs on Nvidia GPU. I tried to installed the latest Nvidia-390 and nvidia-prime drivers and updated my driver installs as these solutions show [1] [2], and I added nouveau to the block list, but none of these worked. So what I did is that I added the parameternouveau.modeset=0 to grub.cfg file in \boot\grub\ directory. I added the line after every "linux..." line, for instance:

menuentry 'FAILSAFE' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    set gfxpayload=$linux_gfx_mode
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos8)'
    search --no-floppy --fs-uuid --set=root 36286167-4eba-4a1e-a202-155c6baafa01
    linux /boot/vmlinuz-2.6.37-12-generic root=UUID=36286167-4eba-4a1e-a202-155c6baafa01 ro vt.handoff=7 quiet splash nouveau.modeset=0
    initrd /boot/initrd.img-2.6.37-12-generic
    } 

So, I believe you have to add this parameter in all the script. I tried this solution and Nvidia GPU driver stopped crashing.

Another approach as described here

Execute sudo nano /etc/default/grub and add the parameter nvidia-drm.modeset=1 to the line GRUB_CMDLINE_LINUX_DEFAULT. Save the change you've made and run sudo update-grub.
Restart the Ubuntu operating system, and now, everything should work properly - right as expected.

  • 1
    Adding nouveau.modeset=0 to the GRUB_CMDLINE_LINUX_DEFAULT key in /etc/default/grub and then running sudo update-grub should achieve the same effect you described with a lot less effort. I think this is the more idiomatic approach, as well. – drmuelr Feb 07 '19 at 04:11
  • What's the difference between "adding nouveau.modeset=0" and "adding nvidia-drm.modeset=1"? "adding nouveau.modeset=0" worked for me to solve the problem of booting to a blank screen. But my second monitor is no longer detected. Also, I wonder if "adding nouveau.modeset=0" would prevent my computer from using Nvidia GPU? which I don't want unless I have to. – Yu Shen Feb 18 '19 at 17:33
  • 3
    The sloution of "adding nvidia-drm.modeset=1" works completely for me. The second monitor is also detecetd and working as expected. – Yu Shen Feb 18 '19 at 17:48
1

Just an observation: our machines with NVIDIA GTX 10xx GPUs and Ryzen CPUs often got stuck with "soft lockup" and needed hard restart. Other machines with nomodeset and also the said machines after this setting did not get stuck. So there seems to be causality beyond boot.

See also: NMI Watchdog: BUG: soft lockup

1

No, it's not required anymore. I was also facing similar problem. Using nomodeset I can boot into the system but now I solved the problem another way round. Only thing we need to do is to upgrade or downgrade the kernel version. https://askubuntu.com/a/1014753 This forum has explained how to access advanced option in ubuntu. Now when we enter into advanced option we can see linux kernel versions like: https://i.stack.imgur.com/6PEl9.png

  • Now navigate to the lower version of kernel using arrow keys but leave all the recovery modes kernels.

  • Leaving the recovery modes kernel, select the lowest version of kernel and hit enter.

  • Now it will boot normally without using nomodeset. Remove nomodeset before if you have written it in grub file and update the grub.

  • Now to make changes permanent go through this below given link and remove all the above kernels but don't remove the running kernels.

https://itsfoss.com/upgrade-linux-kernel-ubuntu/ This link will guide us through the procedure to update or downgrade the kernel. For me kernel 5.3 worked perfectly fine.

Amey
  • 21
  • 1
  • 5