I'm using Ubuntu 16.04 and after some time (I guess this started to happen after I updated Nvidia drivers) my computers began to boot very slowly. I tried to deactivate some unneeded services but it didn't help. I ran dmesg and I noticed some really large gaps. Here is the full log: https://pastebin.com/d4EVfi8r

I hope someone will help me with this.


systemd-analyze blame | head

2min 16.363s docker.service 23.442s rabbitmq-server.service 16.774s grub-common.service 15.149s postgresql@9.5-main.service 13.691s dev-sda1.device 11.113s NetworkManager-wait-online.service 9.852s ModemManager.service 9.278s accounts-daemon.service 8.372s iio-sensor-proxy.service 8.176s apparmor.service

lspci -k | grep -iEA3 '3D|VGA'

00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
    Subsystem: Acer Incorporated [ALI] 3rd Gen Core processor Graphics Controller
    Kernel driver in use: i915
    Kernel modules: i915
01:00.0 3D controller: NVIDIA Corporation GK208M [GeForce GT 740M] (rev a1)
    Subsystem: Acer Incorporated [ALI] GK208M [GeForce GT 740M]
    Kernel driver in use: nvidia
    Kernel modules: nvidiafb, nouveau, nvidia_375_drm, nvidia_375


After disabling some services, this is what systemd-analyze blame | head returns:

 13.900s dev-sda1.device
 12.040s NetworkManager-wait-online.service
 10.572s ModemManager.service
  9.424s accounts-daemon.service
  8.030s apparmor.service
  7.827s grub-common.service
  7.356s systemd-logind.service
  6.810s rsyslog.service
  6.769s avahi-daemon.service
  6.766s bluetooth.service


Output of /var/log/boot.log



From Grub to login screen it takes around 30 seconds, but from login screen until my computer is ready to use it takes around a minute.

  • 1
    Could you add the output of systemd-analyze blame | head and lspci -k | grep -iEA3 '3D|VGA' please? – Byte Commander May 16 '17 at 8:52
  • @ByteCommander I edited my question with these command outputs – Alen May 16 '17 at 10:29
  • Now I disabled docker, rabbitmq and postgresql services, but boot time is the same – Alen May 16 '17 at 12:02
  • And what does systemd-analyze blame | head say now with these services disabled? – Byte Commander May 16 '17 at 12:19
  • @ByteCommander It's updated – Alen May 16 '17 at 13:42

There are three main ways (and probably a lot more than three ways total) to install nvidia drivers.

  1. binary driver (with apt install, my favorite way)
  2. the "Additional Drivers" app (great, pretty reliable, just not the best selection of drivers, sometimes way out of date)
  3. Nvidia-distributed latest compiles in .run format

you'd think the files installed and the result would be the same but it's not.

Nvidia's very own .run file is pretty dubious if you ask me. I used to think it would be the most bleeding edge but it turns out it pales in comparison to the apt method in terms of performance. sure the driver version is the latest but perhaps it's windows-only code edits and of no particular benefit to how it runs on linux.

I'd recommend uninstalling your current nvidia driver :

  • if you did it via the .run in a sessionless console mode (ctl-alt-F6) then repeat the procedure and run the (admin) command as if you were going to install it but add the --uninstall flag at the end of you install/sh command.
  • if you did it via the "Additional Driver" app then open that up again and simply tick the X.org driver apply and restart.

you can install via the binary method in this way :

sudo add-apt-repository ppa:graphics-drivers/ppa 
sudo apt-get update 
ubuntu-drivers devices  
sudo apt-get install nvidia-(your version number)
  • 1
    I'm not sure how this solves my problem, can you pls explain. – Alen May 16 '17 at 18:53
  • as I said in the second part of my answer the results for each very quite tremendously. If you can confirm. you don not have the drivers obtained with apt install and ppa. if you do replace your driver with those can you confirm the issue remains? personally I think the issue will not be present with the binary drivers. – tatsu May 17 '17 at 5:08
  • 2
    Lots of gibberish and misconceptions here. First of all, the drivers version matter more than the method used. Granted, the executable directly from Nvidia is cumbersome and can have unintended results whereas the same version already packaged in the official repos or the PPA have been properly tested to work with all the releases/kernels. And the second part you're confused with is "Additional Drivers" that perform the exact same APT installation (plus it purges any previous version to avoid conflicts). – user692175 May 24 '17 at 10:30
  • sorry. I am still learning I just wanted to provide help I allow and welcome edits to my post – tatsu May 24 '17 at 16:45
  • This doesn't solve it unfortunately. I install my nvidia drivers they way you're describing it and I have the issue. @tatsu – Mina Michael Feb 24 '18 at 14:56

If your computer booted just fine before you installed the driver, your computer has more than 4GBs RAM, hard drive(s) and/or SSD(s) have plenty of space left and your computer only boots up slowly but works just fine after few seconds login screen appears, then the driver is most likely causing the problem.

I would suggest you to check out how high load your computer goes when you boot it and pay attention especially how much RAM, disk and / or SSD load there is during boots and also check if there are any updates available for the operating system and such.

Disabeling services you don't need is fine, but most likely won't really solve the issue (unless all disabled services use total of over 4GBs of RAM) because normally the ammount of RAM they use won't be much (Linux operating systems are MUCH lighter than Windows and you can easilly run 64 bit distros with as little as 1GB of RAM.)

Also check if your motherboards BIOS uses UEFI boot and if so, see if disableing it solves the issue.

UEFI boot isn't supported on Linux and your computer might just try to use UEFI boot because your Graphics card uses it automatically if UEFI boot is enabled before using the bootloader and hence the delay on booting.

Lastly you could try another Distro like Debian which is most stable distro of the family and ubuntu is based on.


There is always the simple but somewhat drastic option to not mix Ubuntu and Nvidia - i.e. if you can, remove the Nvidia hardware and use Intel graphics or anything else that is known to coexist nicely with Ubuntu. If you can't remove Nvidia (because perhaps the computer in question is a laptop), then the other option is replace Ubuntu by Windows. I know these are not great options, but they are simple and will definitely solve the problem. A quick scan in askubuntu and other sites would reveal a lot of people asking questions about Ubuntu/Nvidia, usually without a satisfactory resolution.

  • Don't blame it all on Nvidia. A lot of the Nvidia questions are about problems which were caused by user errors. – karel Jul 18 '18 at 15:21
  • I don't know whether anyone is to blame, but Nvidia and Ubuntu are not great together. My answer is based on personal experience having made the mistake to buy a laptop with Nvidia and install Ubuntu on it... It kept on freezing sporadically. I tried many of the suggestions made in askubuntu but had to resort to what I suggested in my reply. – Ron Kalian Jul 18 '18 at 15:25
  • Try uninstalling everything Nvidia and running this command: sudo ubuntu-drivers autoinstall && sudo reboot . Unlike other commands this command installs all the dependency packages. – karel Jul 18 '18 at 15:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.