On Ubuntu 17.10 using Nvidia Quadro M2000, when the (external) screen stops consuming the DisplayPort data stream (either because the screen is turned off or a different input is chosen on the screen in order to view the desktop of another computer connected to the same screen), the graphical session is terminated, including all processes that were started from the graphical session.
This happens both with Nouveau (both Wayland and X) and with the Nvidia proprietary driver (
This didn't happen with Ubuntu 16.04 and doesn't happen with Windows or Mac.
Terminating the graphical session like this is, obviously, extremely undesirable.
How can I make Ubuntu 17.10 not terminate the graphical session when the screen stops consuming the DisplayPort data stream?