sodcalculator

10 Tech How-To

Fix Ubuntu Wi-Fi, Graphics & Boot Problems

Guide 10-58521 · Updated · Step by step

This guide walks you through resolving the most common Ubuntu issues after an update or fresh install: Wi-Fi not connecting, graphics glitches or black screens, and boot failures that leave you at a blinking cursor or a busybox prompt. You’ll fix these in a safe order, starting with boot recovery, then drivers, then Wi-Fi, so you don’t end up chasing a network problem when the system won’t start.

What You’ll Need

  • A working internet connection on another device (phone, another PC) to download drivers if needed.
  • A USB drive with the same Ubuntu version (or a live USB) for chroot recovery.
  • Basic comfort with the terminal and sudo commands.
  • Patience – some steps require rebooting multiple times.

Step-by-Step

Part 1: Recover from a Boot Loop or Black Screen

  1. Try a normal reboot first. Sometimes a one-time glitch clears itself. If you see the GRUB menu, select the default kernel and press E to edit the boot entry.
  2. Add nomodeset to the kernel line. Find the line starting with linux and add nomodeset at the end. Press Ctrl+X or F10 to boot. This disables the graphics driver and often gets you to a login screen if the issue is GPU-related.
  3. If you reach the desktop, make the fix permanent. Open a terminal and edit /etc/default/grub with sudo nano /etc/default/grub. Find the line GRUB_CMDLINE_LINUX_DEFAULT and add nomodeset inside the quotes. Save with Ctrl+O, exit with Ctrl+X, then run sudo update-grub.
  4. If you still get a black screen, boot from the live USB. Choose “Try Ubuntu” and open a terminal. Mount your root partition (usually /dev/sda2 or /dev/nvme0n1p2 – check with lsblk) to /mnt, then bind mount /dev, /proc, and /sys into /mnt.
  5. Chroot into your system: Run sudo chroot /mnt. Now you can run commands as if you were inside your installed Ubuntu.
  6. Reinstall or reconfigure the graphics driver. For NVIDIA, run sudo apt purge nvidia* then sudo apt install nvidia-driver-535 (or the recommended version for your GPU). For AMD/Intel, run sudo apt install --reinstall xserver-xorg-video-intel or mesa-utils.
  7. Update GRUB and initramfs: Run sudo update-grub and sudo update-initramfs -u inside the chroot. Exit with exit, unmount with sudo umount -R /mnt, and reboot.

Part 2: Fix Wi-Fi Not Connecting

  1. Identify your wireless card. Run lspci -nnk | grep -i net or lsusb to see the chipset. Common ones are Intel, Realtek, and Broadcom.
  2. Check if the driver is loaded. Run lspci -k and look for “Kernel driver in use”. If it says “Unknown” or nothing, the driver is missing.
  3. Install the correct driver. For Intel, usually iwlwifi is already present – try sudo apt install linux-firmware. For Realtek (like RTL8821CE), you may need to install rtl8821ce-dkms from the Ubuntu repository (if available) or build from source. For Broadcom, run sudo apt install b43-fwcutter firmware-b43-installer.
  4. If the driver is installed but Wi-Fi still won’t connect, check the network manager: Run nmcli radio wifi to see if it’s enabled. If it’s off, run nmcli radio wifi on.
  5. Restart the network service: Run sudo systemctl restart NetworkManager. Then try connecting again via the GUI or nmcli dev wifi connect "YourSSID" password "YourPassword".
  6. If you have a hardware switch or key combo (like Fn+F2), make sure it’s not turned off. Check with rfkill list – if the device is “hard blocked”, toggle the switch. If “soft blocked”, run rfkill unblock all.

