4

My system boot time suddenly became very high. I've been dual booting Kubuntu and Win10 for quite some times. The root partition is on ssd. I recently increased my swap size using live usb and then this started to happen. Before this, my boot time was about 7-10 seconds. Here's the systemd-analyze output now. Notice the kernel time, about 36s.

Tried switching to previous kernels, still slow. Here's the inxi -Fz info. Unfortunately, I don't know exactly what to look for in the dmesg info. Only other query I found related to my issue is this one.

I don't think my issue can be resolved by decreasing different service's startup time. But here's the blame and critical-chain output anyway; blame and critical-chain.

I'm just including blkid, grub and fstab info, it that's required.

Thanks. Kindly let me know, if any other info is required.

Harley
  • 88

2 Answers2

3

BIOS

ASUS X556UB v: 1.0

You have BIOS version X556UB.411. Version 412 is available here.

Note: Confirm that I have the correct web page for your model #.

Note: Have good backups before updating the BIOS.

Nvidia GM108M [GeForce 940M]

It looks like you're using the nouveau video driver. The Nvidia driver would provide better performance. The Nvidia driver can be downloaded here. (Or use Software & Updates Additional Drivers tab).

FSTAB (the real problem #1)

Note: 1.309s home-shawon-Store.mount

Change this line:

/dev/sdb1    /home/shawon/Store    ntfs    defaults,noatime,uid=1000,x-gvfs-hide    0    2

To this:

/dev/sdb1    /home/shawon/Store    ntfs    defaults,noatime,uid=1000,x-gvfs-hide    0    0

Note: For more reliable operation, change the /dev/sdxx to UUID=xxxxxxxxxxxxxxx

NCQ errors (the real problem #2)

Note: ata2.00: failed command: READ FPDMA QUEUED

Native Command Queuing (NCQ) is an extension of the Serial ATA protocol allowing hard disk drives to internally optimize the order in which received read and write commands are executed.

Edit sudo -H gedit /etc/default/grub and change the following line to include this extra parameter. Then do sudo update-grub to write the changes to disk. Reboot. Monitor hangs/etc., and watch grep -i FPDMA /var/log/syslog* or dmesg for continued error messages.

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash libata.force=noncq"

SWAP

Suggest the use of a /swapfile, instead of a swap partition.

Note: Incorrect use of the rm and dd commands can cause data loss. Suggest copy/paste.

In the terminal...

sudo swapoff -a           # turn off swap
sudo rm -i /swapfile      # remove old /swapfile

sudo dd if=/dev/zero of=/swapfile bs=1M count=4096

sudo chmod 600 /swapfile # set proper file protections sudo mkswap /swapfile # init /swapfile sudo swapon /swapfile # turn on swap free -h # confirm 16G RAM and 4G swap

Edit /etc/fstab, using sudo -H gedit /etc/fstab or sudo pico /etc/fstab.

Confirm this /swapfile line in /etc/fstab... and confirm no other “swap” lines... use SPACES in this line... confirm NO TABS...

/swapfile  none  swap  sw  0  0

Note: Comment out this line in /etc/fstab...

UUID=76408dec-2d63-402b-9624-fc562b8e9b5b    none    swap    sw    0    0

reboot                    # reboot and verify operation
heynnema
  • 73,649
1

Your log file shows the most time-consuming process with the line:

6.458s NetworkManager-wait-online.service

Therefore it would appear your biggest performance gain would be to have systemd not wait for the network to come up. See:

The answer explains the process in detail but, to summarize, you can use:

sudo systemctl disable NetworkManager-wait-online.service

Long kernel boot time

From this answer:

Try enabling Intel SpeedStep in BIOS.