Disclaimer: We may earn a commission when you purchase products linked throughout our site.

Recover a Frozen Ubuntu Desktop Without Rebooting

Recover a Frozen Ubuntu Desktop Without Rebooting

Recover a frozen Ubuntu desktop from a text console, inspect logs, and restart only the affected graphical session when needed.

Start by finding out whether Ubuntu is still responding. If one application has frozen but the panel and other windows work, close that app normally or through System Monitor. If the desktop is unresponsive, try a text console and inspect the affected session before restarting anything. Ending a session or restarting its display manager can lose all unsaved graphical work, including programs running in graphical terminals.

Get to a text console and identify what stopped responding

On many Ubuntu desktops, try Ctrl+Alt+F3 from the computer’s keyboard. The available console and return keys depend on the setup. Sign in at the text prompt, then list sessions and examine the current boot journal.

loginctl list-sessions
journalctl -b -p warning --no-pager -n 80
systemctl status display-manager --no-pager

Check the local graphical session by ID with loginctl show-session ID -p Name -p Type -p Remote -p State. Verify that it belongs to the intended user. The text login you just started will have a different session ID. Your text console’s environment variables cannot identify the frozen desktop. The systemd loginctl manual describes session inspection and termination.

If the TTY works but no graphical session appears, focus on display manager startup. If a graphical session remains active, note whether the freeze occurred when opening one app, resuming from sleep, or connecting a monitor. This narrows the first log to inspect.

Recover one application or one display first

Where the desktop responds, use a normal close before forcing the app to exit. For a docking problem, test a single known working display and restore the original layout before ending the session. The display manager and Wayland compositor have different responsibilities. Killing the compositor can terminate the graphical session and every client attached to it. Start with checking whether you use Wayland or Xorg when legacy X reset instructions appear to be relevant.

End just the failed local session

If you can still sign out normally, save work and use that route. If the session cannot recover, use the ID you checked earlier. Before proceeding, confirm that you accept losing unsaved graphical work in that session.

loginctl terminate-session ID

Replace ID with the exact target from loginctl list-sessions. Use administrator privileges only if needed and permitted for that session. This ends the session as a whole. After login, reopen one application and attempt the original failing action before restoring all windows. A control that kills an X server, such as an enabled Ctrl+Alt+Backspace shortcut, is relevant only in applicable X11 configurations and also ends graphical work.

Restart the display manager only if the greeter has failed

Check whether other users are logged in. Restarting the manager can close their graphical sessions too. Save work wherever possible and warn other logged-in users before running this command from the text console.

sudo systemctl restart display-manager
systemctl status display-manager --no-pager

If the greeter appears, sign in once and verify the display and session type. If it fails to return, check the status and journal for the actual manager rather than repeatedly restarting it. A login loop can also come from exhausted disk space or a failed graphics module. Check df -h / and journalctl -k -b before changing session files or reinstalling drivers.

Use remote access if it was already configured

SSH can provide a diagnostic shell when the keyboard or display does not. Verify the host and intended graphical session before any termination. Keep the remote shell open to inspect the result. If SSH and local text consoles both fail, use your normal machine recovery procedure. A reboot discards transient evidence and can lose work, so capture what is available first.

Keep evidence for the next login

Record the Ubuntu release, session, graphics hardware and time of failure. Save relevant portions of the journal before testing a driver change. When logs persist, journalctl -b -1 can show the previous boot after a required restart. If the problem follows an update and repeats at login, compare the kernel and loaded module with the last working boot. Repeat the smallest action that caused the freeze, then stop once you can distinguish a repeatable app fault from a broader display or system problem.

A freeze on resume is easier to investigate if you can compare the same lid, dock and monitor sequence. Save the system journal before unplugging a device that might disappear from the logs or reconnect under a different name. If the desktop is responsive via the keyboard but a pointer or one output is stuck, keep the session and test the peripheral separately. A repeatable failure in one configuration gives a more useful report than a list of changes made during recovery.