Ubuntu 17.10/18.04 boots to black screen when using Nvidia drivers (on a desktop with an Intel GPU)

Bug #1705369 reported by Abdulrahman Amri on 2017-07-20
262
This bug affects 52 people
Affects Status Importance Assigned to Milestone
gdm3 (Ubuntu)
High
Unassigned
gnome-shell (Ubuntu)
High
Unassigned
nvidia-graphics-drivers-375 (Ubuntu)
High
Unassigned
nvidia-graphics-drivers-384 (Ubuntu)
Undecided
Unassigned

Bug Description

Ubuntu 17.10 boots to black screen when using Nvidia drivers (on a desktop with an Intel GPU)

WORKAROUNDS:

* Disable integrated graphics/GPU in your BIOS; or

* Add 'nomodeset' to your kernel cmdline in /etc/default/grub and then
  run: sudo update-initramfs
  and reboot.

ORIGINAL DESCRIPTION:

This bug is very similar to
https://bugs.launchpad.net/ubuntu-gnome/+bug/1559576
which is closed. I have been asked to open a new bug report.

The issue is on Ubuntu 17.10 with gdm3 fully updated as of July 20, 2017. I upgraded to 17.10 from a freshly installed Ubuntu 17.04.

- Lightdm works
- Nouveau driver works
- Nvidia driver 375.66 (proprietary) does not work
- Nvidia driver 384.47 (open source) does not work (from https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa)
- Nvidia drivers work with Ubuntu Gnome 17.04

I am using Nvidia GTX 1080 and Intel i7-4790K

lsb_release -rd:
Description: Ubuntu Artful Aardvark (development branch)
Release: 17.10

apt-cache policy gnome-shell:
gnome-shell:
  Installed: 3.24.2-0ubuntu7
  Candidate: 3.24.2-0ubuntu7
  Version table:
 *** 3.24.2-0ubuntu7 500
        500 http://sa.archive.ubuntu.com/ubuntu artful/main amd64 Packages
        100 /var/lib/dpkg/status

uname -s -r -v -p -i -o:
Linux 4.11.0-11-generic #16-Ubuntu SMP Wed Jul 12 20:40:19 UTC 2017 x86_64 x86_64 GNU/Linux

Abdulrahman Amri (amri) on 2017-07-20
description: updated
Daniel van Vugt (vanvugt) wrote :

