[SOLVED] Desktop Slow to Launch on Startup

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Prince of Heck
Level 1
Level 1
Posts: 40
Joined: Sun Jul 19, 2020 9:13 am

[SOLVED] Desktop Slow to Launch on Startup

Post by Prince of Heck »

After an update about 2 weeks back, my icons take minutes to load on startup. I can run the terminal and system monitor but applications like firefox & caja have to wait for the icons to appear in order to operate. Once up, everything seems to run fine. I'm at a loss for how to diagnose this problem.

Code: Select all

System:
  Kernel: 5.15.0-58-generic x86_64 bits: 64 compiler: N/A 
  Desktop: MATE 1.24.0 info: mate-panel wm: marco 1.24.0 dm: LightDM 1.30.0 
  Distro: Linux Mint 20.1 Ulyssa base: Ubuntu 20.04 focal 
Machine:
  Type: Desktop Mobo: Micro-Star model: B450I GAMING PLUS AC (MS-7A40) 
  v: 2.0 serial: <filter> UEFI: American Megatrends v: A.A0 date: 09/25/2019 
CPU:
  Topology: 6-Core model: AMD Ryzen 5 3600 bits: 64 type: MT MCP arch: Zen 
  L2 cache: 3072 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm 
  bogomips: 86401 
  Speed: 3600 MHz min/max: N/A Core speeds (MHz): 1: 3600 2: 3600 3: 3600 
  4: 3600 5: 3600 6: 3600 7: 3600 8: 3600 9: 3600 10: 3600 11: 3600 12: 3600 
Graphics:
  Device-1: AMD Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] 
  vendor: XFX Pine driver: amdgpu v: kernel bus ID: 2b:00.0 
  chip ID: 1002:731f 
  Display: x11 server: X.Org 1.20.13 driver: amdgpu,ati 
  unloaded: fbdev,modesetting,radeon,vesa compositor: marco v: 1.24.0 
  resolution: 2560x1440~144Hz 
  OpenGL: renderer: AMD Radeon RX 5700 (navi10 LLVM 15.0.6 DRM 3.42 
  5.15.0-58-generic) 
  v: 4.6 Mesa 22.3.3 - kisak-mesa PPA direct render: Yes 
Audio:
  Device-1: AMD Navi 10 HDMI Audio driver: snd_hda_intel v: kernel 
  bus ID: 2b:00.1 chip ID: 1002:ab38 
  Device-2: AMD Starship/Matisse HD Audio vendor: Micro-Star MSI 
  driver: snd_hda_intel v: kernel bus ID: 2d:00.4 chip ID: 1022:1487 
  Device-3: Corsair Corsair VOID PRO Wireless Gaming Headset type: USB 
  driver: hid-generic,snd-usb-audio,usbhid bus ID: 1-1:2 chip ID: 1b1c:0a1a 
  Sound Server: ALSA v: k5.15.0-58-generic 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: Micro-Star MSI driver: r8168 v: 8.048.00-NAPI port: f000 
  bus ID: 25:00.0 chip ID: 10ec:8168 
  IF: enp37s0 state: down mac: <filter> 
  Device-2: Intel Dual Band Wireless-AC 3168NGW [Stone Peak] driver: iwlwifi 
  v: kernel port: f000 bus ID: 26:00.0 chip ID: 8086:24fb 
  IF: wlp38s0 state: down mac: <filter> 
  Device-3: TP-Link 802.11ac NIC type: USB driver: rtl88x2bu bus ID: 3-1:2 
  chip ID: 2357:0115 serial: <filter> 
  IF: wlx54af97352396 state: up mac: <filter> 
Drives:
  Local Storage: total: 465.76 GiB used: 513.65 GiB (110.3%) 
  ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO Plus 500GB 
  size: 465.76 GiB speed: 31.6 Gb/s lanes: 4 serial: <filter> rev: 2B2QEXM7 
  scheme: GPT 
Partition:
  ID-1: / size: 455.24 GiB used: 256.54 GiB (56.4%) fs: ext4 dev: /dev/dm-1 
  ID-2: /boot size: 703.1 MiB used: 574.5 MiB (81.7%) fs: ext4 
  dev: /dev/nvme0n1p2 
  ID-3: swap-1 size: 980.0 MiB used: 0 KiB (0.0%) fs: swap dev: /dev/dm-2 
Sensors:
  System Temperatures: cpu: 36.0 C mobo: N/A gpu: amdgpu temp: 42 C 
  Fan Speeds (RPM): N/A gpu: amdgpu fan: 0 
