Boot time and Running Slow - fresh install

Hi all,

New to Manjaro, so far I am very impressed, but looking to get more out of my (aging) laptop.

  • ASUS N56V
  • 8Gb Ram
  • Quad core i7-3630QM 2.4Ghz
  • Nvidia Geforce GT650M 4gb

Linux experience - I dual booted Win8/10 with Ubuntu for years, but never really used Ubuntu at all really. I installed Manjaro KDE Plasma 5.19.5 a few days ago using the clean (erase) install option, so I am not running the Win10 OS anymore. So let’s work through this as I know nothing about Linux.

Problem:
Clean install ran smoothly enough.
The boot time seems very slow, even for my laptop? It seems to take about:

  • 1 minute to log in screen
  • Another minute until I am on the desktop and able to click through to Firefox, etc.

Once the computer is running, even just clicking to open folders, the terminal, or browsing Firefox it just seems sluggish, even compared to Win10 that I uninstalled recently.

I’m very open and enthusiastic at the idea of playing around and seeing what’s wrong and investigating so if there’s any step by step/wiki/guide or any information you may have I can use to try to see what is the matter would be great.

Thanks guys!

boot on USB iso manjaro ,
select no-free drivers
open a terminal and a browser on this topic
and return

inxi -Fza 
mhwd -li

Try

sudo systemctl enable haveged --now

Run the commands @stephane provided but don’t boot into a live ISO when doing it.

After installing a new distro it’s good practice to update, have you done this already?

@Wollie so do I just run that command now, no need to boot from usb?

Also yes I’ve ran the updater and updated the programs to updated.

Here is what the console returned when I ran the command

System:    Kernel: 5.8.16-2-MANJARO x86_64 bits: 64 compiler: N/A 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.8-x86_64 root=UUID=eadda773-af59-4a4e-94ad-b915231e1b73 rw quiet apparmor=1 
           security=apparmor resume=UUID=56761846-4903-4238-8729-b946b7d40d81 udev.log_priority=3 
           Desktop: KDE Plasma 5.19.5 tk: Qt 5.15.1 wm: kwin_x11 dm: SDDM Distro: Manjaro Linux 
Machine:   Type: Laptop System: ASUSTeK product: N56VZ v: 1.0 serial: <filter> 
           Mobo: ASUSTeK model: N56VZ v: 1.0 serial: <filter> UEFI: American Megatrends v: N56VZ.215 date: 11/02/2012 
Battery:   ID-1: BAT0 charge: 21.7 Wh condition: 22.5/57.7 Wh (39%) volts: 11.1/11.1 model: ASUSTeK N56--52 type: Li-ion 
           serial: N/A status: Unknown cycles: 577 
CPU:       Topology: Quad Core model: Intel Core i7-3630QM bits: 64 type: MT MCP arch: Ivy Bridge family: 6 model-id: 3A (58) 
           stepping: 9 microcode: 21 L2 cache: 6144 KiB 
           flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 38335 
           Speed: 1197 MHz min/max: 1200/3400 MHz Core speeds (MHz): 1: 1356 2: 1198 3: 1197 4: 1344 5: 1197 6: 1197 7: 1811 
           8: 1339 
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
           Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
           Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
           Type: meltdown mitigation: PTI 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling 
           Type: srbds status: Vulnerable: No microcode 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel 3rd Gen Core processor Graphics vendor: ASUSTeK N56VZ driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:0166 
           Device-2: NVIDIA GK107M [GeForce GT 650M] vendor: ASUSTeK N56VZ driver: nouveau v: kernel bus ID: 01:00.0 
           chip ID: 10de:0fd1 
           Device-3: Sunplus Innovation Asus Webcam type: USB driver: uvcvideo bus ID: 2-1.3:4 chip ID: 1bcf:2883 
           Display: x11 server: X.Org 1.20.9 compositor: kwin_x11 driver: intel,nouveau unloaded: modesetting 
           alternate: fbdev,nv,vesa display ID: :0 screens: 1 
           Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") s-diag: 582mm (22.9") 
           Monitor-1: LVDS1 res: 1920x1080 hz: 60 dpi: 143 size: 340x190mm (13.4x7.5") diag: 389mm (15.3") 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 4000 (IVB GT2) v: 4.2 Mesa 20.1.8 compat-v: 3.0 direct render: Yes 
Audio:     Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: ASUSTeK N56VZ driver: snd_hda_intel v: kernel 
           bus ID: 00:1b.0 chip ID: 8086:1e20 
           Device-2: NVIDIA GK107 HDMI Audio driver: snd_hda_intel v: kernel bus ID: 01:00.1 chip ID: 10de:0e1b 
           Sound Server: ALSA v: k5.8.16-2-MANJARO 