This is expected :(

From what I read (have not tested myself), the Nvidia driver defaults to disabling KMS support. This means Wayland (and hence GDM now) won't work.

So there are three possible solutions I can think of:

 * Enable Nvidia KMS support by adding nvidia-drm.modeset=1 to your kernel command line. This should make Wayland (and hence GDM) work. It's possibly not the default yet because performance is lower in this mode(?); or

 * Reinstall lightdm and configure it to re-replace gdm. Then make sure you choose to log in to "Ubuntu" and not "Ubuntu on Wayland"; or

 * Configure GDM to use Xorg instead (if that's even possible). Then make sure you choose to log in to "Ubuntu" and not "Ubuntu on Wayland".

Changed in gdm3 (Ubuntu):
importance: Undecided → High
Changed in gnome-shell (Ubuntu):
importance: Undecided → High
Changed in nvidia-graphics-drivers-375 (Ubuntu):
importance: Undecided → High
Daniel van Vugt (vanvugt) wrote :

For more information see related bug 1697882

Changed in gnome-shell (Ubuntu):
status: New → Invalid
Daniel van Vugt (vanvugt) wrote :

I think the ideal solution is to modify gdm to detect if KMS support is missing and switch to X11 instead. It should also hide Wayland sessions when KMS support is missing, and it should hide X11 sessions when Nvidia KMS mode is enabled (bug 1697882).

Daniel van Vugt (vanvugt) wrote :

Although given we have other reasons to prefer Xorg sessions, simply forcing GDM to use Xorg and not Wayland would also solve this.

Abdulrahman Amri (amri) wrote :

@Daniel

I tested Option 1 and it worked but I had to add nomodeset to grub because I was stuck on boot after a message like this
/dev/sda2: clean, .... files, ... blocks.
It worked using Nvidia driver 375.66, version 384.47 worked but the graphics were terrible, I think it was a FPS issue.

Option 2 was tried before and it worked.

Daniel van Vugt (vanvugt) wrote :

Sounds like #3 is the best option, assuming it's possible.

Changed in nvidia-graphics-drivers-375 (Ubuntu):
status: New → Won't Fix
Changed in gdm3 (Ubuntu):
importance: High → Critical
Daniel van Vugt (vanvugt) wrote :

Oh it's easy. Try this:

Edit /etc/gdm/custom.conf and uncomment:

#WaylandEnable=false

Unfortunately for the rest of us running GDM with Wayland disabled seems to remove the Wayland login options.

Daniel van Vugt (vanvugt) wrote :

I meant to say: edit /etc/gdm3/custom.conf and uncomment:

#WaylandEnable=false

Daniel van Vugt (vanvugt) wrote :

It sounds like what we actually want in future is to keep Wayland enabled by default and gdm3 to just detect the absence of KMS support, and in that case default to Xorg instead.

Sebastien Bacher (seb128) wrote :

gdm should already fallback to an x11 greeter (with wayland user sessions filtered out from the login choices) on nvidia binary driver configs, could you enable debug in /etc/gdm3/custom.conf (uncomment the corresponding line), reboot and share the journal log?

Abdulrahman Amri (amri) wrote :

@Sebastien
I tried twice using Nvidia driver 375.66.
I also reset nvidia-drm.modeset to its default 0.

The first try, grub had nomodeset in it, and the system was able to boot, the wayland session was filtered out.

The second time with grub default settings (no nomodeset), the system was not able to boot, I had to restart and extract the logs via the recovery mode.

The logs are attached.
I hope this information help.

Daniel van Vugt (vanvugt) wrote :

"The first try, grub had nomodeset in it, and the system was able to boot, the wayland session was filtered out."

That sounds like a fix, and an answer to comment #8...? Does that mean you didn't need to disable wayland in /etc/gdm3/custom.conf ? Please clarify if you have a configuration that works and point out what it is for other Nvidia users.

Changed in gdm3 (Ubuntu):
status: New → Incomplete
Abdulrahman Amri (amri) wrote :

@Daniel

I did not uncomment #WaylandEnable=false as mentioned in comment #8. I think Sebastien was right but the grub modification was required. I was able to boot by adding nomodeset to grub. Wayland session was filtered out. Perhaps this is a workaround.

Daniel van Vugt (vanvugt) wrote :

Thanks.

If you had to explicitly add 'nomodeset' to your kernel command line then that suggests the problem is that Linux detected a KMS-capable GPU still, and thus GDM would try to use it by default. Is it possible your i7-4790K has its integrated GPU still enabled (in your BIOS), or that you have other graphics cards installed?

Changed in gdm3 (Ubuntu):
status: Incomplete → New
status: New → Incomplete
Daniel van Vugt (vanvugt) wrote :

I'm a little confused because both the log files attached show 'nomodeset' is on the command line.

Can you please confirm what the contents of /proc/cmdline show both with and without the bug?

Abdulrahman Amri (amri) wrote :

@Daniel

This is what I did:

1- Without the bug, this is the output
cat /proc/cmdline:
BOOT_IMAGE=/boot/vmlinuz-4.11.0-11-generic.efi.signed root=UUID=fa4d9534-68f3-4605-bbf7-5b5ea275471d ro quiet splash nomodeset vt.handoff=7

2- In /etc/default/grub I changed this line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
to this
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" then executed sudo update-grub.

3- I rebooted and got the same bug again.

4- I rebooted and went to the recovery mode (root), this is the output of cat /proc/cmdline:
BOOT_IMAGE=/boot/vmlinuz-4.11.0-11-generic.efi.signed root=UUID=fa4d9534-68f3-4605-bbf7-5b5ea275471d ro recovery nomodeset.

5- I changed that grub line back to
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset" then executed update-grub.

6- I rebooted, and was able to access my desktop.

I do not have other graphics cards installed. I am using multiple monitors, not sure if that is relevant. I'll check if the integrated GPU is still enabled.

Changed in gdm3 (Ubuntu):
status: Incomplete → New
Daniel van Vugt (vanvugt) wrote :

Thanks again.

It's starting to sound like your 'nomodeset' fix works because you've still got a modesetting GPU enabled (the Intel GPU). As such, I expect that's the only GPU that Wayland will find by default. But if your monitor is plugged into the Nvidia card then Wayland is displaying to an unused card/connector. So as far as GDM is concerned it has booted on a machine with an Intel GPU and no monitor connected, hence the black screen. That's my theory anyway.

Abdulrahman Amri (amri) wrote :

@Daniel

You're right, my integrated GPU was enabled, after disabling it, I was able to boot even without the 'nomodeset' fix. No wayland option, but still works. :)

Daniel van Vugt (vanvugt) wrote :

Excellent.

Sounds like GDM's KMS detection needs improving. Finding a KMS device is not sufficient for choosing Wayland over Xorg. GDM should be checking for a monitor plugged into the KMS device too. And if that's not found then fall back to Xorg.

Note that we can't simply make 'nomodeset' installed by default with Nvidia because that would break laptops. Laptops generally have their Intel GPU wired to the screen and the Nvidia GPU logically separate. But the fix to GDM I have suggested should work for all cases.

Changed in gdm3 (Ubuntu):
status: New → Triaged
summary: - Ubuntu 17.10 boots to black screen when using Nvidia drivers
+ Ubuntu 17.10 boots to black screen when using Nvidia drivers (on a
+ desktop with an Intel GPU)
tags: added: gnome-17.10
Changed in gdm3 (Ubuntu):
importance: Critical → High
description: updated
tags: added: black-screen

For what it's worth, nvidia Optimus requires the integrated display to be modeset=1, this is what you mean by "nomodeset would break laptops", I assume. Should we be reporting this upstream?

Daniel van Vugt (vanvugt) wrote :

Yes and no. I was going to look at this bug in detail soon, the first step of which would would also involve looking upstream.

Daniel van Vugt (vanvugt) wrote :

No that matches your bug 1706474, both of which are actually the opposite to this one. So really bug 1706474 should not have been marked as a duplicate of this.

OK, Alberto on the upstream bug says it is not the same as my bug, because
the upstream bug is for systems with only an nvidia card.
Mine is an Optimus bug. His point is, I think, that gdm chooses wayland
based on the modesetting value of the first card it sees, which in the case
of an Optimus laptop is the intel video, and the upstream bug is only for
situations where the first card is nvidia, which means it can't apply to
Optimus laptops. However, it seemed the same to me because Wayland and
nvidia modesetting don't seem to work in 17.04 or 17.10. If I can help at
all with testing please let me know.

On 28 July 2017 at 13:28, Daniel van Vugt <email address hidden>
wrote:

> No that matches your bug 1706474, both of which are actually the
> opposite to this one. So really bug 1706474 should not have been marked
> as a duplicate of this.
>
> ** Bug watch removed: GNOME Bug Tracker #784470
> https://bugzilla.gnome.org/show_bug.cgi?id=784470
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1706474).
> https://bugs.launchpad.net/bugs/1705369
>
> Title:
> Ubuntu 17.10 boots to black screen when using Nvidia drivers (on a
> desktop with an Intel GPU)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1705369/+subscriptions
>

--
Tim Richardson

Yes this bug is only about desktops, where there is no monitor plugged into the Intel GPU.

Daniel van Vugt (vanvugt) wrote :

My first attempt at reproducing this bug has failed.

I am using an Nvidia Quadro K620 card in a desktop where I usually just use the integrated Intel graphics. And I have installed nvidia-375 375.66-0ubuntu1. The result is that Ubuntu 17.10 boots perfectly. VTs are using efifb. GDM and gnome-shell both start using Xorg automatically and the Wayland options have been hidden.

Perhaps I would need to test a newer card that's more difficult for software support? Or perhaps something got fixed?

@amri could you please remove 'nomodeset', enable integrated graphics in your BIOS, reboot and see if the problem persists?

Changed in gdm3 (Ubuntu):
status: Triaged → Incomplete
Daniel van Vugt (vanvugt) wrote :

Tried again, this time remembering to tell my BIOS not to auto-disable the integrated graphics, so now I have both:

$ ls /dev/dri
by-path card0 card1 renderD128 renderD129

But the outcome is the same. GDM and gnome-shell work perfectly with only the Nvidia card plugged in. They just allow Xorg sessions and hide the Wayland options.

So it seems the relevant smarts are working in gdm. I'm not sure what's different about your machine other than the card model.

Jeremy Bicha (jbicha) wrote :

Daniel, does having switcheroo-control installed help? After reoboting, the computer should default to using the less powerful graphics card. GNOME Shell then provides a right-click option to run specific apps using the more powerful graphics card.

The MIR for switcheroo-control is https://launchpad.net/bugs/1691585

Abdulrahman Amri (amri) wrote :

@vanvugt, the "nomodeset" is removed. After disabling the integrated graphics, I did not need it.

I just enabled the integrated graphics and got the same behavior as before.
- Select ubuntu from menu
- 2 monitors go dark, and 1 monitor display a gray background with nothing in it.
All my monitors are connected to my graphics card.

After I disabled the integrated graphics, Linux was able to boot again.

Daniel van Vugt (vanvugt) wrote :

Jeremy, I don't experience any bug myself. I'm just trying to find a way to reproduce this one.

Changed in gdm3 (Ubuntu):
status: Incomplete → New
SB (emehntehtt) wrote :

I just installed daily iso and I cant login to Gnome at all, when I enter my password after initial reboot the desktop hard locks and I must turn off my laptop, I cant get into virtual consoles or anything. My graphics card is Nvidia, there is no integrated Intel graphics card, only dedicated Nvidia graphics card.

Daniel van Vugt (vanvugt) wrote :

SB, please log a separate bug.

Odysseas (mutd2017) on 2017-08-15
Changed in gdm3 (Ubuntu):
status: New → Incomplete
status: Incomplete → New
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gdm3 (Ubuntu):
status: New → Confirmed
ROCHE (guyroche08-6) wrote :

My pc .... ASUS GL753V Core I7 7700 Video GeForce 1050 NVidia
Same p had artful 17.10 ubuntu before but dont work with X org video server but works with nvidia driver 375.82 ... Problem : all commands ok BUT noway to parameter gamma, contrast ... I used command xgamma - gamma 0.5 or another value but dont work. I put cairo desktop on with "luminosite" command (I am french)... Dont work too. This way (xgamma, cairo lum. seems not working on nvidia pilote driver but only on X org video serverdriver
The intel prime profile dont work too and crash pc... Hot temp on gpu and Fan hot works !
For info : goods work on 4.10.0.21 version and no generic upgrade possibility

I am not an expert command line but i like copy/past using since forum (i used ubuntu since 8... Version) So if you have soluce using copy/past on monitor system that's good for me...

Bye

ROCHE (guyroche08-6) wrote :

Defaut seen ::

cpu#0 stuck over 22s ! (manager-gpu :984)

Pb start gpu? on xorg video

I have a similar problem with an intel graphic card
corrado@corrado-HP-aa-p5:~$ inxi -GxxIS
System: Host: corrado-HP-aa-p5 Kernel: 4.12.0-11-generic x86_64
           bits: 64 gcc: 7.1.0
           Desktop: Gnome 3.24.3 (Gtk 3.22.19-0ubuntu1) dm: gdm3
           Distro: Ubuntu Artful Aardvark (development branch)
Graphics: Card: Intel Haswell-ULT Integrated Graphics Controller
           bus-ID: 00:02.0 chip-ID: 8086:0a16
           Display Server: x11 (X.Org 1.19.3 )
           drivers: fbdev (unloaded: modesetting,vesa)
           Resolution: 1366x768@76.00hz
           OpenGL: renderer: llvmpipe (LLVM 4.0, 256 bits)
           version: 3.3 Mesa 17.2.0-rc4 (compat-v: 3.0) Direct Render: Yes
Info: Processes: 227 Uptime: 5 min Memory: 1133.9/3880.1MB
           Init: systemd v: 234 runlevel: 5 Gcc sys: N/A
           Client: Shell (bash 4.4.121 running in gnome-terminal-) inxi: 2.3.34
corrado@corrado-HP-aa-p5:~$

and problem disappeared changing /etc/default/grub: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" into GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
My problem was as follows:
press power button, Grub menu appears, select partition p5 or wait (p5 is default) -> black screen, wait ... nothing happens but system led is on and disk led blinks for 30-40 seconds, press again power button, after few seconds the system led start blinking as in suspend, press power button again, now the logon screen appear. Should i open a different bug?

Daniel van Vugt (vanvugt) wrote :

Yes, please log a different bug if you're using Intel graphics.

As of the latest updates to gdm3, I still can't boot with my laptop when it's in discrete mode (nvidia graphics only). Does not get to the greeter.
syslog is full of countless repetitions of "Stopping NVIDIA persistence Daemon".
CPU must be high because the fan comes on. I've reported this but it's going to be better if someone who knows what they are doing can reproduce it.

(In hybrid mode, it boots, but no external displays are detected, which implies that nvidia isn't working properly)

I have the latest 375 Nvidia driver. nvidia Modesetting is enabled.

Still works fine with lightdm as the display manager.

MicWit (michaelwitten82) wrote :

I have installed 17.10 in a virtual box (have an nvidia card in my pc, not sure what virtual box detects as, in a windows host), and been updating it daily to check out the 17.10 progression. It was fine for a few weeks, but then about a week ago I would install, and then boot - all good, and then I would do an apt update and upgrade. Once I reboot after an upgrade, I get a black login, then if I press enter, enter my password and press enter again, I get the brief screen with text (like when it worked) and then black again.

I'm thinking this is the same issue? Or in this issue is everyone booting to black immediately after install? I have been downloading the daily builds, so it's not an old image I am installing from.

Daniel van Vugt (vanvugt) wrote :

MicWit, please log a separate bug.

Changed in nvidia-graphics-drivers-384 (Ubuntu):
status: New → Confirmed
35 comments hidden view all 115 comments
Quantum Resistant Ledger (qrl) wrote :

In my case, the header files for the lowlatency kernel were not available so when installing the nvidia drivers, there was a subtle warning. After installing the kernel headers for lowlatency the workaround worked.

William Haverstock (dhaverst) wrote :

I had the blank screen, no login screen problem.

The computer was otherwise running though.

I ssh-ed from another computer to the problem computer
to execute the suggested commands.

If on a home network you can login to your router with a
web browser to get the IP address for your problem computer.

Mine was 192.168.1.3

The following fixed the problem for me.

First I did (without the comment).

  sudo apt-get install lightdm # This showed lightdm was installed

Second I did uname -r and found the completion for
the linux-headers-$(uname -r) command.

I don't know why I didn't use the suggested:
    sudo apt install linux-headers-$(uname -r)

Then I did the suggested commands, one after the other:
  sudo apt purge gdm3
  sudo apt purge nvidia*
  sudo apt install linux-headers-4.13.0-16-generic # ADJUST THIS
  sudo apt install nvidia-384
  sudo dpkg-reconfigure lightdm # Suggested when 1st command ran
  sudo shutdown -r now # Restart

Went to the problem computer, the login screen came up.

The Desktop Environment that was selected was:
  Ubuntu on Xorg(Default)

I was able to login.

My problem computer is at least 10 years old.

You can also do all of the commands from the rescue mode.

What is concerning is that this major issue is still left untouched. Is
there anything we can do to help?

On Sun, 5 Nov 2017, 10:05 pm William Haverstock, <email address hidden>
wrote:

> I had the blank screen, no login screen problem.
>
> The computer was otherwise running though.
>
> I ssh-ed from another computer to the problem computer
> to execute the suggested commands.
>
> If on a home network you can login to your router with a
> web browser to get the IP address for your problem computer.
>
> Mine was 192.168.1.3
>
> The following fixed the problem for me.
>
> First I did (without the comment).
>
> sudo apt-get install lightdm # This showed lightdm was installed
>
> Second I did uname -r and found the completion for
> the linux-headers-$(uname -r) command.
>
> I don't know why I didn't use the suggested:
> sudo apt install linux-headers-$(uname -r)
>
> Then I did the suggested commands, one after the other:
> sudo apt purge gdm3
> sudo apt purge nvidia*
> sudo apt install linux-headers-4.13.0-16-generic # ADJUST THIS
> sudo apt install nvidia-384
> sudo dpkg-reconfigure lightdm # Suggested when 1st command ran
> sudo shutdown -r now # Restart
>
> Went to the problem computer, the login screen came up.
>
> The Desktop Environment that was selected was:
> Ubuntu on Xorg(Default)
>
> I was able to login.
>
> My problem computer is at least 10 years old.
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1726425).
> https://bugs.launchpad.net/bugs/1705369
>
> Title:
> Ubuntu 17.10 boots to black screen when using Nvidia drivers (on a
> desktop with an Intel GPU)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1705369/+subscriptions
>

Schoof (andreas-schoof) wrote :

today xubuntu deployed kernel 4.0.13-17. Looking into grub editor at starton, gfxpayload option isn't shown any more. Does kernel update edit grub boot options? If yes, how is etc/default/grub updated? Otherwise latter update-grub would restore options of historic version?

Schoof (andreas-schoof) wrote :

sorry, #80 was designated for (similar) Bug 1724639...

Edward Boyle (ebcoder) wrote :

I have read this entire thread and am wondering if we have some type of active clear solution. I was under the impression that Ubuntu had matured and this kind of nightmare was almost unheaded of anymore.

Edward Boyle (ebcoder) wrote :

#60 confirmed as the solution to this?

CaptSaltyJack (csjubuntu) wrote :

Yeah, apparently 17.10 wasn’t tested thoroughly before release.

And yes, #60 works. Just make sure lightdm is installed.

Daeld (daeld-daeldia) wrote :

It has been clear for a while now that Ubuntu actually has a 2-year release cycle. I have used ubuntu since 8.10, always using the most recent release but since 10.04 I have considered that LTS stands for long term STABLE because of exactly this kind of problem with 17.10. So I now consider the non-LTS releases to be a "dev/tester" release. Ubuntu doesn't officially say that, but I notice that if you go to the download page, 16.04.3 is the first option available. I think that Canonical should just be honest about it. I would still use the "dev/test" releases and they could take more risks. When I recommend an ubuntu distro to a new user, I will usually recommend the LTS because I don't want them to have to mess around and be put off. This is the reason why we still have bug #1 an issue for laptops and desktops

Matthias Niess (mniess) wrote :

The solution is actually easier than #60. You just need to remove and reinstall the nvidia drivers (or amd if you used those).

CaptSaltyJack (csjubuntu) wrote :

I actually don't think uninstalling nvidia & reinstalling is good enough. gdm3 has to be removed.

Matthias Niess (mniess) wrote :

Maybe there are separate issues. Booting to a black screen after update happened on three of my machines (2 nvidia, 1 AMD). On all of them it was enough to remove the binary drivers, reboot and reinstall them.

Janne Korhonen (jansku) wrote :

#77 enabled me to use nvidia drivers

slamdunk (antongiulio05) wrote :

As it looks like there is no chance to make this work on 17.10 do you know if downgrading to 16.04 helps?

slamdunk (antongiulio05) wrote :

Ok found finally a work solution (I bet for most of you :))

https://gist.github.com/wangruohui/df039f0dc434d6486f5d4d098aa52d07

Basically skip all the nvidia repository ppa. Install lightdm. Purge gdm3. Follow manual install for the latest driver. Login with lightdm as Xorg.

Now I have shining GTX1060 running on Ubuntu 17.10 :)