Repos:
  No active apt repos in: /etc/apt/sources.list 
  Active apt repos in: /etc/apt/sources.list.d/kisak-kisak-mesa-focal.list 
  1: deb http://ppa.launchpad.net/kisak/kisak-mesa/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
  1: deb http://packages.linuxmint.com ulyssa main upstream import backport #id:linuxmint_main
  2: deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
  3: deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
  4: deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
  5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
  6: deb http://archive.canonical.com/ubuntu/ focal partner
  Active apt repos in: /etc/apt/sources.list.d/openrazer-stable-focal.list 
  1: deb http://ppa.launchpad.net/openrazer/stable/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/polychromatic-stable-focal.list 
  1: deb http://ppa.launchpad.net/polychromatic/stable/ubuntu focal main
Info:
  Processes: 385 Uptime: 1m Memory: 31.30 GiB used: 1.58 GiB (5.1%) 
  Init: systemd v: 245 runlevel: 5 Compilers: gcc: 9.4.0 alt: 7/9 
  Shell: bash v: 5.0.17 running in: mate-terminal inxi: 3.0.38 
Last edited by LockBot on Fri Jul 14, 2023 10:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
all41
Level 19
Level 19
Posts: 9525
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Desktop Slow to Launch on Startup

Post by all41 »

what are the results for:

Code: Select all

systemd-analyze blame
that may reveal the hang
Last edited by all41 on Sun Jan 15, 2023 1:55 am, edited 1 time in total.
Everything in life was difficult before it became easy.
Prince of Heck
Level 1
Level 1
Posts: 40
Joined: Sun Jul 19, 2020 9:13 am

Re: Desktop Slow to Launch on Startup

Post by Prince of Heck »

all41 wrote: Sun Jan 15, 2023 1:05 am what are the results for:

Code: Select all

systemd-analyze blame
that may reveal the hang
Even went a little further. Note I can run and complete these diagnostics while I am still waiting for the icons to appear.

Code: Select all

:~$ systemd-analyze
Startup finished in 20.502s (firmware) + 4.156s (loader) + 15.450s (kernel) + 1.665s (userspace) = 41.774s 
graphical.target reached after 1.659s in userspace

Code: Select all

:~$ systemd-analyze blame
1.057s apt-daily-upgrade.service                                                                
 652ms lightdm.service                                                                          
 650ms plymouth-quit-wait.service                                                               
 577ms dev-mapper-mint\x2d\x2dvg\x2droot.device                                                 
 484ms systemd-logind.service                                                                   
 314ms rtkit-daemon.service                                                                     
 296ms apt-daily.service                                                                        
 231ms systemd-journal-flush.service                                                            
 190ms systemd-rfkill.service                                                                   
 161ms lvm2-monitor.service                                                                     
 133ms upower.service                                                                           
 133ms networkd-dispatcher.service                                                              
 118ms systemd-udev-trigger.service                                                             
 116ms lvm2-pvscan@253:0.service                                                                
 115ms apparmor.service                                                                         
 103ms accounts-daemon.service                                                                  
 100ms modprobe@chromeos_pstore.service                                                         
  98ms udisks2.service                                                                          
  97ms systemd-resolved.service                                                                 
  96ms ua-timer.service                                                                         
  80ms ubuntu-system-adjustments.service                                                        
  78ms systemd-journald.service                                                                 
  73ms ifupdown-pre.service                                                                     
  71ms keyboard-setup.service                                                                   
  71ms NetworkManager.service                                                                   
  64ms kerneloops.service                                                                       
  63ms user@1000.service                                                                        
  62ms systemd-fsck@dev-disk-by\x2duuid-54C1\x2dBC8B.service                                    
  56ms ModemManager.service                                                                     
  54ms alsa-restore.service                                                                     
  53ms lm-sensors.service                                                                       
  52ms avahi-daemon.service                                                                     
  52ms systemd-fsck@dev-disk-by\x2duuid-11d3f59b\x2da0a1\x2d423f\x2d9d98\x2d0b7eff485a1a.service
  45ms resolvconf-pull-resolved.service                                                         
  41ms systemd-sysctl.service                                                                   
  41ms colord.service                                                                           
  39ms gpu-manager.service                                                                      
  39ms hddtemp.service                                                                          
  38ms systemd-tmpfiles-setup.service                                                           
  38ms boot.mount                                                                               
  37ms grub-common.service                                                                      
  36ms systemd-udevd.service                                                                    
  34ms polkit.service                                                                           
  34ms boot-efi.mount                                                                           
  32ms console-setup.service                                                                    
  31ms grub-initrd-fallback.service                                                             
  30ms systemd-modules-load.service                                                             
  28ms systemd-cryptsetup@nvme0n1p3_crypt.service                                               
  26ms networking.service                                                                       
  25ms thermald.service                                                                         
  24ms e2scrub_reap.service                                                                     
  24ms wpa_supplicant.service                                                                   
  22ms blk-availability.service                                                                 
  22ms dev-hugepages.mount                                                                      
  22ms kmod-static-nodes.service                                                                
  22ms dev-mqueue.mount                                                                         
  22ms rsyslog.service                                                                          
  21ms sys-kernel-debug.mount                                                                   
  21ms sys-kernel-tracing.mount                                                                 
  21ms modprobe@efi_pstore.service                                                              
  21ms modprobe@pstore_blk.service                                                              
  20ms modprobe@pstore_zone.service                                                             
  20ms dns-clean.service                                                                        
  20ms modprobe@ramoops.service                                                                 
  19ms finalrd.service                                                                          
  18ms systemd-remount-fs.service                                                               
  17ms systemd-random-seed.service                                                              
  14ms systemd-sysusers.service                                                                 
  14ms ufw.service                                                                              
  14ms pppd-dns.service                                                                         
  13ms ntp.service                                                                              
  12ms plymouth-start.service                                                                   
  12ms systemd-tmpfiles-clean.service                                                           
  11ms plymouth-read-write.service                                                              
  10ms bluetooth.service                                                                        
   8ms systemd-tmpfiles-setup-dev.service                                                       
   6ms systemd-user-sessions.service                                                            
   5ms systemd-update-utmp.service                                                              
   5ms dev-mapper-mint\x2d\x2dvg\x2dswap_1.swap                                                 
   5ms openvpn.service                                                                          
   4ms user-runtime-dir@1000.service                                                            
   4ms systemd-update-utmp-runlevel.service                                                     
   3ms ureadahead-stop.service                                                                  
   2ms sys-fs-fuse-connections.mount                                                            
   2ms sys-kernel-config.mount                                                                  
   1ms e2scrub_all.service                                                                      
   1ms setvtrgb.service                                                                         