Part 3: Fix Graphics Glitches, Screen Tearing, or Poor Performance

  1. Check which GPU is in use. Run glxinfo | grep "OpenGL renderer" (install mesa-utils if needed). If it shows “llvmpipe”, you’re using software rendering – the driver isn’t loaded.
  2. For NVIDIA, install the proprietary driver. Go to “Software & Updates” → “Additional Drivers” tab, select the recommended driver (e.g., “nvidia-driver-535”), and click “Apply Changes”. Reboot.
  3. For AMD, install the open-source driver. It’s usually preinstalled. If not, run sudo apt install mesa-vulkan-drivers and sudo apt install xserver-xorg-video-amdgpu.
  4. For Intel, install the i915 driver (usually built-in). If you see artifacts, try adding i915.enable_psr=0 to the kernel command line (same method as nomodeset) to fix panel self-refresh issues.
  5. If you’re on a laptop with hybrid graphics (NVIDIA Optimus), install nvidia-prime and use prime-select to switch between GPUs. Run sudo apt install nvidia-prime, then prime-select nvidia or prime-select intel.
  6. Test with a live session. If the problem only appears after installing drivers, you may have a conflict. Reboot to a live USB and see if the issue persists – if not, it’s driver-related.

Common Mistakes

  • Forgetting to run sudo update-grub after editing /etc/default/grub. Changes won’t take effect until you do.
  • Installing the wrong NVIDIA driver. Always use the “recommended” version from Additional Drivers, not the latest from the website (which may not be compatible with your kernel).
  • Using nomodeset permanently when you don’t need it. It disables hardware acceleration, so remove it once you’ve fixed the driver.
  • Mounting the wrong partition in chroot. Double-check with lsblk – your root is the one with / in the mountpoint column.
  • Not backing up your data before purging drivers. sudo apt purge nvidia* can remove packages that depend on it – always backup your important files first.

Tips

  • Keep a live USB handy. It’s your best friend for recovery – you can always boot from it and chroot to fix your system.
  • Use the LTS kernel. If you’re on a newer hardware enablement (HWE) kernel and have issues, try booting an older kernel from the GRUB “Advanced options” menu.
  • Check the Ubuntu forums and Ask Ubuntu for your specific hardware model – often there’s a known fix or a PPA that works better.
  • Write down what you change. Keep a text file or notes on your phone with the exact commands you ran, so you can undo them if needed.
  • Use journalctl to diagnose boot issues. After a failed boot, run journalctl -b -1 -e to see the last messages before the crash.

Troubleshooting

  • Still stuck at a black screen after nomodeset? Try adding acpi=off or noacpi to the kernel line – some laptops have ACPI issues that cause black screens.
  • Wi-Fi works but disconnects randomly? Try disabling power management: sudo iwconfig wlan0 power off (replace wlan0 with your interface name). To make it permanent, add the command to /etc/rc.local or a systemd service.
  • Graphics driver install fails with “Unable to locate package”? Run sudo apt update first. If it still fails, you may need to add the graphics-drivers PPA: sudo add-apt-repository ppa:graphics-drivers/ppa.
  • Chroot gives “failed to run command /bin/bash: No such file or directory”? You mounted the wrong partition. Check with lsblk and remount the correct one.
  • After purging NVIDIA, the system boots to a terminal login but not the desktop. Install the ubuntu-desktop meta-package: sudo apt install ubuntu-desktop.
  • Wi-Fi still not working after driver install? Some Realtek chips need the dkms package to build the module against your kernel. Install dkms and reinstall the driver.

Frequently Asked Questions

Will this erase my data?

No – these steps only modify system files and drivers. Your personal files in /home are untouched. However, always back up before purging packages, just in case.

How do I know which graphics driver I need?

Run lspci -nnk | grep -A 3 VGA to see your GPU model. Then check “Software & Updates” → “Additional Drivers” – it will list the recommended driver for your hardware.

Can I use nomodeset permanently?

Technically yes, but it disables hardware acceleration, making the desktop sluggish and breaking video playback. Use it only to boot into recovery, then fix the actual driver.

Why does my Wi-Fi work on Windows but not Ubuntu?

Windows has proprietary drivers preinstalled. Ubuntu relies on open-source drivers that may not support your chipset out of the box. Installing the firmware or driver package usually solves it.

What is chroot and is it safe?

Chroot lets you run commands inside your installed system from a live USB. It’s safe if you mount the correct partitions and don’t delete anything you’re unsure about.

How do I revert changes if something breaks?

If you have a Timeshift snapshot, restore it. Otherwise, boot into recovery mode (from GRUB) and use the “root” option to run apt undo (not a standard command) – better to reinstall the removed packages with apt install.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →