Common ways to fix video driver (and related) issues in Linux Ubuntu

7 minute read

…in case you are experiencing any of these issues:

  1. black screen, computer won’t wake up, can’t log in after the screen locks, can’t log in after suspend
  2. multiple monitors won’t work, external monitor won’t work, computer won’t detect external monitor; external monitor glitches
  3. screen brightness buttons won’t work, can’t adjust screen brightness
  4. mouse scroll wheel is slow, can’t adjust mouse scroll wheel speed, imwheel won’t work, xdotool won’t work, Python pynput can’t detect mouse scroll wheel in certain applications, Shutter snipping tool won’t work, “show desktop” icon doesn’t work

This is knowledge I’ve acquired via hundreds of hours of troubleshooting over the last 5+ years of using Linux Ubuntu for 12+ hours per day, both at work and home, on my computers, and on my kids’ computers.

If you have any of the problems above, try these things:

  1. Check the BIOS/UEFI settings. Use “Discrete Graphics” instead of “Hybrid Graphics”.
  2. Use the latest LTS (Long-Term Support) version of Ubuntu, rather than a short-term support version.
  3. Install the latest non-open-source NVIDIA driver (in Ubuntu’s “Software & Updates” app) which works with external monitors and your brightness keys.
  4. Use the X11 window manager, NOT Wayland
  5. Use a USB-C to DP (Display Port) [best], or USB-C to HDMI [ok] video cable, rather than a USB-C to USB-C cable to your monitor.
  6. Try restarting the computer and then configuring the displays with nothing else running.
  7. Try a variety of USB-C video adapters, or DisplayLink adapters.

Additional details:

  1. Check the BIOS/UEFI settings.
    1. In particular if you have an NVIDIA graphics card:

      Boot into your BIOS/UEFI and Ensure you have “Discrete Graphics” selected instead of “Hybrid Graphics”.

      NVIDIA graphics drivers aren’t [always] compatible with “Hybrid Graphics”, which uses your internal graphics card built into your CPU, as well.

      (From my answer here).

    2. See my answers:

      1. Ask Ubuntu: Another black screen after Nvidia driver installing
      2. Ask Ubuntu: My laptop can only use an external monitor after manually installing NVIDIA driver from manufacturer in Ubuntu 22.04
      3. How to find an NVIDIA driver which works with your brightness function buttons
  2. Use the latest LTS (Long-Term Support) version of Ubuntu (ex: Ubuntu 20.04, 22.04, etc.), rather than the short-term support versions like Ubuntu 21.04, 23.04, etc.).
    1. You may not want to explore into the short-term support versions, as they aren’t as well-supported.
  3. Install the latest non-open-source NVIDIA driver that 1) comes with Ubuntu and is available in your “Software & Updates” app, 2) works with an external monitor, and 3) still allows your brightness buttons to work.
    1. See this question here: Ask Ubuntu: Installed Ubuntu 22.04 and I experience frequent freezes and crashes (when using NVIDIA graphics card)
      1. And this answer to it:

        Turns out that the open source GPU driver for my NVIDIA graphics card was the issue. Switching to the proprietary one fixed it.

      2. And my answer to it.
    2. The fix is to go to Ubuntu’s “Software & Updates” app –> “Additional Drivers” tab. Then, try the latest non-open-source video driver, one at a time, until you find one which works with an external monitor and doesn’t stop your screen brightness buttons from working. Sometimes, the latest NVIDIA driver introduces bugs, so it’s not always the latest one you should use. Also, the list of drivers in this menu is NOT in order, so pay attention to them.

      In this screenshot, I have labelled the drivers from 1 through 7, in the order that I would try the drivers, or with an “x” to indicate “open kernel” or “Nouveau…open source” drivers which I wouldn’t use unless nothing else worked. In other words, I’d try the latest driver, which I labelled “1”, first, and if it had problems, I’d then try “2”, then “3”, etc, on down the list, stopping on and keeping the first one that works. In this case, I stopped on “3” because it worked with external monitors and didn’t mess up my brightness buttons. I don’t really know what the “server” versions of the drivers do, and I didn’t try them when I had first made this screenshot, but I’ve numbered them this time and would give them a shot too next time I have this issue.

  4. Use the X11 window manager, NOT Wayland
    1. See my answer here: Wayland window manager causes my computer to stay on a black/blank screen and not wake up

      I present 3 fixes there.

      Wayland is the new window manager, replacing X11 eventually, and it has a bunch of problems still. As far as I know, Ubuntu 22.04 is the first LTS Linux Ubuntu version to have Wayland turned on by default. I wanted to use it, but it just has too many issues. See the top of my answer above for what some of those issues are, and see my answer there for how to turn off Wayland.

      In short, log out [of Ubuntu], click your name, click the gear in the bottom-right, choose the non-Wayland window manager option.

  5. Use a USB-C to DP (Display Port) [best], or USB-C to HDMI [ok] video cable, rather than a USB-C to USB-C cable to your monitor.

    USB-C to USB-C video/monitor cables may be trying to provide power into your laptop (to charge your laptop) at the same time as they are providing a video signal out of your laptop, to the monitor. This new double-feature seems to have problems on other OSs (like Windows) too, not just on Linux. So, disabling this “charge while displaying” type feature can help.

    There are frequently two ways to disable it:

    1. Via a setting in the BIOS, or
    2. By using a cable that doesn’t support charging at the same time. Ex: a USB-C to DP (Display Port) or USB-C to HDMI cable.
      1. Of those two types of cables, I’d choose USB-C to DP if given the option, because the older versions of HDMI cannot support 4k signals at 60 Hz, but DP can. See my answer here: Ask Ubuntu: No 60Hz Refresh Rate option on my 32” 4k external monitor in Ubuntu 20.04.