lines 69-87/87 (END)

Code: Select all

:~$ systemd-analyze critical-chain
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.

graphical.target @1.659s
└─multi-user.target @1.659s
  └─getty.target @1.659s
    └─getty@tty1.service @1.659s
      └─system-getty.slice @1.658s
        └─setvtrgb.service @1.656s +1ms
          └─systemd-user-sessions.service @992ms +6ms
            └─network.target @979ms
              └─NetworkManager.service @907ms +71ms
                └─dbus.service @905ms
                  └─basic.target @896ms
                    └─sockets.target @896ms
                      └─uuidd.socket @896ms
                        └─sysinit.target @894ms
                          └─swap.target @837ms
                            └─dev-mapper-mint\x2d\x2dvg\x2dswap_1.swap @832ms +5ms
                              └─dev-mapper-mint\x2d\x2dvg\x2dswap_1.device @827ms
Prince of Heck
Level 1
Level 1
Posts: 40
Joined: Sun Jul 19, 2020 9:13 am

Re: Desktop Slow to Launch on Startup

Post by Prince of Heck »

[Deleted]
Last edited by Prince of Heck on Sun Jan 15, 2023 12:31 pm, edited 1 time in total.
Prince of Heck
Level 1
Level 1
Posts: 40
Joined: Sun Jul 19, 2020 9:13 am

Re: Desktop Slow to Launch on Startup

Post by Prince of Heck »

I should add, this is repeatable from logging out and back in. This doesn't appear to be a POST or BIOS issue. The menu button and panel load with tray icons populated WiFi connects quickly, but the desktop background (no image just solid color) is black then loads after a bit, the update manager icon, then the icons appear shortly after the update manager.
mikeflan
Level 17
Level 17
Posts: 7159
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: Desktop Slow to Launch on Startup

Post by mikeflan »

I'm guessing it is something in /etc/fstab that is causing the problem.

Backup fstab with this command in a terminal before making any modifications to fstab:

Code: Select all

sudo cp /etc/fstab /etc/fstab.bak
Be VERY careful about modifying fstab.

Please post the results of this in a terminal:

Code: Select all

cat /etc/fstab; echo ""; lsblk -f
More reading for you:
viewtopic.php?f=235&t=197249
viewtopic.php?f=47&t=386295
Prince of Heck
Level 1
Level 1
Posts: 40
Joined: Sun Jul 19, 2020 9:13 am

Re: Desktop Slow to Launch on Startup

Post by Prince of Heck »

