Ubuntu boots to blank screen when using Nvidia (on a desktop with an unused Intel GPU)

Bug #1705369 reported by Abdulrahman Amri on 2017-07-20
256
This bug affects 52 people
Affects Status Importance Assigned to Milestone
GNOME Shell
Fix Released
Unknown
gdm3 (Ubuntu)
High
Daniel van Vugt
gnome-shell (Ubuntu)
Undecided
Unassigned
mutter (Ubuntu)
High
Daniel van Vugt
nvidia-graphics-drivers-375 (Ubuntu)
Undecided
Unassigned
nvidia-graphics-drivers-384 (Ubuntu)
Undecided
Unassigned

Bug Description

Ubuntu boots to blank screen when using Nvidia drivers (on a desktop with an unused Intel GPU).

WORKAROUNDS (you only need one):

* Uncomment #WaylandEnable=false in /etc/gdm3/custom.conf

* Disable integrated graphics/GPU in your BIOS

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

* Add a line to /usr/lib/udev/rules.d/61-gdm.rules:
  DRIVER=="nvidia", RUN+="/usr/lib/gdm3/gdm-disable-wayland"

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

Related branches

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.

Iamanan Emmanuel (iamanel) wrote :

I too am affected by this bug

The device is a Dell Vostro 5470 with Intel integrated graphic card + Nvidia GT740M using
driver version 375.66.

The bug appears when doing a clean install of Ubuntu gnome, changing the nouveau driver to proprietary 375.66 and rebooting. Upon reboot the login screen doesn't show (all black with display on)

The same happens with Ubuntu 17.04 and even 16.04
but only with gnome desktop. unity works just fine.

I've installed updated to 17.10 on my Dell XPS 13 with Nvidia GT960M and have the issue where no wayland session is presented. I'm happy to do some tests from you if you'd like to check anything on a newer system with Optimus

Blaha (nelson-blaha) wrote :

I got around this with a GTX1080 by choosing advanced options for Ubuntu at GRUB and using the 4.10.0-37-generic kernel. 13.0.0-16-generic causes the "stopping user manager for uid" loop.

Florent Olivaud (flolivaud) wrote :

I've tried all solutions, nothing work for me... I can't disable my Intel GPU on bios (Motherboard: MSI Z270-A PRO). Maybe i need to downgrade to ubuntu 17.04 ?

Launchpad Janitor (janitor) wrote :

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

Changed in nvidia-graphics-drivers-384 (Ubuntu):
status: New → Confirmed
Juan Leni (jleni) wrote :

'nomodeset' does not work as a workaround in my case.

Daniel van Vugt (vanvugt) wrote :

j, please log a new bug for your issue.

Aergistal (aergistal) wrote :

The solution that worked in my case:

4.13.0-16-lowlatency
Nvidia GT 620
gdm3 with Wayland

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

That did not work for me. I had to uninstall gdm3 completely in order to be
able to even get a login screen up.

#49 save my life!

Thank you for sharing the solution @Aergistal!

Combination of Vadim and Aergistal's process is what worked for me. End result is no gdm3 and I'm using gnome-shell instead of ubuntu's 17.10 gnome desktop. This was a repeatable process :):

ssh into my ubuntu 17.10 machine
sudo apt-get purge gdm3
sudo apt purge nvidia*
sudo apt install nvidia-384
hard reboot of ubuntu 17.10 machine (yikes)
got the login screen and a combination of my old gnome-shell with ubuntu's menu on the left side (configured to be there by default)

Thank You Aergistal and Vadim!

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.

CaptSaltyJack (csjubuntu) wrote :

Just wanted to weigh in: simply adding "nomodeset" to my kernel command line worked! I was able to use the proprietary NVidia drivers, no problem. I'm on a ThinkPad T570.

It looks like due to this change, I'm using X11 instead of Wayland. I don't know if I care either way, everything works great and the graphics are snappy. Hopefully Wayland will be ready by the time 18.04 launches.

CaptSaltyJack (csjubuntu) wrote :

I take that back. Just rebooted, and I have a black screen with a blinking cursor. Ugh.

CaptSaltyJack (csjubuntu) wrote :

Update: Went into a recovery shell as root, ran "dpkg-reconfigure xserver-xorg". I got no output, no prompts, nothing. Rebooted, things are OK now.

CaptSaltyJack (csjubuntu) wrote :

Sorry to spam the comments, there's no edit feature. Once again I have a black screen with a blinking cursor, but I'm able to hit Ctrl+Alt+F6 to get to a shell. How do I troubleshoot this?

