GNOME lags so bad on Ubuntu 18.04

54,342

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

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 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

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.

Share:
54,342

Related videos on Youtube

ICE
Author by

ICE

Updated on September 18, 2022

Comments

  • ICE
    ICE over 1 year

    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

    • Admin
      Admin almost 6 years
      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.)
    • Admin
      Admin almost 6 years
      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 :(
    • Admin
      Admin almost 6 years
      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 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.
    • Admin
      Admin almost 6 years
      @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.
    • Admin
      Admin almost 6 years
      @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.
    • Admin
      Admin almost 6 years
      @Terrance Installed Nvidia driver 396 (opnesource) from that repository. But it didn't help. lags more with that :(
    • Admin
      Admin almost 6 years
      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.
    • Admin
      Admin almost 6 years
      @Terrance I think GNOME effects using CPU instead of GPU. Is it possible to use GPU instead of CPU for GNOME effects?
    • Admin
      Admin almost 6 years
      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.
    • Admin
      Admin almost 6 years
      @Terrance Yes. I installed that first.
    • Admin
      Admin almost 6 years
      I've found nVidia a lot slower and 20 degrees hotter than Intel iGPU HD 530.
    • Admin
      Admin almost 6 years
      @WinEunuuchs2Unix What are you comparing the Intel to?
    • Admin
      Admin almost 6 years
      @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.
    • Admin
      Admin almost 6 years
      @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
    • Admin
      Admin almost 6 years
      @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.
    • Admin
      Admin almost 6 years
      @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.
    • Admin
      Admin almost 6 years
      @Terrance Ha you got me there :)
    • Admin
      Admin almost 6 years
    • Admin
      Admin almost 6 years
      @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?
    • Admin
      Admin almost 6 years
      @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
    • Admin
      Admin almost 6 years
      @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.
    • Admin
      Admin almost 6 years
      @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.
    • Admin
      Admin almost 6 years
      I havae the same issue, does nvidia-smi show just Xorg? It should also list gnome-shell. Try ubuntu-drivers autoinstall to rectify
    • Admin
      Admin almost 6 years
      @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.
    • Admin
      Admin almost 6 years
      What is this, a 10 year old cpu?. If so it's time has passed for use on current Ubuntu
    • Admin
      Admin almost 6 years
      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
    • Admin
      Admin almost 6 years
      @Jonathan why I don't have it then? 390 driver lags more on mine.
    • Admin
      Admin almost 6 years
      @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.
    • Admin
      Admin almost 6 years
      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
    • Admin
      Admin over 5 years
      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.
  • ICE
    ICE almost 6 years
    This is not a solution for GNOME. Why we should install mate desktop on Ubuntu with GNOME when Ubuntu Mate exist?
  • ICE
    ICE almost 6 years
    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.
  • NickJHoran
    NickJHoran almost 6 years
    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.
  • Jonathan
    Jonathan almost 6 years
    @ICE I had to pick the option called Unity (default) listed after I clicked the little icon, it looks something like: i.stack.imgur.com/hDndL.jpg
  • ICE
    ICE almost 6 years
    Seems you are on Unity not GNOME.
  • Jonathan
    Jonathan almost 6 years
    Correct, I gave up on GNOME, but Unity is working way better
  • Kennet Celeste
    Kennet Celeste over 5 years
    Sorry, what is 960?
  • Tio TROM
    Tio TROM over 5 years
    The Nvidia driver version
  • Nikolaj Hansen
    Nikolaj Hansen over 5 years
    If you replaced the desktop with something else this isn't really a solution is it?
  • Pablo Bianchi
    Pablo Bianchi over 5 years
    Very useful related command: ubuntu-drivers (but already tried by who asks).
  • ICE
    ICE about 5 years
    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.
  • Jon
    Jon about 5 years
    @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.
  • fireb86
    fireb86 almost 5 years
    system-monitor in my case
  • smido
    smido almost 5 years
    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 👍
  • Gea-Suan Lin
    Gea-Suan Lin over 4 years
    Cool, just disabled system-monitor (installed by apt install gnome-shell-extension-system-monitor) and became extremely fast...
  • ben
    ben over 4 years
    moved back to xorg and my mouse can now move smoothly!