I have a Sony Vaio (2012) SVS13a with a full docking station which the notebook clips into. I run Debian Testing and have the latest updates installed as of writing this question.
When I have the notebook in the docking station and I suspend, most of the time when I un-suspend my windows manager crashes and I'm faced with the login screen (lightdm) again. I've tried different windows managers (XFCE4 & EXWM) and the same thing happens in both.
When the issue happens the Windows Manager doesn't crash straight away, I'm presented with a black screen then when I change over to VT1 and back to VT7, then it crashes and I'm redirected to the lightdm screen.
I find this in my dmesg after;
[180410.346999] [drm:intel_display_resume [i915]] *ERROR* Restoring old state failed with -22
It didn't used to happen, although I've always had some issues in the docking station. Sometimes the external screen wouldn't come on, but it would never crash. It's only been like this in the last few months.
If I run the external screen, keyboard & mouse directly not using the docking station then I can suspend and un-suspend without a problem. I did this for two weeks over the summer break. So the problem is definitely to do with the docking station.