How to Fix Screen Flickering Issue on Ubuntu?

Last Updated : 19 Sep, 2024

Ubuntu is used by people all around the world. Ubuntu is an open-source operating system(OS) that's free to use and is compatible with multiple devices, which include, Personal Computers(PCs), laptops, smartphones, tablets, servers, and the cloud. People use Ubuntu as a smooth Operating System and is widely regarded as a simple, low maintenance, light, development-driven environment, and support. Ubuntu is a Linux distribution that's derived from Debian and is mostly made up of free and open-source software. Oftentimes while using Ubuntu it can get buggy and a prominent screen flickering issue occurs. So in this article, we will learn.

How to Fix Screen Flickering Issue on Ubuntu

Screen flickering on Ubuntu can be caused by various issues such as display driver problems, incorrect refresh rates, or compatibility issues with the desktop environment.

Common troubleshooting steps to fix screen flickering on Ubuntu:

1. Check for System Updates

Outdated drivers or kernel issues could cause screen flickering. Updating the system can often resolve the issue.

Open a terminal and run the following commands to update the system:

sudo apt update
sudo apt upgrade
sudo reboot

2. Update or Reinstall Graphics Drivers

Installing or updating the correct drivers for your GPU may resolve the problem.

For Intel Graphics:

  • Intel graphics drivers are usually bundled with the kernel, so ensure your system is up-to-date.

For NVIDIA GPUs:

  • First, check if the proprietary NVIDIA drivers are installed:
ubuntu-drivers devices
  • If not installed, you can install the recommended driver using:
sudo ubuntu-drivers autoinstall
sudo reboot

For AMD GPUs:

AMD drivers are open-source and should be bundled with the system updates. If you're using a very recent GPU model, you might need to update to the latest version of the Mesa drivers:

sudo apt install mesa-utils
sudo reboot

3. Disable Hardware Acceleration

Hardware acceleration can sometimes cause screen flickering. You can try disabling it to see if it resolves the issue.

  • For Google Chrome or Chromium: Open Chrome settings, navigate to System and disable Use hardware acceleration when available.
  • For GNOME/Wayland Desktop: Some users report that disabling hardware acceleration for the GNOME desktop can help. Open the terminal and run:
gsettings set org.gnome.desktop.interface enable-animations false

4. Switch Between X11 and Wayland

Ubuntu allows you to switch between two display server protocols: X11 and Wayland. Screen flickering may be resolved by switching to the other protocol.

To switch:

  • Log out of your current session.
  • At the login screen, click on your username.
  • Before entering your password, click the gear icon in the lower-right corner.
  • Select Ubuntu (Xorg) to switch to X11 or Ubuntu on Wayland to switch to Wayland.

5. Adjust the Screen Refresh Rate

  • Incorrect refresh rates can cause screen flickering. Ensure your monitor is set to the correct refresh rate.
  • Open Settings > Displays.
  • Check the Refresh Rate option and make sure it matches your monitor's specifications (e.g., 60Hz or 144Hz).

6. Check Display Cable Connections

Loose or faulty display cables can cause screen flickering. Ensure that your monitor cables (HDMI, DisplayPort, etc.) are properly connected to both the monitor and the computer.

7. Disable Power Saving Features

Certain power-saving settings may cause screen flickering, especially on laptops.

For Intel GPUs: You can try adding a kernel boot parameter to disable power-saving modes.

  • Open a terminal and run:
sudo nano /etc/default/grub
  • Find the line that starts with GRUB_CMDLINE_LINUX_DEFAULT and add intel_idle.max_cstate=1 to it. Example:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_idle.max_cstate=1"
  • Save the file and update the GRUB configuration:
sudo update-grub
sudo reboot

8. Check Logs for Clues

If none of the above steps work, you may need to check system logs for more details.

  • Open a terminal and run:
dmesg | grep -i error

Look for any relevant error messages that may give insight into the issue.

  • Additionally, you can check the Xorg log file (if you're using X11):
cat /var/log/Xorg.0.log

9. Test with a Different Kernel Version

Sometimes newer kernels introduce regressions that could cause issues like screen flickering. You can try booting into an older kernel version to see if the problem persists.

  • Reboot your system and hold the Shift key to bring up the GRUB menu.
  • Select Advanced options for Ubuntu.
  • Choose a previous kernel version and see if the screen flickering persists.

10. Reset GNOME Settings

If the issue is specific to the GNOME desktop environment, resetting its settings to default may help.

  • Open a terminal and run:
dconf reset -f /org/gnome/
How-to-Fix-Screen-Flickering-Issue-on-Ubuntu
Fix Screen Flickering Issue on Ubuntu

Conclusion

By following the above methods your screen flickering issue on Ubuntu will be fixed. If none of these methods work, the issue may be hardware-related, or you might be dealing with a rare bug in Ubuntu or its graphics stack. Then go visit a hardware repair shop.

Comment