I did some more testing with upstream kernel. The upstream kernel similarly has the occasional freeze where the entire desktop stops responding or updating (while the hardware mouse cursor is usually still movable but clicking doesn't do anything), however unlike the Ubuntu 17.04 kernel it always recovers immediately after 1-3 seconds and responds again. Ubuntu's kernel just gets stuck for me forever - one time I waited over a minute to see if something would wake up again, but the image just remained frozen forever and that's it.
I did some more testing with upstream kernel. The upstream kernel similarly has the occasional freeze where the entire desktop stops responding or updating (while the hardware mouse cursor is usually still movable but clicking doesn't do anything), however unlike the Ubuntu 17.04 kernel it always recovers immediately after 1-3 seconds and responds again. Ubuntu's kernel just gets stuck for me forever - one time I waited over a minute to see if something would wake up again, but the image just remained frozen forever and that's it.