BTW I noticed that the ppa drivers do not create /dev/dri/card0! that is the main issue (that loops in Xorg login).

So basically sounds like the ppa are "incomplete" for some of the installation drivers (do they consider the 32 bit libs??)

Tamás Ferenc (fecka) wrote :

I'm also affected by this, running a laptop with intel i5-6300HQ, and GTX 950M. GDM3 won't work at all, but switching to lightDM and Xorg only seems to have solved it temporarily. I'm using nvidia-384 with a 4.13.10-* kernel.

Here's a question with slightly more details: https://askubuntu.com/questions/990634/ubuntu-17-10-cannot-get-nvidia-drivers-to-work-for-cuda-opencl-purposes/990804#990804

gdm3 and nvidia binary drivers don't work together yet. Maybe 18.04 although there's not much evidence that anyone who knows how to fix this problem is working on it.
This problem has emerged since the default Ubuntu session now uses gdm3 (as of 17.10) but standard gnome users on all recent distribution have the same problem.

The best solution is to replace gdm3 with lightdm. (sudo apt install lightdm)
You can install both display managers and swap between them with

dpkg-reconfigure lightdm (or dpkg-reconfigure gdm3)
and obviously choose lightdm

You don't seem to lose anything by using lightdm instead of gdm3.

Hi there, I've made it work. I don't know if it matters but I am using nvidia-390.
So, first of all, we need to fix nvidia-persistenced.

  sudo cp /lib/systemd/system/nvidia-persistenced.service /etc/systemd/system
  sudo nano /etc/systemd/system/nvidia-persistenced.service

