Random temporary screen lags since upgrade to 18.04

NOTE: After some time, the problem has returned. I am currently in the process of backing up home folder for reinstall of Ubuntu. I am leaving this answer for reference, however I have unaccepted it as it didn't permanently solve my issue.


The fix to my problem was a rather lengthy process. The final fix looks, in a nutshell, like this:

  1. Re-add Drivers PPA -> Update -> Upgrade
  2. Use Generic Kernel
  3. Purge and Reinstall Graphics Drivers (just in case)
  4. Configure the Card
  5. Nuke local Chrome .config and Reinstall or (preferably) Switch to Firefox

Each action offers a slight improvement in performance culminating into a wonderfully performing system. The complete fix is as follows.

1. Proprietary GPU Driver PPA Disabled on Upgrade

First re-enable the graphics drivers ppa, and update drivers:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt upgrade && sudo apt dist-upgrade

2. Use Generic Kernel When Low Latency is Not Required

I do audio production and so was using the low-latency kernel. It seems this kernel would give priority to audio and would allow the rest of the system to hang to keep audio in time.

I installed the generic kernel:

sudo apt install linux-generic

To use this kernel hold shift at boot and select advanced options and boot into generic kernel.

3. Purge and Reinstall Drivers

Tried upgrading to driver 396 using Software & Updates. After reboot, I could not start X. It wouldn't start automatically and the command startx makes the screen flicker then brings me back to the command line. (your mileage may vary)

Users in comments suggested I should purge and reinstall drivers, so I figured this was the perfect time to do so. So purged everything out:

sudo apt purge "*-nvidia-*"
sudo apt autoremove && sudo apt autoclean

Reboot and reinstall driver 390 (or 396 if it works for you) via Software & Updates and reboot.

4. NVidia Card Requires Non Default Configuration

After doing all the purging and reinstalling, its time to fiddle with nvidia-settings.

sudo nvidia-settings

In the X Screen 0 and GPU 0 configurations, here are my tweaks that finalized the fix:

X Screen 0 Settings Menu

  1. Under the "X Server Video Settings" tab, I changed the setting from "auto" to select my monitor directly:

    NVIDIA X Server Settings

    This for some reason seemed to be the setting that finally fixed it. But read on for the rest of my configuration.

  2. I favored some quality over performance in "OpenGL Settings" as doing the opposite didn't have any effect (not sure if this actually did anything though):

    OpenGL Settings

  3. And finally for this menu, my Antialiasing settings look like this:

    Antialiasing Settings

GPU 0-(GeForce GPU) Menu

Under powermizer settings, I changed powermizer settings from Auto to Prefer Maximum performance. This setting does not hold after reboot, but now it seems to default to Adaptive instead of Auto.

Powermizer Settings

It seems that as a general rule, any setting that has an "auto" setting should be set to something specific when possible.

5. Fix Chrome or (preferably) Switch to Firefox

After all the above everything worked perfectly (movies, Steam, games, etc) except for when I was playing YouTube videos in Google Chrome.

Using Firefox instead I am no longer having any issues.

It is possible to fix Chrome to make it work better, but it's not perfect like using Firefox is. To fix chrome:

Rename config folder:

mv ~/.config/google-chrome ~/.config/google-chrome.bak

Purge Chrome:

sudo apt purge google-chrome-stable
sudo apt autoremove && sudo apt autoclean

You will now need to use Firefox to download Chrome from Google and install it. When you run Chrome it will be like for the first time and need to be configured.

Although this seems to fix Chrome, I notice that my system still has an occasional hiccup if and only if Chrome is running. This does not happen when using Firefox.


I had a problem with similar symptoms, on ubuntu-cinnamon-remix 21.04, Dell Precision 7710. Not sure if it's the same root cause.

I found some things closer to the root cause:

TL;DR: Ultimately the workaround/fix is setting /etc/UPower/UPower.conf IgnoreLid=true

It has to do with the lid state (closed/open) causing the system to query monitors every 30 seconds.

  • cinnamon/ubuntu 21.04 installed on Dell laptop precision 7710
  • both nouveau and nvidia drivers reproduce this.
  • The problem reproduces depending on combinations of the following:
    • lid power settings (e.g. lid state does not cause suspend nor external/internal monitor reconfigurations)
    • the current state of the lid (closed/open)
    • external monitor/s connected

Symptoms:

  • Every 30 seconds the display freezes for 500-3000 millisecs (length seems to depend on connected monitor and xrandr mode).
  • The mouse can move during the freeze. And everything else like audio and any running processes seem to proceed without problems.
  • Xorg.log has the following log every 30 sec
    [1360.782] (II) modeset(0): EDID vendor "DEL", prod id 16854
    [1360.782] (II) modeset(0): Using hsync ranges from config file
    [1360.782] (II) modeset(0): Using vrefresh ranges from config file
    [1360.782] (II) modeset(0): Printing DDC gathered Modelines:
    [1360.782] (II) modeset(0): Modeline "3840x2160"x0.0  594.00  3840 4016 4104 4400  2160 2168 2178 2250 +hsync +vsync (135.0 kHz eP)
    [1360.782] (II) modeset(0): Modeline "2560x1440"x0.0  ...
    
  • syslog might have the following log every 30 seconds (with nouveau without runpm=0)
    kernel: [ 3351.079896] nouveau 0000:01:00.0: Enabling HDA controller
    

I'll try to report this bug at cinnamon or ubuntu, I'm not sure what layer is at fault.