Jul 24, 2021
That wasn't needed. You could have just done ctrl-alt-f7 to get to the console, edit the ~/.profile file again and remove the xrandr lines.
The problem here is that the ~/.profile is executed too early and x session has not started yet, resulting in system hangup when the xrandr commands are run.
A proper place to add the xrandr commands is described here: https://askubuntu.com/a/678301/445715