Ubuntu login screen never appears when using the Nvidia driver (and setting WaylandEnable=false fixes it)

Bug #1798790 reported by Efthimios Chaskaris on 2018-10-19
228
This bug affects 45 people
Affects Status Importance Assigned to Milestone
gdm3 (Ubuntu)
High
Unassigned
mutter (Ubuntu)
High
Unassigned

Bug Description

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

---

The boot process hangs with the last message being "started bpfilter". There is unusual Network activity during that time. The light of the WiFi adapter is blinking a lot.

I am not sure the problem is with the gdm3 package. As a matter of fact, I would remove it and let someone more experienced to set it. I'm afraid I might break something, though.

The specific steps or actions you took that caused you to encounter the problem: 1. Boot Ubuntu 18.10 with the Nvidia proprietary drivers
installed.

The behavior you expected: I expected Ubuntu 18.10 to boot normally.

The behavior you actually encountered: The computer gets stuck in a command-like environment with the last message being "started bpfilter". You can't type any commands.

I have found that uninstalling the Nvidia proprietary drivers by going into recovery mode fixes the issue.

Booting with the earlier kernel doesn't fix the issue. Installing the earlier v.340 driver also doesn't fix the issue.

This (https://askubuntu.com/questions/1032639/ubuntu-18-04-stuck-in-boot-after-starting-gnome-display-manager-on-intel-graphic) seems relevant. This is where I found the "solution".

affects: xorg-server (Ubuntu) → gdm3 (Ubuntu)
description: updated
summary: - Ubuntu 18.10 hangs at "started bpfilter"
+ Ubuntu 18.10 hangs at "started bpfilter" - "Started Gnome Desktop
+ Manager" during boot
description: updated

Same issue. Going to recovery mode and then restarting seems to have solved it for now.

Launchpad Janitor (janitor) wrote :

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

Changed in gdm3 (Ubuntu):
status: New → Confirmed

Simply going into recovery mode and then restarting didn't fix it for me. Continuing into normal boot also didn't fix the issue.

description: updated
description: updated
Jason Fox (kb3lms) wrote :

As mentioned in the above askubuntu posting, removing the nvidia driver got me past the problem.

description: updated
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately, we cannot work on this bug because your description didn't include enough information. You may find it helpful to read "How to report bugs effectively" http://www.chiark.greenend.org.uk/~sgtatham/bugs.html. We'd be grateful if you would then provide a more complete description of the problem.

We have instructions on debugging some types of problems at http://wiki.ubuntu.com/DebuggingProcedures.

At a minimum, we need:
1. The specific steps or actions you took that caused you to encounter the problem.
2. The behavior you expected.
3. The behavior you actually encountered (in as much detail as possible).
Thanks!

Changed in gdm3 (Ubuntu):
importance: Undecided → Low
status: Confirmed → Incomplete

Can the importance also be higher? Gaming is impossible with the Nouveau drivers. Thank you. I might provide a video reproducing the problem later as well.

description: updated
description: updated
description: updated
Changed in gdm3 (Ubuntu):
importance: Low → High
Sebastien Bacher (seb128) wrote :

Sorry but I don't understand the description, ""Started bpfilter" is located just under "Started Gnome Desktop Manager"." what does that mean? Where is that displayed? Why is it an issue to have "Started bpfilter" displayed under "Started Gnome Desktop Manager"?

Daniel van Vugt (vanvugt) wrote :

Sounds like the real issue is that the login screen is not appearing.

Please run these commands and attach the output files from each:

  1. lspci -k > lspcik.txt
  2. dpkg -l > dpkgl.txt
  3. dmesg > dmesg.txt
  4. journalctl -b > journal.txt

Changed in mutter (Ubuntu):
status: New → Incomplete

These commands were run in a normal boot of Ubuntu, without the Nvidia drivers.

@seb128 I'm just trying to explain where the two messages are in relation to each other in this command-like environment you are stuck in. Having one line before the other is not an issue.

Oops, sorry. That is the log from when it was working. We need a log from when it is broken, so please...

1. Reinstall the Nvidia driver to reproduce the problem.

2. After you have reproduced the problem and the machine fails to boot, force a reboot and enter recovery mode.

3. Run this command to collect the log from the previous (failed) boot:

  journalctl -b-1 > prev_boot.txt

and send that to us.

tags: added: cosmic nouveau
summary: - Ubuntu 18.10 hangs at "started bpfilter" - "Started Gnome Desktop
- Manager" during boot
+ [nouveau] Ubuntu 18.10 hangs at "started bpfilter" - "Started Gnome
+ Desktop Manager" during boot
Sebastien Bacher (seb128) wrote :

@Efthimios, well, your description still doesn't make sense, it should start with a statement of the problem, like "after installating the nvidia driver my computer doesn't reach the login screen but is stucked on a screen with those messages" if that's what is happening?

""Started bpfilter" is located just under "Started Gnome Desktop Manager" doesn't state what the problem is in any understandable way...

summary: - [nouveau] Ubuntu 18.10 hangs at "started bpfilter" - "Started Gnome
- Desktop Manager" during boot
+ Ubuntu 18.10 login screen never appears when using the Nvidia driver

@seb128 Sorry, I will remove it.

description: updated
description: updated
description: updated
Daniel van Vugt (vanvugt) wrote :

Thanks. I think I can see the problem now.

The first thing that happens is that gdm3 tries to start a Wayland login screen ('gnome-shell' process) and fails because the Nvidia driver doesn't support KMS:

Oct 23 11:59:14 efthimios-GA-78LMT-USB3 gnome-shell[1688]: meta_kms_resources_init failed: Calling drmModeGetResources() failed, assuming we have no outputs
Oct 23 11:59:14 efthimios-GA-78LMT-USB3 gnome-shell[1688]: Failed to create backend: No GPUs with outputs found

That is not a bug. What it should do next (and does on my machine) is then try again to start the login screen using X instead. However I can't see that in your log. You might have something odd installed or preventing the fallback from working.

Please:

1. Report the bug to the gdm developers here:

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

   and then tell us the new bug ID.

2. Try this as a workaround: edit /etc/gdm3/custom.conf and uncomment the line:

   #WaylandEnable=false

The bug ID is 435.

The workaround worked.

description: updated
Changed in gdm3 (Ubuntu):
status: Incomplete → New
Changed in mutter (Ubuntu):
status: Incomplete → New
Launchpad Janitor (janitor) wrote :

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

Changed in gdm3 (Ubuntu):
status: New → Confirmed
Changed in mutter (Ubuntu):
status: New → Confirmed
Nikola Chikos (lostpin) wrote :

Just to say that I've tested the '#WaylandEnable=false' method (I was having the same problem with the nVidia drivers) and it works great!

Edit the file /etc/gdm3/custom.conf it also worked for me.
If someone had tried installing lighdm you can go back to gdm by doing
sudo service lightdm stop
sudo reboot

tags: added: nvidia
removed: nouveau
Changed in mutter (Ubuntu):
importance: Undecided → High
Mateusz Mikuła (mati865) wrote :

Another workaround is adding `nvidia-drm.modeset=1` to the kernel command line.

Adam Niedling (krychek) wrote :

I'm having the same issue. The login screen appears after I press ctrl+alt+f2 and then ctrl+alt+f1.

Matheus Reich (matheusr98) wrote :

The following workaround worked for me, no problems now (140.107 - Ubuntu 18.10):

2. Try this as a workaround: edit /etc/gdm3/custom.conf and uncomment the line:

   #WaylandEnable=false

Daniel van Vugt (vanvugt) wrote :

The same workaround seems to be working for bug 1796614. Although that is about nouveau and this is about the proprietary Nvidia driver. Not sure if we can or should merge them.

Cripton (cripton) wrote :

The same workaround of commenting Wayland worked for me, also, before reading this, i got it to work doing this procedure:

1 choose recovery mode
2 enable network
3 continue normal boot

The other workaround works better, but maybe this help to find the solution.

rtimai (rtimai) wrote :

GDM3 fails to start, stalled at 'started bpfilter' on my HP laptop (model hp15-ay016nr) which runs Intel graphics, no nVidia hardware or drivers. So, this is not strictly an nVidia issue, which began after a Sat 8 December upgrade.

Booting previous kernels did not fix the problem. Disabling Wayland in /etc/gdm3/custom.conf also had no effect.

I'm having a terrible time gathering system information because I can only log in to Gnome Shell as a Live Session User from the Ubuntu 18.10 Live Install USB drive -- or as root in Recovery Mode -- which results in limited access to user files and info on the installed system. Attempting to view many directories gets Access Denied You Don't Have Permissions. I even have trouble viewing my backup folders on my external USB drive, and I'm afraid I may lose access to them if I revert to 18.04 LTS, or install an alternate distro to replace the current Ubuntu 18.10. I'm not familiar with recent file system security "enhancements," but I think there have been changes with unanticipated consequences.

I'm posting this as a temporary Live Session User off a Cosmic installation USB drive. None of my online account info is saved, and I have to search my pword/unname each time I visit any web site, it's a huge pain.
I have been hampered in researching this, but I have seen the same symptoms reported by Arch Linux users as well.

BTW, Cripton's tip above to enable networking did allow me to run 'apt update' in recovery mode to confirm no pending upgrades (so, no fixes pending.) But, unfortunately Resuming a normal boot did not result in gdm3 successfully starting for me.

rtimai (rtimai) wrote :

SOLVED (MAYBE)

For me, it's not nVidia, it's not WaylandEnable. It may be the "Started bpfilter" message, which I earlier thought was nothing. I don't know beans about this, but I checked, and bpfilter is a recent replacement for iptables in many Linux distros, and it's handled in the linux kernel. Casting about for perhaps an alternate to gnome display manager 3, I found that SLiM had high user ratings, and one of the suggested advantages was it didn't require systemd (the system startup daemon, which historically has had a running conflict with kernel developers, maybe bpfilter.) On the gamble that this bootup hang might be caused by a kernel-systemd conflict, I enabled networking in recovery mode and ran 'apt install slim' to install alternate display manager SLiM. the installation prompted me to choose SLiM or GDM as the default, I chose SLiM, and was able to boot Cosmic finally. If I run into any issues further on, I'll post here.

If you already have an alternate display manager installed, you can switch with "sudo dpkg-reconfigure gdm" and select the alt dm.

Anyway, this might be a last, desperate workaround for the "bpfilter hang," if all the other solutions didn't work for you.

rtimai (rtimai) wrote :

I forgot to include introductory links to this complicated issue. My crude understanding is that systemd handles system initialization, calling bpfilter (replacing iptables) which is handled by the linux kernel.

https://thenewstack.io/systemd-vs-linux-kernel/

https://www.linux.com/news/why-kernel-community-replacing-iptables-bpf

SLiM, btw, while it works, is Debian-branded. I'm still trying to figure out how to remove the amateurish Debian swirl background.

Daniel van Vugt (vanvugt) wrote :

Please don't comment on this bug unless the workaround in comment #19 works for you. If it doesn't work for you then you need to log a new bug of your own.

summary: Ubuntu 18.10 login screen never appears when using the Nvidia driver
+ (and setting WaylandEnable=false fixes it)

Daniel, sorry, you're right, I'm not describing a problem on an nVidia-based system. Will open a new bug.

summary: - Ubuntu 18.10 login screen never appears when using the Nvidia driver
- (and setting WaylandEnable=false fixes it)
+ Ubuntu login screen never appears when using the Nvidia driver (and
+ setting WaylandEnable=false fixes it)
BavarianPH (bavarianph) wrote :

Wayland is not fully functional or compatible with Ubuntu 18.10 yet.
So why use wayland in a full new distribution, and cause problems?
It wasted 8 hours of my time to find the solution.
Just because of 1 line in a gdm3 conf file.
1 wrong line in a config line, and Ubuntu fails.
Ubuntu needs essential conf and system protection, so that 1 little change cannot derail the entire
OS, or deleting or installing cannot remove essential files necessary to run the OS.
After this many years Ubuntu is still incredibly easy to break.
Essential, necessary configs and system files that run the basic OS should be read only!

This is not a problem of Wayland or Ubuntu but of Gnome and the Nvidia driver.
In fact Fedora 29 has the same problem, only it has to come out a month later they deactivate the proprietary driver and force to use Noveau.

ROODE (saaeed-es20) wrote :

The uncommenting this line doesn't work for me:
#WaylandEnable=false

Daniel van Vugt (vanvugt) wrote :

Then you are commenting on the wrong bug. Please open a new one instead.

Ian Warren (ausbunny) wrote :

Uncommenting this line worked for me. This bug occurred after a fresh install of 18.10.

VINCENT FONG (vwpfong) wrote :

I also have the same problem.

The uncommenting this line doesn't work for me:
#WaylandEnable=false

so I reinstalled the whole distro and wiped the harddisk.

Daniel van Vugt (vanvugt) wrote :

Vincent, you are commenting on the wrong bug. Please open a new one instead.

tags: added: disco
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers