18

Ubuntu 16.04 64 bit taking around 20 sec from Login screen to desktop and around 20 seconds from grub to login screen,

tell me which services i can safely disable, i do not use virtualbox and bluetooth frequently, all other things are used like printer, wifi etc.
output of systemd-analyze

Startup finished in 5.145s (kernel) + 14.138s (userspace) = 19.284s

and output of

systemd-analyze blame


 5.837s accounts-daemon.service
          5.444s dev-sda6.device
          4.864s grub-common.service
          4.105s lightdm.service
          4.075s ModemManager.service
          4.001s preload.service
          3.844s apparmor.service
          3.566s networking.service
          3.468s apport.service
          3.332s ondemand.service
          3.272s rsyslog.service
          3.269s systemd-logind.service
          3.253s alsa-restore.service
          3.241s gpu-manager.service
          3.226s avahi-daemon.service
          3.185s systemd-user-sessions.service
          3.185s pppd-dns.service
          2.508s NetworkManager.service
          2.003s user@1000.service
          1.640s plymouth-quit-wait.service
          1.245s colord.service
           712ms systemd-update-utmp.service
           687ms systemd-udevd.service
           669ms udisks2.service
           632ms polkitd.service
           602ms brltty.service
           572ms systemd-localed.service
           567ms systemd-backlight@backlight:intel_backlight.service
           543ms systemd-rfkill.service
           527ms systemd-tmpfiles-setup-dev.service
           519ms thermald.service
           490ms systemd-tmpfiles-setup.service
           464ms systemd-modules-load.service
           454ms systemd-tmpfiles-clean.service
           450ms systemd-timesyncd.service
           428ms systemd-journald.service
           371ms wpa_supplicant.service
           340ms ufw.service
           317ms systemd-random-seed.service
           284ms console-setup.service
           281ms plymouth-start.service
           270ms dev-hugepages.mount
           270ms sys-kernel-debug.mount
           224ms systemd-udev-trigger.service
           177ms dev-mqueue.mount
           168ms plymouth-read-write.service
           165ms upower.service
           131ms dns-clean.service
           103ms systemd-sysctl.service
           102ms dev-disk-by\x2duuid-8bd6db03\x2da87b\x2d4614\x2d927a\x2dd5916f3
            68ms systemd-hostnamed.service
            49ms systemd-journal-flush.service
            47ms kmod-static-nodes.service
            47ms snapd.socket
            32ms systemd-remount-fs.service
            28ms rc-local.service
            10ms resolvconf.service
            10ms rtkit-daemon.service
             9ms systemd-update-utmp-runlevel.service
             6ms ureadahead-stop.service
             4ms sys-fs-fuse-connections.mount lines 39-61/61 (END)

As well as:

systemd-analyze critical-chain

the time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

graphical.target @14.124s
└─lightdm.service @10.018s +4.105s
  └─systemd-user-sessions.service @6.731s +3.185s
    └─basic.target @6.625s
      └─sockets.target @6.625s
        └─snapd.socket @6.576s +47ms
          └─sysinit.target @6.574s
            └─swap.target @6.574s
              └─dev-disk-by\x2duuid-8bd6db03\x2da87b\x2d4614\x2d927a\x2dd5916f3c
                └─dev-disk-by\x2duuid-8bd6db03\x2da87b\x2d4614\x2d927a\x2dd5916f
lines 1-13/13 (END)

i am using a HDD with 7200 RPM, i think boot time is okay, but after login screen, i have to pass 20 secs with a blank screen, I have already disabled some startup items like ORCA, BLUETOOTH, backup monitor, accessibility etc, personal file sharing and user folder update etc, still nothing is improving, how to diagnose the culprit and treat it.

nixpower
  • 1,210
  • 6
  • 18
