I am running Fedora 27 (problem also relates to Fedora 25) and it is very often that when I upgrade my kernel (via a "dnf update") the NVIDIA graphics driver will not work anymore. After reboot (target is level 5) the system gets stuck in a perpetual loop of trying to restart a failed xserver.
Typically, the upgrade of system and kernel will be successful, I will then reboot and the system will boot OK up until the point where it says "starting GNOME" where it will try to spawn the xserver, it will fail (because of NVIDIA driver most likely needs upgrading or plain re-compiling too) and stupidly attempt to restart the xserver for about a million times with milliseconds in between.
At this time the system becomes unusable because of the xserver loop and I am also afraid the monitor may blow up too. DoS via Stupidity? Or electronic headbanging?
I can see the command line login prompt but I can not login (so as to kill the re-start attempts or set init to 3) because the system is in a constant loop and it misses keystrokes from the keyboard when I type my password etc. The options at that stage is either to login remotely or to reboot with older kernel, then download latest NVIDIA driver, install and reboot.
QUESTION: how can I limit the million attempts to restart a failed xserver to just 1 or 2?
Please don't tell me how to init 3 and re-install NVIDIA. I know that. I want to know how to get from that loop of death if I forget to init 3 after kernel upgrades. Thanks.
(crossposted on LinuxQuestions.org and https://forums.fedoraforum.org/showthread.php?318110-Fedora-27-how-to-limit-xserver-restart-attempts&s=e3a81ad1989fba1547a6fe0905433a9a a week ago with no meaningful results.)