Ubuntu 20.04 crashes when unplugging HDMI

My Ubuntu system crashes whenever I disconnect a second monitor: the laptop screen turns black, all I can do is a hard reboot. It used to happen once in a while with 18.04, but now I've updated to 20.04 and it seems to always happen.

$ sudo lshw -class display
  *-display                 
       description: VGA compatible controller
       produit: UHD Graphics 620
       fabricant: Intel Corporation
       identifiant matériel: 2
       information bus: pci@0000:00:02.0
       version: 07
       bits: 64 bits
       horloge: 33MHz
       fonctionnalités: pciexpress msi pm vga_controller bus_master cap_list rom
       configuration : driver=i915 latency=0
       ressources : irq:139 mémoire:ee000000-eeffffff mémoire:d0000000-dfffffff portE/S:f000(taille=64) mémoire:c0000-dffff

It may or may not be related: the system also crashes more often than not when it goes to different power saving modes (which I've learnt to avoid by now)... If there's a solution for both problems together that'd be welcome :)

Edit: ctrl+alt+F1..F7 keys and sysrq keys do nothing (maybe I missed one, if there's one that should absolutely work in all contexts, let me know). On the positive side, the crash does not happen when I'm playing music through rhythmbox. If it's any use, the song that was playing when I tried was "Come" by Jain (at this point I've just abandoned all assumptions of possible causality).

Re-edit: even after rebooting I don't get the crash anymore, and turning on rhythmbox was the only difference it seems... so it's kind of problem solved, thank you Jain, but maybe I'm just back to "random crashes" as before.


i had same problems as you. My scenario:

  • Two monitors.
  • If the laptop suspends, black screen and never return to desktop. But fans works, and keyboard lights too. Only works a hard reset.
  • No Ctrl+Alt+F(whatever) works!!
  • If i unplugged the second hmdi, same result: black screen.
  • The pc still working, because i can access by ssh session.
  • Intel 620 as graphics card.

The solution i have found, it's use wayland, and not XOrg. All working, with my screens, but some other problems with electron apps (like Teams).

Still i'm working in find a better solution.


I had exactly the same symptoms (desktop frozen when disconnected from monitors, but keyboard lights and ssh to it still worked), but likely a different root cause. Nevertheless, I'm sharing my outcome here.

I have a Dell XPS 9500 running Ubuntu 20.04 with NVIDIA driver 470.82. My setup was the laptop connected to a docking station (inconsequential, I think) and the docking station connected to two monitors - one with HDMI and the second with a DisplayPort cable. I had the DisplayLink drivers installed. Emphasis on had. I ended up uninstalling the DisplayLink driver and instead connecting the second monitor with HDMI. I haven't had this problem since.

DisplayLink seems to have acknowledged some issues with Ubuntu freezing, although it doesn't sound like exactly the same situation. https://support.displaylink.com/knowledgebase/articles/641668-known-issues-with-displaylink-ubuntu-support

There may be workarounds, but I didn't have time for that, so I just uninstalled the DisplayLink driver.

I guess this likely wasn't your cause, as you only mention HDMI, but hopefully this helps someone out.