Here we have to change '/usr/bin/nvidia-persistenced' to '/usr/lib/nvidia-390/bin/nvidia-persistenced'. Instead of 'nvidia-390' use your driver version. Then

  sudo systemctl daemon-reload

Next we have to edit '/etc/gdm3/PostSession/Default'. This script is run as 'root' after logout.

  sudo nano /etc/gdm3/PostSession/Default

and make it look like this:

#!/bin/sh
/etc/gdm3/Prime/Default
/etc/gdm3/PrimeOff/Default
exit 0

This should do it.
If prime still doesn't work for you, I also have 'nouveau.modeset=0 rd.driver.blacklist=nouveau' on GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub.
Also try to reboot.

And, I forgot to mention, I disabled Wayland in '/etc/gdm3/custom.conf' by uncommenting

#WaylandEnable=false

to

WaylandEnable=false

hi, i have this problem too
im using sony vaio vpceg38fg with nvidia 410m
but the screen is not black, its just turned off.
i have tried nvidia binary driver 384.111, 304.137, 340.104 none of them worked bug-free
nouveau work but i cannot change the brightness of the screen.

i have workaround that work, at least for me.
boot normally into ubuntu, few seconds after the screen turned off by itself press the power button on the laptop, which trigger sleep state.
wait few seconds, then push the power button again, and voila it worked!

