Resolve the black screen caused by running sudo gdm3 by killing orphaned processes and restarting the GDM3 service via systemctl.