System freeze on wake-up w/ Thunderbolt

If a 5k monitor is connected to the Thunderbolt port of Thinkpad X1 Carbon, and the laptop suspends after a timeout, then a wake-up will do nothing, creating the impression that the system has frozen. The only solution is a hard reboot.

  • Verify that this happens only if audio is plugged to the back of the LG Ultrafine 5k monitor.
  • Gather last boot logs, and look for bug reports

Workaround

Prevent idle suspend, or delay it.

  services.logind.extraConfig = ''
    HandlePowerKey=suspend
    IdleAction=suspend
    IdleActionSec=40m
  '';

On GNOME, you will have to disable the naughty GDM behaviour by configuring systemd.