See the steps we've already posted to alleviate the issue. Remove gdm

On Sat, 28 Oct 2017, 11:00 pm CaptSaltyJack, <email address hidden>
wrote:

> Sorry to spam the comments, there's no edit feature. Once again I have a
> black screen with a blinking cursor, but I'm able to hit Ctrl+Alt+F6 to
> get to a shell. How do I troubleshoot this?
>
> --
> 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
>

Sorry, there were many different solutions posted so I wasn’t sure which was the correct one.

So just to be clear, is the solution:

$ sudo apt purge gdm3

??

What’s the exact list of steps to resolve this?

Vadim Peretokin (vperetokin) wrote :

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

CaptSaltyJack (csjubuntu) wrote :

Thanks! Ran that on a VM as a test. I wound up with a text-based login shell, no greeter. "sudo apt install lightdm" fixed that, but my VM may not have been in a totally clean state.

The VM would be using VirtualBox drivers, not NVIDIA - so I don't think
your problem is related!

On Sun, 29 Oct 2017, 4:45 pm CaptSaltyJack, <email address hidden>
wrote:

> Thanks! Ran that on a VM as a test. I wound up with a text-based login
> shell, no greeter. "sudo apt install lightdm" fixed that, but my VM may
> not have been in a totally clean state.
>
> --
> 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
>

You're right :) I skipped the nvidia part. Just wanted to see how the VM would behave if I purged gdm. Then I realized lightdm was not installed, so that would be an extra step on that list.

Thanks, everyone

CaptSaltyJack (csjubuntu) wrote :