mikeflan wrote: Fri Jan 20, 2023 9:11 pm Please post the results of this in a terminal:

Code: Select all

cat /etc/fstab; echo ""; lsblk -f

Code: Select all

:~$ cat /etc/fstab; echo ""; lsblk -f
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/mapper/mint--vg-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/nvme0n1p2 during installation
UUID=11d3f59b-a0a1-423f-9d98-0b7eff485a1a /boot           ext4    defaults        0       2
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=54C1-BC8B  /boot/efi       vfat    umask=0077      0       1
/dev/mapper/mint--vg-swap_1 none            swap    sw              0       0
# /dev/mapper/cryptswap1 none swap sw 0 0

NAME FSTYPE LABEL UUID                                   FSAVAIL FSUSE% MOUNTPOINT
nvme0n1
│                                                                       
├─nvme0n1p1
│    vfat         54C1-BC8B                                 505M     1% /boot/efi
├─nvme0n1p2
│    ext4         11d3f59b-a0a1-423f-9d98-0b7eff485a1a     77.3M    82% /boot
└─nvme0n1p3
     crypto       1f41edce-3960-4ee2-a7d1-d9f51724249c                  
  └─nvme0n1p3_crypt
     LVM2_m       JyZhsa-TU0F-hMOs-0dnk-RMrB-9k2U-qLdJcC                
    ├─mint--vg-root
    │  ext4         edb9c0cf-5459-4eef-925c-5974552b4376    161.5G    59% /
    └─mint--vg-swap_1
       swap         d87a5539-5540-4568-86a5-7ff70e93f851                  [SWAP]
mikeflan
Level 17
Level 17
Posts: 7159
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: Desktop Slow to Launch on Startup

Post by mikeflan »

We are waiting for better help. I don't understand your first and last line in fstab:

/dev/mapper/mint--vg-root / ext4 errors=remount-ro 0 1

/dev/mapper/mint--vg-swap_1 none swap sw 0 0

My swap is:
/swapfile none swap sw 0 0

My / and /boot are all-in-one.
User avatar
igmint
Level 4
Level 4
Posts: 233
Joined: Fri Jan 10, 2020 1:52 pm

Re: Desktop Slow to Launch on Startup

Post by igmint »

Desktop icons (also first run ~$ sudo caja /) started freezing for 30 seconds. Presumably happened after the update libnautilus-extension1a (1:3.36.3-0ubuntu1.20.04.1) to 1:3.36.3-0ubuntu1.20.04.2. In my case, the fix came with updating LM to the next version (20.3).
translated by googlemachine. UTC+3:00
tomas_52
Level 1
Level 1
Posts: 45
Joined: Tue Apr 27, 2021 10:40 am

Re: Desktop Slow to Launch on Startup

Post by tomas_52 »

I am trying to solve a similar problem (slow boot but for other reasons).
As far as I could see the solutions proposed cannot bring the required results.
systemd-analyze shows only what happens before the graphical target is reached.
Now I am trying to analyze the output from "journalctl -b 0" that shows also what happens next.
Its output is rather large so I redirect it to a text file, search for the line containing "graphical target", and delete everything above.
In the remaining text there you could find apps or services that take too long to start.
I have not succeeded yet but hope to find the culprit.
User avatar
nooblinx
Level 2
Level 2
Posts: 67
Joined: Sat Jul 03, 2021 4:13 am

Re: Desktop Slow to Launch on Startup

Post by nooblinx »

I had similar problem when updating to kernel 58. downgraded to 56 and works better
still noob in linux :~$ echo "my english is not good"
Prince of Heck
Level 1
Level 1
Posts: 40
Joined: Sun Jul 19, 2020 9:13 am

Re: Desktop Slow to Launch on Startup

Post by Prince of Heck »

nooblinx wrote: Sun Jan 29, 2023 5:26 am I had similar problem when updating to kernel 58. downgraded to 56 and works better
Man this looked promising but unfortunately 56 & 57 still persist with this problem
mikeflan
Level 17
Level 17
Posts: 7159
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: Desktop Slow to Launch on Startup

Post by mikeflan »

In the 2 weeks this has been opened nobody has mentioned Timeshift. So I will.
Timeshift will often fix a problem like this if you save a very old snapshot.
My oldest snapshot is from 10/16/2022, which is immediately after I installed LM 20.3.
To save an old snapshot, click the comments area in Timeshift and give it a comment.
tomas_52
Level 1
Level 1
Posts: 45
Joined: Tue Apr 27, 2021 10:40 am

Re: Desktop Slow to Launch on Startup

