5

The problem is that it suddenly hangs once the service gdm.service starts. I know this because I have set it to display the processes instead of the splash screen and the last thing that comes on the screen is gdm.service, after which the computer hangs.

I do not think the problem is with the graphic drivers. Adding nomodeset to GRUB does not help.

If I go into recovery mode and drop to root shell, it automatically hangs after a few seconds.

Also, for some reason I cannot mount /boot/efi on /dev/sda5.

I have set up dual-boot configuration with Ubuntu and Windows 10.

I get this problem every time I shut down my computer and start it again. Every time I just unplug the things and restart it works but in this situation, it doesn't.

If I use an older version of Ubuntu, I get everything started but the problem is that there is no Bluetooth or networking even though it is connected via Ethernet.

Also the original problem started because I started WiFi and had to restart my computer.

I cannot even ssh into my computer.

If somehow I can get to a tty it hangs there too. I can ssh before it hangs, but as soon as the computer hangs, I cannot execute any commands.

Could someone give me a temporary solution to this? I don't plan on ever shutting it down again. All my research is on the hard drive which is not backed up.

Nmath
  • 12,744
  • Your research must not be very valuable if you have no backups. I would encourage you to back it up now, in case your problem is hardware-based and you lose access to the data forever. You should be able to use an installation USB to boot a live session (Try Ubuntu). As long as your hardware works, you can use a live session even if your installed system is corrupted beyond repair. Pulling the plug without a proper shutdown is not wise-- you will just cause more and more problems. If you have been doing this repeatedly, my suggestion is to reinstall the OS - there are likely MANY problems. – Nmath Jan 16 '22 at 21:14
  • Well i have picked up on the habit of backing up my data, infact i have never backed up my data. is reinstalling the system the only way? is there anyway where i could keep all my data and apps. – Aakif Rehman Jan 16 '22 at 21:17
  • 1
    Reinstalling the system is an easy, guaranteed way to fix any and all problems that are not hardware based. It might be the only way, but we can't know this until we determine the cause of the problem. It's not immediately apparent what is causing your problems, and based on your narrative that you've been pulling the plug on a running system, it's very possible that you have more than one problem. If it were me, I'd reinstall, because you can guess how long that will take - or you could find yourself troubleshooting this issue indefinitely. – Nmath Jan 16 '22 at 21:22
  • As I mentioned, yes, you can boot a live session and back up your data. If you don't do backups you will some day lose your data permanently and irrevocably- it's a statistical certainty. Having your system crash is often a "wake up call" for many people that they need to start doing backups. Luckily it seems your system is in a state where you will still be able to recover data in a live session. – Nmath Jan 16 '22 at 21:26
  • oh alright, never thought of the fact that i could still access my data from a live live session. Thank you for saving a lot of my time as i would have spent wayy too much time trying to fix something that probably wont get fixed anytime soon. – Aakif Rehman Jan 16 '22 at 21:33
  • i don't know if this is n appropriate question for this is forum but could you please tell me if there is a more....uhm.. stable distro which doesn't shoot up all these weird problems. – Aakif Rehman Jan 16 '22 at 21:34
  • The reason I think you will probably have to reinstall is because your system hangs even when you drop to a root shell prompt in recovery. Since gdm seems to be our only clue, I don't think reinstalling that would be helpful either because gdm is not even loaded in a recovery root shell prompt, so it seems to be something "deeper". There's not much you can do if even a root shell prompt fails except to boot a live session and chroot into your installed system, but without knowing the problem, it probably won't be very productive. – Nmath Jan 16 '22 at 21:34
  • As far as your question about stable distros Ubuntu LTS releases are well regarded for their stability. If you have been using a standard release in the past, I would suggest that you use a LTS release. Standard releases have more cutting edge software and are considered more experimental than LTS releases. If you also get all your software from official repos and use the default flavor of Ubuntu Desktop with GNOME, it is considered one of the most stable (if not the most stable) desktop distributions out there. – Nmath Jan 16 '22 at 21:37
  • Thank you for your kind help, i will shift to ubuntu 20.04 LTS – Aakif Rehman Jan 16 '22 at 22:16

3 Answers3

22
  1. Go into recovery mode
  2. Open root shell prompt
  3. Type sudo apt purge gdm gdm3
  4. Resume to normal boot
  5. Login
  6. Type sudo apt install gdm3 ubuntu-desktop and sudo systemctl restart gdm
  7. Done
3

I got into a similar issue a few days ago and tried different solutions. Finally, running the following command in another TTY while booking solved my problem:

sudo apt install --reinstall ubuntu-desktop
0

You can install the package "lightdm" from recovery mode to use it instead of gdm.

If you need help accessing recovery mode there's an article on Ubuntu help: https://wiki.ubuntu.com/RecoveryMode

In recovery mode you can choose the option "root" and then you can enter commands. Navigate that menu with the arrow keys and enter.

Run "sudo apt install lightdm" and when it asks, choose "lightdm" as the default display manager.

Hope this helps! I had the same issue just now and fixed it this way :)