Network:   Device-1: Intel Centrino Wireless-N 2230 driver: iwlwifi v: kernel port: e000 bus ID: 03:00.0 chip ID: 8086:0887 
           IF: wlp3s0 state: up mac: <filter> 
           Device-2: Qualcomm Atheros AR8161 Gigabit Ethernet vendor: ASUSTeK N56VZ driver: alx v: kernel port: d000 
           bus ID: 04:00.0 chip ID: 1969:1091 
           IF: enp4s0 state: down mac: <filter> 
Drives:    Local Storage: total: 698.64 GiB used: 215.04 GiB (30.8%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/sda vendor: Seagate model: ST750LM022 HN-M750MBB size: 698.64 GiB block size: physical: 4096 B 
           logical: 512 B speed: 3.0 Gb/s rotation: 5400 rpm serial: <filter> rev: 0001 scheme: GPT 
Partition: ID-1: / raw size: 689.54 GiB size: 677.72 GiB (98.29%) used: 215.04 GiB (31.7%) fs: ext4 dev: /dev/sda2 
Swap:      Kernel: swappiness: 60 (default) cache pressure: 100 (default) 
           ID-1: swap-1 type: partition size: 8.80 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/sda3 
Sensors:   System Temperatures: cpu: 61.0 C mobo: N/A gpu: nouveau temp: 61 C 
           Fan Speeds (RPM): cpu: 2500 
Info:      Processes: 224 Uptime: 25m Memory: 7.66 GiB used: 1.31 GiB (17.1%) Init: systemd v: 246 Compilers: gcc: 10.2.0 
           Packages: pacman: 1210 lib: 345 flatpak: 0 Shell: Bash v: 5.0.18 running in: konsole inxi: 3.1.05 

and

> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
           video-linux            2018.05.04                true            PCI


Warning: No installed USB configs!

No.

But please, also show us result of

sudo parted -l
sudo systemd-analyze blame
sudo cat /proc/sys/kernel/random/entropy_avail

You have hybrid graphics, i.e.

Device-1: Intel 3rd Gen Core processor Graphics vendor: ASUSTeK N56VZ driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:0166

Device-2: NVIDIA GK107M [GeForce GT 650M] vendor: ASUSTeK N56VZ driver: nouveau v: kernel bus ID: 01:00.0 chip ID: 10de:0fd1

In your case I would try to install a corresponding driver.
https://wiki.manjaro.org/index.php/Configure_Graphics_Cards

Some more background infos:
https://wiki.archlinux.org/index.php/Hybrid_graphics

Thanks, okay so I ran the command

sudo mhwd -a pci nonfree 0300

It returned " Successfully installed video-hybrid-intel-nvidia-418xx-bumblebee"

I will run those commands you have just posted and get back to you shortly.

Model: ATA ST750LM022 HN-M7 (scsi)
Disk /dev/sda: 750GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system     Name  Flags
 1      2097kB  317MB  315MB   fat32                 boot, esp
 2      317MB   741GB  740GB   ext4
 3      741GB   750GB  9449MB  linux-swap(v1)        swap
12.415s snapd.service                                                            
10.408s NetworkManager-wait-online.service                                       
 9.207s lvm2-monitor.service                                                     
 8.563s polkit.service                                                           
 7.781s dev-sda2.device                                                          
 5.609s avahi-daemon.service                                                     
 5.606s NetworkManager.service                                                   
 5.342s systemd-logind.service                                                   
 4.274s systemd-journal-flush.service                                            
 3.621s apparmor.service                                                         
 3.534s bluetooth.service                                                        
 3.380s ModemManager.service                                                     
 2.782s systemd-udevd.service                                                    
 1.641s systemd-tmpfiles-setup-dev.service                                       
 1.030s systemd-random-seed.service                                              
  942ms wpa_supplicant.service                                                   
  911ms systemd-backlight@leds:asus::kbd_backlight.service                       
  810ms systemd-modules-load.service                                             
  747ms systemd-fsck@dev-disk-by\x2duuid-4F32\x2d64E2.service                    
  674ms modprobe@drm.service                                                     
  646ms udisks2.service                                                          
  644ms tlp.service                                                              
  632ms systemd-journald.service                                                 
  611ms systemd-backlight@backlight:intel_backlight.service                      
  604ms upower.service                                                           
  582ms systemd-tmpfiles-setup.service                                           
  573ms org.cups.cupsd.service                                                   
  520ms systemd-sysctl.service                                                   
  456ms systemd-udev-trigger.service                                             
  367ms snapd.apparmor.service                                                   
  357ms dev-hugepages.mount                                                      
  355ms dev-mqueue.mount                                                         
  354ms sys-kernel-debug.mount                                                   
  354ms sys-kernel-tracing.mount                                                 
  353ms kmod-static-nodes.service                                                
  331ms user@1000.service                                                        
  330ms systemd-rfkill.service                                                   
  312ms boot-efi.mount                                                           
  307ms dev-disk-by\x2duuid-56761846\x2d4903\x2d4238\x2d8729\x2db946b7d40d81.swap
  293ms systemd-binfmt.service                                                   
  267ms rtkit-daemon.service                                                     
  258ms linux-module-cleanup.service                                             
  224ms systemd-tmpfiles-clean.service                                           
log file: udo cat /proc/sys/kernel/random/entropy_avail

I would stop, disable and mask NetworkManager-wait-online.service and stop, disable snapd.service if you don’t use or intend to use snaps on your system.

This service you can stop, disable and mask by

systemctl disable --now NetworkManager-wait-online.service
systemctl mask NetworkManager-wait-online.service

If you don’t use any encrypted disks you also can stop, disable and mask lvm2-monitor.service:

systemctl disable --now lvm2-monitor.service
systemctl mask lvm2-monitor.service

Please run (again)

sudo cat /proc/sys/kernel/random/entropy_avail

Snapd takes a lot of your boot time. Do you use snaps?

Done.

3643

And snaps - no I’m not using them currently, don’t think I am planning to.

This is fine (because larger than 1000), so you don’t have an entropy issue. (relates to admdb’s post)

Then also stop snapd.service:

systemctl disable --now snapd.service
systemctl mask snapd.service

And don’r forget to report any improvements after a reboot!

Done.

Okay I just went for a reboot. No signs of improvement. More or less the same.
About 1 minute to the log in screen, and then another 1 minute and a half until I am back in this thread.

You use a hdd which certainly is not as fast as a ssd, so I have no comparison what is normal for a hdd. Please provide output of

sudo fdisk -l

Maybe you have an alignment issue with your partitions.

Disk /dev/sda: 698.64 GiB, 750156374016 bytes, 1465149168 sectors
Disk model: ST750LM022 HN-M7
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 07ED1A8A-3900-904A-9379-412EC64306B1

Device          Start        End    Sectors   Size Type
/dev/sda1        4096     618495     614400   300M EFI System
/dev/sda2      618496 1446689125 1446070630 689.5G Linux filesystem
/dev/sda3  1446689126 1465144064   18454939   8.8G Linux swap

Partition 3 does not start on physical sector boundary.

Here we go, this partition is unaligned.

Two alternative procedures how to fix this:

  1. Edit your /etc/fstab and comment out by adding # at the start of the entry for your swap partition. Reboot. Use GParted or another GUI based partition manager to move the unmounted swap partition to a position being aligned with your physical sector size. Reboot. Remove # from your swap entry of /etc/fstab, save the file and reboot.

  2. Boot into a live ISO, delete /dev/sda3 and make a new but aligned partition. No file system, only swap flag to be set. Before booting chroot into your OS and adujust the UUID=… setting for your swap partition in /etc/fstab as it has changed. If you feel more comfortable in avoiding this step just delete the swap entry from your /etc/fstab file upfront. You can add the entry again after making the new swap partition.

References

I would use the command parted for it, but I canot provide exact syntax to do it, right now.

Ok I will give this a shot.

Thanks for yours (and everyone’s) help so far Wollie. Much appreciated.

So how I should boot with a live ISO? Am I creating a bootable USB, or? (sorry haha)

How do I edit the /etc/fstab. I’ve got GParted installed to go after that.
Edit: okay I just searched /etc/fstab in the search bar, now am in like a notepad of this file I suppose. I’ll add the # in for the swap partition and continue with step 1 now with the reboot.

Yeah I’m lost haha.

So in 1. I opened the /etc/fstab file, put a # before the swap partition, and rebooted.
Now I am in GParted and it’s showing I can’t move the linux-swap partition?

Is it still mounted? Could be as systemd is mounting swap partitions if it finds them. Try to disable swap by

sudo swapoff -a  

and then to unmount it (if needed, not be 100% sure if needed).

Okay that worked. There is plenty more options now in GParted for the linux-swap partition.