Primary display turns off after sleep
There are two displays connected to the motherboard:
Primary display connected to VGA, secondary to DVI-D.
When displays go to sleep (after 5 minutes of idle time), I wake the system and only the secondary display wakes up and becomes PRIMARY while the actual primary display doesn't turn on at all.
I can fix it by changing settings back manually, but after 5 minutes of idle the issue repeats.
Debian GNU/Linux 9 (stretch) 64-bit, GNOME version 3.22.2