18

Alrighty, so I have had to deal with a similar problem all throughout using Ubuntu with Nvidia. But with the new 17.10 update I have been getting a new recently discussed bug which results with my screen going into a black screen and looping "stopped user manager for uid (#)", this prevents me from going into recovery mode and accessing grub directly from the computer as holding the keys on startup doesn't do anything.

So as a workaround I SSH'd into the desktop and have tried some workarounds that I've heard around random forums.

Attempted:

  • uncommented "WaylandEnable=false" in (/etc/gdm3/custom.conf)
  • "nomodeset" in grub (/etc/default/grub)
  • reinstalling the drivers after and before

These attempts changed nothing in the outcome of the issue. The only thing that has helped was removing the Nvidia drivers which I've initially installed through the Software Update GUI, which rendered the device bootable.

Hopefully y'all can help me utilize good ol Nvidia drivers again ;-;

  • Just by luck, did you select the first time the system was installed (using the nvidia open source driver still) in the login screen to log in using xorg (since the default is Wayland). This is because nvidia and Wayland are still not friends yet so it is recommended to, once the system is installed, to change in the login screen from ubuntu to Ubuntu using xorg. Afterwards you can get the nvidia ppa and install the needed driver version. – Luis Alvarado Oct 24 '17 at 4:10
  • @LuisAlvarado Yeah, it was installed while that mode was enabled. No luck. – Mr.Midnight Oct 24 '17 at 4:14
  • Did you create a bug report for Ubuntu? – Huygens Oct 26 '17 at 7:38
  • I did not @Huygens, but I think I've seen one on there. – Mr.Midnight Oct 27 '17 at 23:58
  • Have anyone got a working update for this question? – user149760 Dec 28 '17 at 14:49
5

This sounds similar to an issue I was having, which I answered over in this thread

It seems that the Ubuntu update switched me to a low-latency kernel, which did not automatically update my kernel headers installation like other kernel upgrades have, and the nvidia binary packages require the kernel headers to be present. Try the following:

sudo apt purge 'nvidia-*'
sudo apt install linux-headers-$(uname -r)
sudo apt install nvidia-384

Note that I did prevent gdm from using Wayland prior to trying anything, and from what I understand Wayland won't currently work with the nvidia binaries, so I'd advise ensuring it's disabled in /etc/gdm3/custom.conf by uncommenting the line #WaylandEnable=false.

  • 1
    I'll add that apt flagged make errors that apt-get didn't. Turns out my gcc was pegged to an older version and Ubuntu's unattended update gave me more recent NVidia drivers which ended up broken, so I rectified the situation with update-alternatives and put GCC back to v7 (from 4.8). And this was it: no need for the Wayland changes, no need for GRUB nvidia-drm.modeset=1, etc. – opyate Nov 23 '17 at 21:40
  • PS unattended went from nvidia-384 to nvidia-387 – opyate Nov 23 '17 at 21:43
  • 1
    didn't work for me – xamiro Nov 24 '17 at 12:29
  • @opyate If I had any bitcoin, I'd send you all of it right now – michaelsnowden Nov 30 '17 at 6:33
  • @michaelsnowden haha, buy low and send to me when it's high :-P – opyate Feb 5 '18 at 10:47
4

Thanks to Steven's answer it got me on the right track, and after some Googling, I've found the last piece of answer within (of course) Arch Linux vibrant community :-)

So what Steven has found is that the header files for the Low Latency Kernel are missing. So you need to do:

sudo apt install linux-headers-$(uname -r)

And a requirement for Wayland on NVidia (you need at least Gnome 3.23, but Ubuntu 17.10 ships with 3.26 so we are covered) is to activate KMS, this is done by editing your /etc/default/grub file and editing the following line to add nvidia-drm.modeset=1, see example:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia-drm.modeset=1"

Note: do not remove other parameters if you have/need them, just add the NVidia DRM mode setting one.

Then you need to regenerate the initramfs and the Kernel modules. The best is to do as Steven's suggesting, remove the nvidia package and reinstall it (potentially reinstalling could work, but I did not try, that would be sudo apt install --reinstall nvidia-xxx replace xxx with the driver version for your card, should be 384 for recent cards).

sudo apt remove --purge nvidia-xxx
sudo apt install nvidia-xxx

PS: I new there was a way for it to work, because it worked on my Fedora 25 (now 26) box with a NVidia card as well)

PS2: I wish the nouveau driver would perform better because I do not mind trading a bit of performance for an open source driver. But even in 2D scrolling through a page is awfully slow and not fluid with nouveau, and that's not yet OK for me. I really wish that either Nouveau gets better at 2D (and 3D) or that AMD gets better are creating low power and passive card. Anyway, they do an amazing job given the relationship with NVidia.

  • There are several questions/answers on this topic, this is the only solution that's worked for me. – Jonah Nov 1 '17 at 17:06
  • I only needed to add the linux-headers. The nvidia-drm.modeset=1 didn't make any difference. – Berend de Boer Nov 9 '17 at 6:05
  • @BerenddeBoer strange, I have a GeForce GT710 and without the Kernel boot driver it did not work as I recall. There is also this article which shows that for Wayland you need to set the MODESET (see devtalk.nvidia.com/default/topic/925605/linux/…). However the article is 1,5 y.o. so maybe Wayland supports now EGLStreams and does no longer require MODESET on Nvidia cards. Anyway, thanks for pointing out that is works for you without the kernel parameter. I will need to try it again soon. – Huygens Nov 15 '17 at 8:42
