The "Oh No! Something Has Gone Wrong" error disrupts access to the Ubuntu desktop environment, often after a system upgrade, display manager change, or desktop configuration tweak. This error typically appears as a white screen with a message indicating the system cannot recover, blocking normal login and desktop use. The issue frequently traces back to problems with the GNOME Display Manager (gdm3), broken or missing packages, or graphics driver misconfigurations.
Primary Solution: Repair Packages and Reinstall Desktop Environment
Step 1: Switch to a TTY Command Console. When the error screen appears, press Ctrl+Alt+F3
(or F2
, F4
, etc.) to access a terminal interface. Log in with your username and password. This step gives you direct access to the system for troubleshooting, bypassing the graphical login manager.
Step 2: Update Package Lists and Upgrade Installed Packages. Unfinished upgrades or broken dependencies often cause the error. Run:
sudo apt update
sudo apt upgrade
This updates the package lists and installs any pending upgrades. If the system was interrupted during an upgrade, this ensures all packages are brought up to date.
Step 3: Fix Broken or Unconfigured Packages. If you see errors about broken dependencies or incomplete installations, execute:
sudo dpkg --configure -a
sudo apt --fix-broken install
These commands attempt to finish any incomplete package configurations and resolve dependency issues that may block the desktop environment from loading.
Step 4: Reinstall the Ubuntu Desktop Environment and Display Manager. If GNOME or the desktop session itself is damaged, reinstall the core packages:
sudo apt purge ubuntu-session
sudo apt install ubuntu-desktop
The purge command removes the session package, and the install command brings back the entire desktop environment, including its dependencies. This approach directly addresses missing or corrupted files that prevent the desktop from starting.
Step 5: Reboot the System. Once the above steps complete without errors, restart your computer:
sudo reboot
After rebooting, the graphical login and desktop should load as expected. This sequence repairs most cases where the error is triggered by incomplete upgrades or desktop environment issues.
Alternative Methods and Additional Fixes
Switch Display Manager to LightDM
When gdm3 remains unresponsive after repairs, switching to an alternative display manager like LightDM can restore desktop access. From the TTY console, run:
sudo apt install lightdm
During installation, select lightdm
as the default display manager if prompted. After installation, reboot:
sudo reboot
If this resolves the issue, you can later switch back to gdm3 using:
sudo dpkg-reconfigure lightdm
This method is especially effective if the error started after trying to change login screen backgrounds or themes, as LightDM may be less affected by such configuration changes.
Repair Graphics Drivers and Xorg/Wayland Issues
Some occurrences of the error are caused by incompatible or broken graphics drivers, or by issues with Xorg or Wayland sessions. If you recently changed display settings, upgraded your system, or installed new hardware, consider:
- Updating or reinstalling proprietary graphics drivers (e.g., NVIDIA or AMD) using the vendor’s recommended installation method.
- Switching between Xorg and Wayland sessions at the login screen if one fails to load.
Reinstalling Xorg and related packages with:
sudo apt-get install --reinstall xorg ubuntu-desktop gnome-shell
For users experiencing cursor-related crashes or theme errors, resetting the cursor theme via:
sudo update-alternatives --set x-cursor-theme /usr/share/icons/Adwaita/cursor.theme
can resolve issues where GNOME Shell fails to start due to missing or incompatible cursor files.
Check and Repair File System or Disk Space
Corrupted file systems or full disks can also block the desktop environment. Boot into recovery mode by holding Shift
during startup to access the GRUB menu, then select "Advanced options for Ubuntu" and choose a recovery mode kernel. Use the "fsck" option to check and repair file system errors, and "clean" to free up disk space if necessary.
From a TTY, check available disk space with:
df -h
If the disk is full, remove unnecessary files or use sudo apt autoremove
to clear unused packages.
Reset User Configuration or Create a New User
Sometimes, the error is isolated to a single user’s configuration files. To test this, add a new user from the TTY:
sudo adduser testuser
Log in as the new user at the graphical login screen. If the desktop loads normally, the problem likely resides in the original user's configuration files. You can reset these by renaming or removing ~/.config
and ~/.cache
directories (after backing them up).
To reset the configuration:
mv ~/.config ~/.config.bak
mv ~/.cache ~/.cache.bak
Log out and try logging in again. This step reverts user-specific settings to defaults, which often resolves session startup failures caused by misconfigured extensions, themes, or GNOME settings.
Advanced Troubleshooting: Examine Logs and Recovery Mode
If the above steps do not resolve the error, investigate system logs for more details. From the TTY, review:
/var/log/syslog
/var/log/gdm3/
or/var/log/lightdm/
- Use
journalctl -xe
for real-time error messages.
Common log entries to look for include GNOME Shell crashes, missing theme files, or graphics driver errors. Address issues as indicated by the logs, such as reinstalling problematic packages or correcting configuration files.
As a last resort, boot from a live USB to recover files or perform a full system reinstall if critical system components are unrecoverable. Always back up important data before making major changes.
Resolving the "Oh No! Something Has Gone Wrong" error in Ubuntu typically involves repairing broken packages, reinstalling the desktop environment, or switching display managers. By following these targeted steps, you can restore desktop access and avoid a full reinstall in most cases.
Member discussion