32

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

ICE
  • 2,065
  • 2
    Based on your investigation, it sounds like the problem isn't actually Ubuntu but the NVidia driver? I have to admit, after upgrading to 18.04, I've noticed a lag with the NVidia driver that did not exist with 17.10. I don't have a solution for you, but it's "good" to know I am not the only one. (Unlike you, I haven't tried another OS.) – Ray May 08 '18 at 01:07
  • Fedora 28 has much less lag on my system than Ubuntu 18.04 with the same GNOME. I blame that on Ubuntu Dock. I set that on auto hide and When I a have maximized window and the dock is hide and I click on activities It lags so bad. about Nvidia driver: I tried all Nvidia drivers on GNOME, Mate, Budgie and KDE 18.04. The only desktop that lags so much is GNOME. I want to stay on GNOME, because GTK applications are much more beautiful on GNOME but this lag is killing me :( – ICE May 08 '18 at 01:20
  • 2
    How did you install the 390 driver? The one from the official repositories is not complete and doesn't work properly. I have been sending people to this https://askubuntu.com/a/1030901/231142 as it has the way to install the newest NVIDIA drivers in Ubuntu 18.04 in the second half of the answer. – Terrance May 08 '18 at 02:26
  • @Terrance I installed it from official repository on Ubuntu 18.04 but on fedora downloaded it from Nvidia website and install it manually. also did it from RPM fusion. I'll do what you said on that answer and report it to you. – ICE May 08 '18 at 02:34
  • 2
    @ICE Sorry, I wasn't very clear. I'm actually using the latest NVidia drivers from NVidia and I'm using KDE. But both KDE and Gnome are much slower than they were back in 17.10. For now, I'm "putting up with it" until I have the time to try re-installing new drivers. Or maybe I'll have to wait until 18.04.1 is out before I panic. – Ray May 08 '18 at 04:04
  • @Terrance Installed Nvidia driver 396 (opnesource) from that repository. But it didn't help. lags more with that :( – ICE May 08 '18 at 13:02
  • 1
    Interesting. That is good to know. I don't use Unity or GNOME. Unfortunately I am using Xfce4 (Xubuntu) with the Compton compositor and I don't experience lag considering it is built around XOrg. To duplicate your issue I will have to find another drive and install the new GNOME 18.04 on it and test it out. I will see what I can find. – Terrance May 08 '18 at 13:12
  • @Terrance I think GNOME effects using CPU instead of GPU. Is it possible to use GPU instead of CPU for GNOME effects? – ICE May 08 '18 at 13:17
  • 1
    I'm not sure. It has been a while since I have used GNOME. Did you try maybe installing the CUDA toolkit that is in that answer I linked? It wouldn't hurt to try I would think. – Terrance May 08 '18 at 13:21
  • @Terrance Yes. I installed that first. – ICE May 08 '18 at 13:22
  • 3
    I've found nVidia a lot slower and 20 degrees hotter than Intel iGPU HD 530. – WinEunuuchs2Unix May 08 '18 at 17:53
  • @WinEunuuchs2Unix What are you comparing the Intel to? – Terrance May 08 '18 at 20:31
  • @Terrance nVidia GTX 970M with 3 or 4 GB of RAM. First Prop Drv 384 was OK, then 390 got worse, then Open Source Nouveau. Finally just gave up and stuck with the tried and true iGPU. – WinEunuuchs2Unix May 09 '18 at 00:52
  • @WinEunuuchs2Unix It's gotta be the DEs then. I have clean installed Xubuntu (Xfce4) on this system and it run smooth as can be. I gave up on GNOME and Unity and even KDE after the heavy issues I was having. I am actually running the 396.24 driver and I am getting no issues at all. This is on a GTX 760 and AMD Phenom X2 3.0Ghz system – Terrance May 09 '18 at 00:54
  • @Terrance You are probably right. My comment was only to point out its not worth all the grief trying and failing to setup nVidia properly if you have an iGPU that works perfectly fine and takes no effort. – WinEunuuchs2Unix May 09 '18 at 00:59
  • @WinEunuuchs2Unix Unless the board has a built on Intel video chipset, the i7 920 doesn't have an iGPU. Looked it up today at work. – Terrance May 09 '18 at 01:00
  • @Terrance Ha you got me there :) – WinEunuuchs2Unix May 09 '18 at 01:01
  • 2
  • @chaskes That solution didn't solve the problem. for duplication: my question is 8 days older than that question you mentioned here. shouldn't that question be duplicate of my question? – ICE May 18 '18 at 17:15
  • @chaskes and that question is about high CPU usage. I don't have that problem and I did't mentioned anything like that on my question xD – ICE May 18 '18 at 17:27
  • @ICE no, the questions with worse answers are marked duplicates of the questions with better answers, regardless of question age. It's used to help direct people to good answers rather than to the oldest question. – Chai T. Rex May 19 '18 at 08:04
  • @ChaiT.Rex that question is about another thing. I don't have CPU usage issue. I edited my question and you can see my CPU usage. – ICE May 19 '18 at 13:09
  • 1
    I havae the same issue, does nvidia-smi show just Xorg? It should also list gnome-shell. Try ubuntu-drivers autoinstall to rectify – Jonathan Jun 04 '18 at 23:26
  • @Jonathan added nvidia-smi result to the question. Tried ubuntu-drivers autoinstall before as I mentioned on my question. I don't know why but it's much better after updating Ubuntu about two weeks ago. Still lags, but not as bad as before. – ICE Jun 05 '18 at 01:43
  • What is this, a 10 year old cpu?. If so it's time has passed for use on current Ubuntu – doug Jun 05 '18 at 02:16
  • 1
    where it says Not Supported it should say gnome-shell -- at least it does on my box. But i'm using a GeForce 1050 ti w/ 390 driver – Jonathan Jun 05 '18 at 02:50
  • @Jonathan why I don't have it then? 390 driver lags more on mine. – ICE Jun 05 '18 at 05:20
  • @doug Yes. the CPU is from 2008. but it's not about the CPU as I mentioned on my question and comments. CPU usage never goes high. I've tried all Nvidia drivers on GNOME, Mate, Budgie and Kubuntu 18.04. The only desktop that lags so much is GNOME. even Budige was so smooth. – ICE Jun 05 '18 at 05:26
  • Have tried several solutions but no lucks. So now I decided to use the driver from X.Org X server instead. It works for now – Satjapong Meeklai Jul 30 '18 at 15:21
  • 2
    I can only confirm this. I get the smoothest GUI experience in bionic LTS if I use the Intel GPU .. For now there is some problem between Xorg and the Nvidia driver. – Nikolaj Hansen Dec 22 '18 at 14:13

10 Answers10

10

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.
Tio TROM
  • 663
  • 13
  • 28
3

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
Thomas Ward
  • 74,764
NickJHoran
  • 139
  • 3
  • 2
    This is not a solution for GNOME. Why we should install mate desktop on Ubuntu with GNOME when Ubuntu Mate exist? – ICE May 29 '18 at 23:27
  • 2
    I did this because I'd already installed a VM with standard Ubuntu / Gnome3 and did quite a bit of configuration. This is what I did to solve my problem because I didn't want to do another complete reinstall. – NickJHoran Jun 07 '18 at 08:46
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.

sunwarr10r
  • 1,419
  • In my experience, switching to Gnome Classic is the fastest, simplest and to my surprise - the most compatible solution. I have all the extensions running there, the window overview and the dash is there too – smido Jun 23 '19 at 12:33
2

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

Pablo Bianchi
  • 15,657
aqua
  • 21
1

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.

1

So I feel some of these answers are sub par. I've installed Ubuntu 16/18 on multiple machines at work at and at home and have experienced at times similar issues to what you are seeing.

First let's look at some potential problems.

If you have a NVIDIA graphics card and you're doing a minimal installation of Ubuntu 18.04.02, you will notice that NVIDIA drivers (as well as non-NVIDIA) drivers are being installed. This is part of the problem.

Normally how I deal with this issue is immediately at the login screen press CTRL+ALT+F3 to enter into a terminal and purge all drivers. However, this morning I was unable to do so for some odd reason.

My Solution

  1. Normally, when you have a NVIDIA graphics card your motherboard (in my case MSI) will disable the Intel Integrated Graphics. You want to enable this (optionally, disable your graphics card). Please see your motherboard's settings/documentation on how to do this.

  2. Shut the desktop down.

  3. If you have your HDMI cable (or whatever) plugged into your graphics card, remove this and plug it into your motherboard's HDMI port.

  4. Turn on your desktop.

  5. Your desktop should be starting up normally now. If it is not, then you know it is not a NVIDIA graphics driver related issue.

  6. If things are running smoothly, please go into Software & Updates > Additional Drivers and select whatever NVIDIA driver option you have. This is the easy way to install those NVIDIA drivers. The hard way is to manually download them from NVIDIA. As of this morning I installed nvidia-390 which was the default option I was given.

  7. After installation, restart your computer. If things are running smoothly, restart the computer once again, but this time go into your motherboard's BIOS.

  8. Re-enable your NVIDIA graphics card. Save settings and restart.

At this point, your desktop should be working normally as with the Intel Integrated Graphics. There's nothing tricky, no third party software (aside from NVIDIA) that needed to be installed. It's really that simple. However, depending on your hardware, the solution may have some variance.

Jon
  • 320
  • 1
    In my case I don't have any Intel GPU but If you want to get rid of Intel driver you don't need to disable and enable Intel GPU. After Installing Ubuntu just remove Intel graphics with sudo apt purge xserver-xorg-video-intel and then install Nvidia proprietary driver. – ICE Feb 24 '19 at 21:48
  • @ICE yeah, you don't want to delete drivers. Deleting the Intel drivers is unnecessary and may possibly create secondary problems. That wouldn't even solve the problem. The root of the problem lies in the NVIDIA drivers trying to be installed alongside the generic Nouveau drivers. My method simply disables the GPU from being the main source of display while you install the correct drivers. – Jon Feb 25 '19 at 05:59
0

AFAIK Gnome doesn't work on 18.04 nVidia.

I was able to get 144 FPS on Compiz on 18.04 + GSYNC. (I only got like, 40-60 fps on Gnome and no GSYNC) The first time I tried Compiz, it didn't work (I was on nVidia 396) I did sudo ubuntu-drivers autoinstall (which put me on 390) and I rebooted then used the little picker icon on login to choose Compiz and it worked great. So I think 396 doesn't work with compiz yet but 390 does. Oddly 390 on Gnome makes me physically nauseous with my monitor but it's fine on compiz, so i think 390 on Gnome has a lot of strange refresh rate / redraw issues.

(It may be a GSYNC thing but I did get a pixelated word "NORMAL" in the upper right, which I got rid of by turning OpengGL flipping off in nvidia-settings)

Pablo Bianchi
  • 15,657
Jonathan
  • 3,904
  • How did you set compiz as default window manager. I've installed compiz on Ubuntu 18.04 (with GNOME desktop). but I didn't get that compiz picker on the login. – ICE Jun 06 '18 at 04:06
  • @ICE I had to pick the option called Unity (default) listed after I clicked the little icon, it looks something like: https://i.stack.imgur.com/hDndL.jpg – Jonathan Jun 07 '18 at 14:58
  • 2
    Seems you are on Unity not GNOME. – ICE Jun 07 '18 at 17:12
  • 4
    Correct, I gave up on GNOME, but Unity is working way better – Jonathan Jun 12 '18 at 18:54
  • 1
    If you replaced the desktop with something else this isn't really a solution is it? – Nikolaj Hansen Dec 22 '18 at 14:17
0

Use the version for your graphic card, I have the same problem, don't use de autoinstall configuration. In your case this

sudo apt-get install nvidia-396

I had to search like this --> nvidia driver "your graphic card" linux

0

In my case, I removed Remmina Applet from Tweak -> Startup Applications and the problem was solved. Please, refer to: Is remmina an startup application in 16.04 for more details.

0

I solved my problem by going to https://www.nvidia.com/Download/index.aspx?lang=en-us
Downloading driver *run file for my graphics card, made it executable and ran it as root. Followed on-screen prompts and after reboot the Lag is gone!