Did the steps above on my laptop. It works, though the "Ubuntu" login just logs me out right away (I believe that's Wayland). If I choose "Ubuntu on Xorg", I can log in with no issues.

Greetings, this bug is also affecting my brand new fresh clean install of Ubuntu 17.10 to my Dell XPS 15 laptop. I have gone thru this thread and have tried every single trick/hack and nothing allows the machine to boot successfully once the Nvidia drivers are installed. In fact, I am facing consisten boot loops no matter which driver I install. I was also unsuccessful in being able to log in wiht lightdm, even though the machine did successfullly boot to the lightdm login screen after Nvidia-375 was installed. I was wondering if I should try a different kernel than the one that ships with 17.10?? I have as GeoForce GTX 1050 video card in the machine, so its not uncommon.

CaptSaltyJack (csjubuntu) wrote :

Bernadette:

Just to make sure, did you try the below in this exact order?

sudo apt purge gdm3
(optional step if lightdm is not auto installe) sudo apt install -y lightdm
sudo apt purge nvidia*
sudo apt install linux-headers-$(uname -r)
sudo apt install nvidia-384

This worked for me. At the lightdm login screen, I had to choose "Ubuntu on Xorg" as the default environment before logging in. Wayland does not work at all.

Your kernel should be ok. You may be experiencing an unrelated issue. 17.10 is kind of a mess.

did the steps in post #60....now I'm just frozen with no opportunity to do anything at all. gonna have to reinstall 17.10 once again. This will me my 6th reinstall...

@CaptSaltyJack - I'm reinstalling from scratch...should be about an hour or so. Then before I do anything at all, I will go ahead with each of your steps and then report back if I have success or not.

CaptSaltyJack (csjubuntu) wrote :

Good luck! I went through several tries to get it right. Make sure after removing gdm that lightdm is installed.. that's key. And if you get a login screen, be sure to use Xorg. Those two things SHOULD get you on the right track hopefully.

K...so we’re getting closer! After a fresh install yet again, and following very closely the steps outlined in post #66, I am now at the lighten login screen. It will NOT let me login, it’s a constant login loop every time I put in my password. But at least I’m past boot loop. I attempted to fix the login loop by using a hack:
Carl+Alt+F1
mv.Xauthority .Xauthority.bak
Then back to the GUI. Unfortunately this did not work. So I am currently just sitting at the login screen, unable then login....lol

This is a bit comical that we need to jump thru these hoops for drivers to work :-(

I’ve attempted login to Ubuntu on Xorg(Default) and also Ubuntu on Xorg, and even Ubuntu(Default). Any and all options just bring me right back to the password box....login loop.

CaptSaltyJack (csjubuntu) wrote :

Sorry you can't get it working, that's all I can think of. My advice would be to just go back to 17.04 and install Gnome there if you want the Gnome experience.

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.

none of the workarounds or suggestions here work for me. It is an impossible task getting nvidia drivers to work even when only using XORG/ X11 services and NOT wayland. I will keep looking for answers...

Hmm. What I did was load into recovery mode which allowed me to install and
uninstall packages - there I uninstalled lightgdm and ran the suggested
dpkg-config command to setup gdm.

On Sat, Nov 4, 2017 at 4:11 PM Bernadette Addison <email address hidden>
wrote:

> none of the workarounds or suggestions here work for me. It is an
> impossible task getting nvidia drivers to work even when only using
> XORG/ X11 services and NOT wayland. I will keep looking for answers...
>
> --
> 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
>

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)

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
Marian Hello (marian-hello) wrote :

I had same problem when disabled integrated card in bios. Found issue report in gdm3 https://gitlab.gnome.org/GNOME/gdm/issues/332. Issue description has link back to launchpad https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1716857.

Workaround mentioned in both reports - to change line in gdm.service to ExecStartPre=/usr/bin/xinit /usr/share/gdm/generate-config works for me.

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

-black
+blank

Because on Ubuntu 19.10 it's purple. Still the same bug though.

summary: - Ubuntu boots to black screen when using Nvidia drivers (on a desktop
+ Ubuntu boots to blank screen when using Nvidia drivers (on a desktop
with an Intel GPU)
tags: added: eoan
removed: aardvark gnome-17.10
tags: removed: artful
Daniel van Vugt (vanvugt) wrote :

Comment #116 appears to be linking to the wrong bug. That link is for nvidia-drm.modeset=1 and this bug is specifically about when you don't have that set, like the default.

Daniel van Vugt (vanvugt) wrote :

Two years later...

I am reviewing this bug again today. I can confirm it's still in Ubuntu 19.10. And I can confirm that comment #19 was right. See comment #19.

summary: - Ubuntu boots to blank screen when using Nvidia drivers (on a desktop
- with an Intel GPU)
+ Ubuntu boots to blank screen when using Nvidia (on a desktop with an
+ unused Intel GPU)
description: updated
description: updated
Changed in gnome-shell (Ubuntu):
importance: High → Undecided
Changed in nvidia-graphics-drivers-375 (Ubuntu):
importance: High → Undecided
Changed in gdm3 (Ubuntu):
status: Confirmed → Triaged
Changed in gnome-shell:
status: Unknown → New
Changed in gdm3 (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
Changed in mutter (Ubuntu):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Daniel van Vugt (vanvugt)
Daniel van Vugt (vanvugt) wrote :
Changed in mutter (Ubuntu):
status: Triaged → In Progress
Changed in gdm3 (Ubuntu):
status: Triaged → Invalid
importance: High → Undecided
assignee: Daniel van Vugt (vanvugt) → nobody
Daniel van Vugt (vanvugt) wrote :

Oops. It appears upstream already fixed this bug. And we removed their fix in Ubuntu (revert_nvidia_wayland_blacklist.patch in gdm3). If you revert that revert then the bug is fixed.

Changed in gdm3 (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
status: Invalid → In Progress
importance: Undecided → High
Changed in mutter (Ubuntu):
status: In Progress → Won't Fix
Changed in mutter (Ubuntu):
status: Won't Fix → In Progress
description: updated
Changed in gnome-shell:
status: New → Fix Released
Daniel van Vugt (vanvugt) wrote :

Upstream is against changing mutter for this, so "Won't Fix" to mutter. But the fix for gdm3 has landed and that's enough to resolve the bug.

Changed in gdm3 (Ubuntu):
status: In Progress → Fix Committed
Changed in mutter (Ubuntu):
status: In Progress → Won't Fix
Daniel van Vugt (vanvugt) wrote :

Now in eoan proposed:

gdm3 (3.32.0-1ubuntu2) eoan; urgency=medium

  * Remove revert_nvidia_wayland_blacklist.patch because it was causing a
    much greater problem (LP: #1705369) than it was meant to solve (which
    doesn't seem to exist any more either).

 -- Daniel van Vugt <email address hidden> Wed, 19 Jun 2019 15:47:11 +0800

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdm3 - 3.32.0-1ubuntu2

---------------
gdm3 (3.32.0-1ubuntu2) eoan; urgency=medium

  * Remove revert_nvidia_wayland_blacklist.patch because it was causing a
    much greater problem (LP: #1705369) than it was meant to solve (which
    doesn't seem to exist any more either).

 -- Daniel van Vugt <email address hidden> Wed, 19 Jun 2019 15:47:11 +0800

Changed in gdm3 (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
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.