Post by tomas_52 »

Now I consider giving up trying to solve the problem.
I did not find any useful hint in the journalctl -b 0 output from reaching graphical target to the end of it.
Nevertheless seeing several red enhanced error messages in the whole output to terminal, I have at least tried to solve them.
It even added some seconds to the boot process (I measure that from OS selection in multiboot to full desktop with Welcome, without needing to login).
One of the errors you can see also when starting Mint from the installation media is about not getting to the ntp pool.
The solution I have found on the Internet did not work, it added about 10 seconds to the boot process.

I have found a better solution:
From the ntp.org web page I got the address of local ntp servers and replaced "pool ... ubuntu ..." by "server ..." as indicated there, in /etc/ntp.conf.
I have also disabled the link to fallback pool.
I must admit that I did not expect such effect - according to systemd-analyze the kernel loads 2 seconds earlier and reaches graphical target 7 seconds earlier.
The measured boot is about 12 seconds faster.

I must admit that now I am a bit confused at the results I get from systemd-analyze critical-chain / blame:
The first gives about 15 seconds to Network Manager (service and wait-on-line) and 6 seconds to lvm2-monitor,
the second 14 seconds to udisks2, then is wait-on-line and after that 8 seconds for lightdm.service.
I did not find a solution for udisks2.

The problem is that even now the system boots about 35% slower compared to Mint 19. This applies to both Mint 20 and 21.
I consider starting a new thread about that.
If someone has an explanation or advice how to solve this, I will be very glad to hear from you.
tomas_52
Level 1
Level 1
Posts: 45
Joined: Tue Apr 27, 2021 10:40 am

Re: Desktop Slow to Launch on Startup

Post by tomas_52 »

I am sorry to say that the speed up in my previous note worked only temporarily, now after just a few reboots the times are slow again.
The only difference that I can observe is that now the output of systemd-analyze "critical-chain" and "blame" are more consistent.
Before there were more apps and often different between reboots, now both name the culprit as udisks2.service.
Does anybody know what can be done here?
Prince of Heck
Level 1
Level 1
Posts: 40
Joined: Sun Jul 19, 2020 9:13 am

Re: Desktop Slow to Launch on Startup

Post by Prince of Heck »

tomas_52 wrote: Thu Feb 02, 2023 8:28 am I am sorry to say that the speed up in my previous note worked only temporarily, now after just a few reboots the times are slow again.
The only difference that I can observe is that now the output of systemd-analyze "critical-chain" and "blame" are more consistent.
Before there were more apps and often different between reboots, now both name the culprit as udisks2.service.
Does anybody know what can be done here?
I'm sorry, I time-shifted from June '22 with no help. Should've added that.
mikeflan
Level 17
Level 17
Posts: 7159
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: Desktop Slow to Launch on Startup

Post by mikeflan »

From the inxi output:
Drives:
Local Storage: total: 465.76 GiB used: 513.65 GiB (110.3%)
Hmm, OK. :?
Prince of Heck
Level 1
Level 1
Posts: 40
Joined: Sun Jul 19, 2020 9:13 am

Re: Desktop Slow to Launch on Startup

Post by Prince of Heck »

mikeflan wrote: Wed Feb 08, 2023 10:36 pm From the inxi output:
Drives:
Local Storage: total: 465.76 GiB used: 513.65 GiB (110.3%)
Hmm, OK. :?

Code: Select all

:~$ df -h
Filesystem                 Size  Used Avail Use% Mounted on
udev                        16G     0   16G   0% /dev
tmpfs                      3.2G  1.9M  3.2G   1% /run
/dev/mapper/mint--vg-root  456G  257G  176G  60% /
tmpfs                       16G  184M   16G   2% /dev/shm
tmpfs                      5.0M  4.0K  5.0M   1% /run/lock
tmpfs                       16G     0   16G   0% /sys/fs/cgroup
/dev/nvme0n1p2             704M  435M  218M  67% /boot
/dev/nvme0n1p1             511M  6.1M  505M   2% /boot/efi
tmpfs                      3.2G   32K  3.2G   1% /run/user/1000
/home/USER/.Private         456G  257G  176G  60% /home/ken
Prince of Heck
Level 1
Level 1
Posts: 40
Joined: Sun Jul 19, 2020 9:13 am

Re: [SOLVED] Desktop Slow to Launch on Startup

Post by Prince of Heck »

It looks like merging usr...

Code: Select all

sudo apt install usrmerge
...and updating to 20.3 resolved the issue. I'm not sure which did it because I performed both at the same time.
Locked

Return to “MATE”