That’s it! I suspect one of the above things will fix it for you.

Going further

I’m trying to future-proof myself for the day I do have to use Wayland, by preparing to replace Shutter (for screenshots), imwheel (to fix my mouse scroll speed), and xdotool (for my “show desktop” button, and automating keypresses like Super + D).

Here are some links or tools I need to be aware of:

  1. My question: How can I write a program to press keys, such as Windows + D, in Wayland? (replace xdotool in Wayland)
  2. Equivalent to xdotool for Wayland
  3. My question: pynput library not working as expected in Python to press Windows + D key
  4. How to detect key presses? [in Python]
  5. ydotool
    1. https://github.com/ReimuNotMoe/ydotool
    2. See also a couple of the links above.
  6. pygame
  7. pyautogui
  8. pywinauto - is working on Linux support too, even though it started with Windows I think
    1. https://pywinauto.readthedocs.io/en/latest/code/pywinauto.keyboard.html
  9. pynput
    1. https://pynput.readthedocs.io/en/latest/keyboard.html
    2. My issue I opened: pynput detects mouse scroll wheel movements only partially in the Wayland window manager in Linux, but fully in X11
  10. My instructions to add a “Show Desktop” icon to your launcher
  11. My instructions to speed up your mouse scroll wheel speed

Leave a comment

Comments are powered by Utterances. A free GitHub account is required. Comments are moderated. Be respectful. No swearing or inflammatory language. No spam.
I reserve the right to delete any inappropriate comments. All comments for all pages can be viewed and searched online here.

To edit or delete your comment: Option 1 (recommended): click the date just above your comment, ex: the just now or 5 minutes ago (or equivalent) part where it says YOUR_NAME commented just now or YOUR_NAME commented 5 minutes ago, etc., or Option 2: click the "Comments" link at the top of the comments section below where it says how many comments have been left. Option 1 will take you directly to your comment on GitHub. Option 2 will take you to a GitHub page with all comments for this page. Then: --> find your comment on this GitHub page and click the 3 dots in the top-right of your comment --> click "Edit" or "Delete". Editing or adding a comment from the GitHub page also gives you a nicer editor.