Oscar Parada (oparada1988) wrote :

I was reading everything and I want to make sure this is the same issue. When i install the nvidia driver everything runs, installs all good. when i reboot, under the login i dont have an option for "ubuntu" and "ubuntu xorg" im able to log in, theres screen tearing but ive managed to fix that. however, when i select the intel option under nvidia settings, i log out, then i get the choices. im able to log in under "ubuntu" however, when i try to log in under "ubuntu xorg" it crashes and i have to force it shut.... is this the same issue yall are having?

CaptSaltyJack (csjubuntu) wrote :

Honestly I wouldn't concern yourself with it at this point. Ubuntu 18.04 is due out in just over two weeks.

hunter` (hunter-87) wrote :

i had the same problem in ubuntu 18.04 after upgrading to nvidia-drivers-390.48, than i could not login even using nouveau after removing all nvidia driver.

GDM3 could not manage to boot properly but just installing lightdm and setting it to default let me login successfully (i did not remove gdm so it was not necessary to do so to fix it)

Bodie Solomon (bodie) wrote :

This also affected me on Bionic. Note that I had the Nvidia native drivers working in 17.10, but the bug only affected me in Bionic. https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-390/+bug/1763774

Bodie Solomon (bodie) wrote :

In my issue the CPU is AMD ryzen.

Bodie Solomon (bodie) wrote :

I am still affected by this bug after the 18.04 release.

tags: added: bionic
summary: - Ubuntu 17.10 boots to black screen when using Nvidia drivers (on a
+ Ubuntu 17.10/18.04 boots to black screen when using Nvidia drivers (on a
desktop with an Intel GPU)
Jan Sundman (jan-sundman) wrote :

I'm also affected by this bug on Ubuntu 18.04. This happens both with nvidia-driver-390 and nvidia-driver-396.

My graphics card model is a Nvidia GM107GLM [Quadro M1200 Mobile] on a Dell Precision 5520 laptop

Daniel van Vugt (vanvugt) wrote :

Note that if the workarounds at the top of this bug don't work for you then you're subscribed to the wrong bug. In that case, please open a new one.

Eldar Khayrullin (eldar) wrote :

Laptop Samsung NC110-P03RU
Fix:
in '/etc/gdm3/custom.conf' uncommenting

#WaylandEnable=false

to

WaylandEnable=false

Eldar Khayrullin (eldar) wrote :

The last comment appliable to Laptop DNS H90MB with Intel GMA 3150

Daniel van Vugt (vanvugt) wrote :

Note that if the workarounds at the top of this bug don't work for you then you're subscribed to the wrong bug. In that case, please open a new one.

Hi, this is the basic configuration of my desktop:
-Motherboard: ROG STRIX X370-F GAMING.
-CPU: Ryzen 7 1700.
-GPU: GTX 1050 2GB from MSI.

I don't know if the bug I have is this one, but sometimes, after successfully login, the screen goes black in the first 10 minutes.

On Ubuntu 17.10 I could see a message about "stopping user manager for uid", but on 18.04 I only see information about storage I always get in the boot process, nothing apparently bad.

I used different versions of the NVIDIA blob driver without getting different results, but the error didn't appear in almost one month using Linux Mint, so I think the problem is from Ubuntu's stack.

I forgot to say I will try with nomodeset in my Grub config first. If that doesn't work, I will switch from GDM to LightDM.

Daniel van Vugt (vanvugt) wrote :

Eduardo, please log a separate bug for that.

description: updated
Yotam Benshalom (benshalom) wrote :

I suffer from this issue with gtx770 nvidia card. Annoyingly, this freezes gdm3 so hard that I cannot even switch to a different tty.
The workaround above (in '/etc/gdm3/custom.conf' uncommenting #WaylandEnable=false) works for me.

Daniel van Vugt (vanvugt) wrote :

That sounds like a different bug. Do you have a separate bug report for that?

Daniel van Vugt (vanvugt) wrote :

@amri,

Could you please report this bug to the GDM developers?;

  https://gitlab.gnome.org/GNOME/gdm/issues

Changed in nvidia-graphics-drivers-375 (Ubuntu):
status: Won't Fix → Invalid
Changed in nvidia-graphics-drivers-384 (Ubuntu):
status: Confirmed → Invalid
Displaying first 40 and last 40 comments. View all 115 comments or add a comment.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.