Thanks for your answer @Adrian. I went back to the linux-signed-image-generic-hwe-16.04 package, which has kernel 4.8.0.52.23 inside. Haven't had any issues like this with that kernel since my bug-report here.
With the 4.8 kernel I have other issues with my surface pro 3 related to wifi: #1690332 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1688587 Title: NMI watchdog: BUG: soft lockup - CPU#1 stuck for 22s! [khugepaged:38] To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-meta-hwe-edge/+bug/1688587/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs