The following bug manifests on all versions of Ubuntu, starting with Ubuntu 14.04.6 LTS, Ubuntu 16.04.6 LTS, Ubuntu 18.04.3 LTS, Ubuntu 19.04 (Disco Dingo) and Ubuntu 19.10 (Eoan Ermine).
How it starts
After an update to the latest version, either through:
apt-get update
apt-get upgrade
apt-get dist-upgrade
How it manifests
The system will hang permanently at boot time, no matter how many times we reboot the OS, with the last message being Starting bpfilter and with the Gnome Display Manager failing to start. The operating system will not respond to any keyboard input, and the only way to get out of this is to power down the computer.
This issue can be caused by multiple factors and can be solved in many ways, depending on the issue that has caused it.
We need to understand that this issue is not caused by bpfilter or has anything related to it, just that the “Starting bpfilter” message is the last output on the screen before it crashes.
How to fix:
We need to reboot the system into Recovery Mode in order to fix it. You can do that by pressing either the Shift key or ESC key repeatedly right after reboot, but before the Ubuntu logo is shown. This will open a menu with three options and we select the second one, which is Advanced options for Ubuntu, on the next page we select <Enable Networking>, and on the last page, we select <Drop to Shell Prompt>.
If your system connects through Wi-Fi or needs some configuration profile that is on the OS, just select <Drop to Shell Prompt> without enabling the network. The only way that the network will work in recovery mode is through DCHP and cable connection.
Fix number 1
If your system has an Nvidia video card, try to remove the Nvidia proprietary drivers with the following command:
sudo apt-get remove --purge nvidia-*
Fix number 2
Edit the file /etc/gdm3/custom.conf and uncomment the line:
#WaylandEnable=false
Fix number 3
This requires an internet connection in the recovery mode or having the package on a CD which is inserted into the system.
apt-get update
apt-get install slim
This will install slim. Now we need to change the display manager:
dpkg-reconfigure gdm3
Now select slim and restart now. This will not actually fix the issue, but it will allow you to boot into the OS with a new display manager.
Alternatively, you can also use lightdm instead of slim:
apt-get install lightdm
dpkg-reconfigure gdm3
Fix number 4
Sometimes this issue is caused by the Gnome Tweaks tool, so we need to install an alternative display manager as shown on fix number 3, login into the system, disable Gnome Tweaks, and then issue the following command:
dpkg-reconfigure gdm3
Select gdm3 and once again reboot the system.
Conclusion
After each of these fixes, we need to reboot the system and log in normally to see if it worked.
We recommend taking this list chronologically, starting with step 1(if your system doesn’t have an Nvidia GPU, skip directly to step 2) as most people will have their issue fixed by either step number 1 or 2 and do not need to proceed in changing their desktop manager.