---
title: Prepare for when Ubuntu freezes
description: I routinely have at least 20 tabs open in Chrome, 10 files open in Atom
  (my editor of choice) and I’m often running virtual machines as well. This means
  my poor little X1 Carbon often runs out of memory, at which point Ubuntu completely
  freezes up, preventing me from doing anything at all. Just a  […]
url: https://canonical.com/blog/prepare-for-when-ubuntu-freezes
---

1. [Blog](https://canonical.com/blog)
2. Article

---

[Robin Winslow](https://canonical.com/blog/author/nottrobin "More about Robin Winslow")

28 September 2015

# Prepare for when Ubuntu freezes

[Design](https://canonical.com/blog/tag/design)

---

Share the article

I routinely have at least 20 tabs open in Chrome, 10 files open in [Atom](https://atom.io/ "Atom: A hackable text editor") (my editor of choice) and I’m often running virtual machines as well. This means my poor little [X1 Carbon](http://shop.lenovo.com/gb/en/laptops/thinkpad/x-series/x1-carbon/ "Thinkpad X1 Carbon") often runs out of memory, at which point Ubuntu completely freezes up, preventing me from doing anything at all.

Just a few days ago I had written a long post which I lost completely when my system froze, because Atom [doesn’t yet](https://github.com/atom/atom/issues/4161 "Feature Request: add crash restore") recover documents after crashes.

If this sounds at all familiar to you, **I now have a solution**! (Although it didn’t save me in this case because it needs to be enabled first – see below.)

## oom\_kill

The [magic SysRq key](https://en.wikipedia.org/wiki/Magic_SysRq_key "Wikipedia: Magic SysRq key") can run a bunch of kernel-level commands. One of these commands is called `oom_kill`. OOM stands for “Out of memory”, so `oom_kill` will kill the process taking up the most memory, to free some up. In most cases this should unfreeze [Ubuntu](http://www.ubuntu.com/ "Ubuntu").

You can run `oom_kill` from the keyboard with the following shortcut:

Except that this is disabled by default on Ubuntu:

## Enabling SysRq functions For [security reasons](https://bugs.launchpad.net/ubuntu/+source/linux/+bug/194676 "SysRq should be limited by default like openSUSE"), SysRq keyboard functions are disabled by default. To [enable them](http://askubuntu.com/questions/11002/alt-sysrq-reisub-doesnt-reboot-my-laptop/11194#11194 "Stack Overflow: Alt + sysrq + REISUB doesn't reboot my laptop"), change the value in the file `/etc/sysctl.d/10-magic-sysrq.conf` to `1`: And to enable the new config run: SysRq shortcut for the Thinkpad X1 Most laptops don’t have a physical `SysRq` key. Instead they offer a keyboard combination to emulate the key. On my Thinkpad, this is `fn + s`. However, there’s a quirk that the `SysRq` key is only “pressed” when you release. So to run `oom_kill` on a Thinkpad, after enabling it, do the following: * Press and hold `alt` * To emulate `SysRq`, press `fn` and `s` keys together, then release them (keep holding `alt`) * Press `f` This will kill the most expensive process (usually the browser tab running `inbox.google.com` in my case), and freeup some memory. Now, if your computer ever freezes up, you can just do this, and hopefully fix it. (Also posted [on robinwinslow.uk](https://robinwinslow.uk/2015/09/26/prepare-for-ubuntu-freezing/))

[Get in touch

Interested in running Ubuntu in your organization?](https://ubuntu.com/about/contact-us/form)

## Sign up for our newsletter

Get the latest Canonical news and updates in your inbox.

Work email:

\*I agree to receive information about Canonical's
products and services.

In submitting this form, I confirm that I have read and agree to
[Canonical's Privacy Notice](https://canonical.com/legal/data-privacy/contact)
and [Privacy Policy](https://canonical.com/legal/data-privacy).

Sign up

## Share on

---

## Related posts

[### From documentation to design thinking: lessons from Canonical’s Design Academy](https://canonical.com/blog/from-documentation-to-design-thinking-lessons-from-canonicals-design-academy)

Technical Authors at Canonical design experiences: they organize complex information, guide users through unfamiliar systems, and translate technical detail into something...

[Miguel Divo](https://canonical.com/blog/author/mdivo)

18 November 2026

[### Designing a better future: your guide to design contribution in Open Source](https://canonical.com/blog/designing-a-better-future-your-guide-to-design-contribution-in-open-source)

This guide covers why design matters in open source, and how designers can make a bigger impact in open source software.

[Leia Ruffini](https://canonical.com/blog/author/leiaru)

3 November 2026

[### From personas to archetypes: a living, shared understanding of the people we build for (Part 2 of 2)](https://canonical.com/blog/from-personas-to-archetypes-part-2)

This is the second of two posts on our archetypes, shared, machine-readable descriptions of the people we build for. The first covers why we needed them and what they are. This...

[Peter B. Polgár](https://canonical.com/blog/author/polgarp)

23 October 2026

[### From personas to archetypes: a living, shared understanding of the people we build for (Part 1 of 2)](https://canonical.com/blog/from-personas-to-archetypes)

Personas are easy to create but often ignored. This is the first of two posts about how we developed archetypes to keep our personas fresh at Canonical. These are shared,...

[Peter B. Polgár](https://canonical.com/blog/author/polgarp)

19 October 2026