Kanhiya
  • 439
  • 2
  • 6
  • 21
  • 1
    I like 'bootchart' if it comes to analyzing and partly understanding the boot-process. – dufte May 25 '16 at 10:02
  • 1
    i also installed bootchart but how do i create svg from it, for some reason it always throws this error path '/var/log/bootchart.tgz' does not exist, ignoring. Parse error: empty state: '/var/log/bootchart.tgz' does not contain a valid bootchart – Kanhiya May 25 '16 at 10:04
  • Bootchart images should be auto-generated under /var/log/bootchart/hostname-distribution-date.png' and '.tgz' if i remember right. Could be you need in addition to 'bootchart' the package 'pybootchartgui' – dufte May 25 '16 at 10:07
  • Both packages are already installed – Kanhiya May 25 '16 at 11:30
  • My .tgz and .png files are located in '/var/log/bootchart/' not '/var/log/'. – dufte May 25 '16 at 11:59
  • bootchart is for some reason is not working and i have purged the same, it was causing system slow down and hogging memory, while ubuntu 14.04 32 Bit , boot to desktop in around 30 sec with much more packages installed on the same machine. – Kanhiya Jun 14 '16 at 06:55
  • what's the value of loader in systemd-analyze – Mohamed Slama Jun 16 '16 at 07:29
  • 1
    I don't know if you use ModemManager it takes 5 sec , preload take 4 sec or more , NetworkManager takes 2.5 sec and apport 4 sec if you disable them you will save more than 10 sec. – Mohamed Slama Jun 16 '16 at 07:49
  • ModemManager ==> if you using Modem , Preload ==> depend on application so it's number not constant , NetworkManager ==> for connecting your wifi automatically and apport ==> system notification dialog – Mohamed Slama Jun 16 '16 at 07:55
  • I have the same problem, for me it takes more than 1 min and 30 secs to boot! take a look at this question to know how to fix bootchart: http://askubuntu.com/questions/788849/bootchart-error – Sadegh Jun 19 '16 at 07:50
  • 3
    There's a bootchart functionality included into systemd. Simply run systemd-analyze plot > bootchart.svg to create a graphical bootchart image and save it to the file bootchart.svg. Simply open it with your favourite image viewer. – Byte Commander Jun 19 '16 at 15:11
  • Could you pls reboot your system and then use dmesg and post the results here – s1mmel Jun 28 '16 at 16:03
  • If someone will answer I will award the bounty. – BJsgoodlife Jun 30 '16 at 02:49
  • 2
    This related question has a good accepted answer: http://askubuntu.com/questions/762932/how-to-speed-up-boot-time-of-ubuntu-when-you-find-a-possible-cause-in-dmesg-ou – Katu Jul 07 '16 at 08:08
  • 16.04 is just slower to boot, period. I've tried disabling everything I could and started getting problems from stripping everything away, see my question here. 16.04 just has more and does more. An SSD drive will help a bit, but my solution was to downgrade to 14.04. My boot is now 5 seconds to desktop on SSD with 14.04. – Delorean Aug 07 '16 at 08:52
  • Have you tried $echo FRAMEBUFFER=y | sudo tee /etc/initramfs-tools/conf.d/splash $sudo update-initramfs -u $sudo update-grub Just take a look at this post. http://askubuntu.com/questions/362722/how-to-fix-plymouth-splash-screen-in-all-ubuntu-releases – Sand Angel Sep 16 '16 at 04:45
  • If you have a 32-bit OS, that might explain everything. If not, sorry. Some Tips: upgrade your ram; configure your boot options – jjaaccoobb Aug 07 '16 at 19:34
  • Try this link: http://askubuntu.com/questions/760694/really-slow-boot-on-16-04 or: http://askubuntu.com/questions/35497/how-to-fix-very-slow-ubuntu-booting But whatever happens, Good luck! – Alexandra Sep 19 '16 at 20:54

1 Answers1

5

Try removing some unused dependencies and orphan packages. This will help.
It worked in my case. Run:

sudo apt autoremove && sudo apt autoclean

Also, you can install Gtkorphan (sudo apt-get install gtkorphan) to remove all orphaned packages and dependencies left behind by other apps.

Eric Carvalho
  • 54,385
Collin
  • 581