2

I have exactly the same issue with a GTX 1060, tried the suggested fixes (disabling Wayland in the config and fixing the broken driver) but it still doesn't work. However, I am strangely able to get in by going into recovery mode in grub (with the generic kernel) and selecting resume.

EDIT

I managed to get it to work! To do this, I went to grub, selected "c" for the command line, entered the command "videoinfo" - saw that my default video setting is 1024x768 .. went to /etc/default/grub and added the lines GRUB_GFXMODE=1024x760 GRUB_GFXPAYLOAD_LINUX=1024x768 and set GRUB_CMDLINE_LINUX_DEFAULT="nomodeset" - then update-grub and reboot. However, this only worked when selecting the generic kernel in "advanced options" in grub, not the lowlatency one. I also saw a number of messages about "starting/stopping nvidia persistenced" which may be related or not.

2ND EDIT

@Huygens mentioned using the boot option of nvidia-drm.modeset=1 in /etc/default/grub which also worked rather than using nomodeset. However, I still can't use the low latency kernel to work, even after fixing up the missing header files. It also won't load Wayland. I've seen a number of posts around the place saying that my particular case may be related to having an onboard intel video and a dedicated nvidia card causing issues with nvidia-persistenced and gdm3 (https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1705369). Some people have also reported success by using lightdm (dpkg-reconfigure lightdm) but I couldn't get it to log in without it restarting lightdm each time.

  • 1
    I could also get it to start up lightdm (dpkg-reconfigure lightdm) rather than gdm3, but logging in with lightdm doesn't work. – Roland Quast Oct 25 '17 at 7:22
  • Maybe provide the steps to do when you go in through recovery mode would greatly improve the quality of your answer. – Videonauth Oct 25 '17 at 7:34
  • You can edit your answer to include this :) – Videonauth Oct 25 '17 at 7:38
  • 1
    May be related to this bug.. bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1714881 – Roland Quast Oct 25 '17 at 7:57
1

I just had to disable Wayland : "WaylandEnable=false" in (/etc/gdm3/custom.conf) and now everyhting works fine !

  • I tried this @bummi, as stated in the attempted resolutions, no success ;-; – Mr.Midnight Oct 25 '17 at 4:27
  • I have tried many solutions, so I can not say JUST THIS ONE worked for me, but before doing it, my PC was not working, after it was so this was definitely one of the thinks needed for this to success. – Juraj.Lorinc Jan 22 '18 at 16:31
0

So yesterday, I finally managed to install Ubuntu 17.10 on my PC. In fact, I installed Ubuntu 16.10 before trying to upgrade 17.04. Then I realized that the NVIDIA drivers didn’t work anymore on Ubuntu 17.04. I tried to get into recovery mode to reinstall the drivers, but nothing worked. Till here, I still don’t understand. I had been stuck for a while on the NVIDIA drivers. Then I decided to boot Ubuntu 17.10 with my USB.

  1. Boot with your USB device.
  2. Select “Try ubuntu without installing” in the grub.
  3. Press “e” to edit
  4. Replace “quiet mode” by “nomodeset”
  5. Presse “Ctrl + X” to boot.
  6. Install your system then restart.
  7. First boot after installing, you also must edit the grub like 3. And 4.
  8. Install NVIDIA drivers. https://doc.ubuntu-fr.org/nvidia
  9. Whatever method you use in 8. You must ensure that “NVIDIA X Server Settings” affiches like its setting options, then you are good to go. Reboot and profit your Ubuntu.

  10. If it is not the case:

  11. Go to “Software & Updates” -> “Additional Drivers”, select the default driver “Using X.Org …”

  12. In the terminal: (install lightdm if it is not installed yet) “sudo service lightdm restart” “sudo apt-get remove --purge nvidia-*”
  13. Go back to “Software & Updates” -> “Additional Drivers”, then chose the driver suites your carte.
  14. “sudo service lightdm restart”
  15. Restart your system
0

Problem is not nvidia, it's gdm3. You must need to use lightdm instead of gdm3 with nvidia. Also you need to install the header first.

sudo apt purge nvidia-*
sudo apt install linux-headers-$(uname -r)
sudo apt --no-install--recommends install nvidia-384
sudo apt install lightdm

Now reboot. Everything should be fine. Bumblebee also work with nvidia-384 and nvidia-387

0

This temporary work-around to load the Nvidia drivers seems to work for me (AMD FX6300, Geforce GT730, upgrade to 17.10 from 17.04):

  1. boot into the recovery menu

  2. load root (/) as read/write (I use fix broken packages)

  3. open a root shell

  4. purge, then install the Nvidia drivers

    sudo apt remove --purge nvidia-*
    sudo install nvidia-384
    
  5. exit from the shell to continue the boot

At this point I can login using Unity or Ubuntu.

(I'm guessing that this allows the driver to be bypassed for the boot, but available to apps.)

0

Uninstall Upstart (sudo apt remove upstart) - if installed. Apparently this is dropped from 17.10 & 18.04 in any event, but might cause issues.

Apart from that, although it continues to be flaky, adding nomodeset to Grub (so GRUB_CMDLINE_LINUX="nomodeset" in etc/default/grub) at least gets a working system.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.