I had a similar issue with gdm3 when switched between operating system version, then I found this cool stuff for solving the problem
Solution .
For resolve this Problem :
1. Editing the Configuration file of gdm
1.vi /etc/gdm/custom.conf or nano or gedit (Any editor is fine)
2.You will find a line this line #WaylandEnable=false
3.Uncomment that line
4.Reboot
Whole Configuration file looks like this.
[daemon]
WaylandEnable=false
DefaultSession=gnome-xorg.desktop
[security]
[xdmcp]
[chooser]
[debug]
#Enable=true
2.Installing lubuntu-desktop
sudo apt install -y lubuntu-desktop
sudo reboot
3.Editing Grub
Step 1: Editing Grub
When you boot your system, just stop at the Grub screen like the one below. If you don’t see this screen, keep holding Shift key at the boot time.
At this screen, press ‘E’ key to go into the editing mode.
Edit Grub Menu to fix Ubuntu freezing at loginPress ‘E’ key
You should see some sort of code like the one below. You should focus on the line that starts with Linux.
Editing grub to fix frozen boot issue with Ubuntu LinuxGo to line starting with Linux
Step 2: Temporarily Modifying Linux kernel parameters in Grub
Remember, our problem is with the NVIDIA Graphics drivers. This incompatibility with open source version of NVIDIA drivers caused the issue so what we can do here is to disable these drivers.
Now, there are several ways you can try to disable these drivers. My favorite way is to disable all video/graphics card using nomodeset.
Just add the following text at the end of the line starting with Linux. You should be able to type normally. Just make sure that you are adding it at the end of the line.
nomodeset
Now your screen should look like this:
Disabling NVIDIA Open Source graphics driversDisable graphics drivers by adding nomodeset to the kernel
Press Ctrl+X or F10 to save and exit. Now you’ll boot with the newly modified kernel parameters here.
Explanation of what we did here (click to expand)
Step 3: Make permanent changes in Grub
Warning!
In some cases, not using the graphics driver at all or switching to the open source driver may result in poor looking resolution. If that’s the case with you, try switching to proprietary driver as explained in alternate step 3 (next section).
Don’t be too happy yet just because you are able to login to your system now. What you did was temporary and the next time you boot into your system, your system will still freeze because it will still try to load the graphics drivers.
Does this mean you’ll always have to edit Kernel from the grub screen? Thankfully, the answer is no.
What you can do here to change the grub configuration so that the Linux kernel will not try to load the graphics driver before the display server.
To do that, open the terminal (use Ctrl+Alt+T shortcut) and then use the following command to open the grub configuration file in Gedit editor:
sudo gedit /etc/default/grub
You’ll have to use your password to open this file. Once you have the text file opened, look for the line that contains: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash".
Change this line to: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
It should look something like this:
Edit Grub To Fix Ubuntu Boot FreezeEdit Grub To Fix Ubuntu Boot Freeze
Save the file and update grub so that changes are taken into effect. Use this command:
sudo update-grub
Once it is complete, reboot your system and it should not freeze anymore.
4.Changing Default Driver Manager
Try installing lightdm or reinstalling gdm3
sudo apt-get install lightdm
or Xfce 4
sudo apt-get install xubuntu-desktop.
try reinstall ubuntu desktop manager
sudo apt install --reinstall ubuntu-gnome-desktop
for reference: