GNOME lags so bad on Ubuntu 18.04

After I installed fresh Ubuntu 18.04 with GNOME desktop and It had opensource driver I experienced very bad lag.

I Installed Nvidia 390 Driver and the lag was so bad. Changing the driver to Nvidia 340.106 didn't help.

I thought this is about Ubuntu 18.04, so I installed Fedora 28. on Wayland everything was smooth with open source driver but after Installing the 390 driver and switch to X11 lag started (but not as bad as Ubuntu).

I installed GNOME Impatience extension to reduce the lag but it didn't help that much.

I also tried Ubuntu Mate 18.04 with COMPIZ. On Mate, I had much more heavier Effects but those effects were so smooth.

Another Ubuntu 18.04 that I've tried was Budige that is based on the same GNOME. It didn't have any lag at all.

Also installed Nvidia 396 (opensource) from "ppa:graphics-drivers/ppa" repository. It just lags more.

Edit:

Installing sudo ubuntu-drivers autoinstall didn't solve the problem. It just install Nvidia 390 driver which I tried before as I mentioned.

I don't have any high CPU usage issue:

CPU Uage

nvidia-smi result:

+------------------------------------------------------+                       
| NVIDIA-SMI 340.106    Driver Version: 340.106        |                       
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 660 Ti  Off  | 0000:03:00.0     N/A |                  N/A |
| 10%   32C    P8    N/A /  N/A |    273MiB /  2047MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Compute processes:                                               GPU Memory |
|  GPU       PID  Process name                                     Usage      |
|=============================================================================|
|    0            Not Supported                                               |
+-----------------------------------------------------------------------------+

My System

  • CPU: Intel i7 920
  • GPU: Nvidia Geforce 660 ti
  • RAM: 6GB

Is there anyway that I can solve this lag?

Screencast


Solution 1:

Same happened to me. Make sure:

  1. You have less to no Gnome extensions. They can kill your computer. So, disable all Gnome extensions to see if that helps.
  2. Disable animations from Gnome Tweak. That made my desktop super fast.
  3. Nvidia 396 is really laggy for me as well so use the 960 one.

Solution 2:

I stopped using Gnome 3 on Ubuntu 18.04 and replaced it with the Mate desktop using the lightdm display manager.

To replicate:

sudo apt install tasksel
sudo apt update
sudo tasksel install ubuntu-mate-desktop
sudo dpkg-reconfigure lightdm
sudo shutdown -r now

Solution 3:

Unfortunately Gnome on 18.04 is really slow, even with the newest hardware (e.g. Dell XPS 13). If you wanna have a good experience on the LTS without switching to 18.10, the solutions are:

  1. Using unity. You can choose it before logging in with your user.

  2. Waiting until 18.04.2 update. Some patches of Gnome should be backported to LTS. We only can hope, that it will be the ones which make Gnome 3.30 faster.

Solution 4:

I was experiencing a lot of lag on the splash screen with 18.04 and wanted to put this here as another solution. In my case I had been using an open source graphics card driver (Nouveau) instead of the Nvidia proprietary and it looks to have been the cause of the issue.

  1. Go to Ubuntu Software app.
  2. Open Software & Updates from the app's dropdown in the task bar.
  3. Go to the Additional Drivers tab and see if you aren't using the recommended driver for your graphics card.

screenshot

Once I switched from the Nouveau display driver to the Nvidia driver metapackage 390, everything ran much more smoothly.

Source

Solution 5:

The issue seems to be caused by Wayland as described here and here. You can try to access /etc/gdm3/custom.conf ( or /etc/gdm/custom.conf for older versions ) and uncomment WaylandEnable=false. It worked for me.

The problem usually start when you update Nvidia driver up to version 390 or above. It is possible that the fallback to Xorg stopped working in latest versions, and then GDM uses Wayland to manage the display instead.