Solved Resourses to troubleshoot the DE

Solved issue

Danbor

Active Member
Joined
Aug 1, 2023
Messages
222
Reaction score
113
Credits
2,420
I'm running Mint Cinnamon 22.3. I'm trying to troubleshoot why Cinnamon is taking up to 3 minutes to load. The machine boots just fine, but after entering my password, it takes a long time to load the DE. It displays a black screen with a movable mouse pointer while doing whatever it does to load.
Can someone supply me a list of commands, or another way to troubleshoot this problem?
I can find lots of information on troubleshooting boot issues, but troubleshooting the desktop loading process, not so much.
 


In Terminal:

Code:
systemd-analyze blame

When it shows results, click on Edit, then select all, Edit again, then Copy

Paste the results back here. If the results are too long, usually the first 15 - 20 lines will be enough
 
If you want a better idea of the boot process time,

Code:
systemd-analyze
 
Later, after the current problem is fixed, take a read of the link below.

It adds more complexity than we need here (hopefully)

 
Are you using a HDD or SSD ?

I'm using an SSD...when I type my password and hit Enter...it takes 3 to 4 seconds to the Desktop.
1776902843779.gif


From memory...HDDs take longer to boot...mine took 18/20 seconds from the password to the Desktop but the HDD was good...I'd be looking at the Drive.
1776903299584.gif
 
Here is the output

dan@main01:~$ systemd-analyze blame
2min 41.269s apt-daily.service
14.203s plocate-updatedb.service
5.457s NetworkManager-wait-online.service
2.051s systemd-udev-settle.service
1.380s zfs-load-module.service
1.152s NetworkManager.service
810ms vboxdrv.service
535ms fwupd.service
321ms apt-daily-upgrade.service
225ms man-db.service
193ms dev-nvme0n1p2.device
154ms blueman-mechanism.service
132ms [email protected]
132ms systemd-udev-trigger.service
116ms cups.service
104ms udisks2.service
90ms upower.service
78ms gpu-manager.service
77ms accounts-daemon.service
73ms lvm2-monitor.service
72ms rsyslog.service
65ms systemd-journal-flush.service
63ms systemd-journald.service
lines 1-23
 
Are you using a HDD or SSD ?

I'm using an SSD...when I type my password and hit Enter...it takes 3 to 4 seconds to the Desktop. View attachment 31523

From memory...HDDs take longer to boot...mine took 18/20 seconds from the password to the Desktop but the HDD was good...I'd be looking at the Drive. View attachment 31524
Using SSD. It used to boot that quickly. No idea what changed. No new hardware, no new application installs.
 
Using SSD. It used to boot that quickly. No idea what changed. No new hardware, no new application installs.

My Samsung 500GB (main SSD) is 7 years old...did you optimise your SSD to run more efficiently...do you run the Trim command at least once a week. ?
Do you have at least 20% of free Disk space at all times ?

Have a look at this...
https://easylinuxtipsproject.blogspot.com/p/ssd.html
1776905110017.gif
 
Do you have automatic Updates enabled ?
 
I have Trim set to run daily but I run the Trim command once a week...
1776905557588.png


I have two partitions on my main SSD...Boot and Root...the Trim command works on both. I also created a Dev rule..so I can Trim my portable SSDs...
1776906101690.png


Hope this helps.
1776906205928.gif
 
This unit has 2 1TB SSDs Neither of them are over 50% full. Niver heard of the trim command, or any command to optomize an SSD, I bulit this computer a few years ago but this issue just recently cropped up.
As for updates, it's set to refresh the update list automatically. But I have to authorize the actual update installation.
 
As for updates, it's set to refresh the update list automatically. But I have to authorize the actual update installation.
Go to update manager and disable auto updates.

Then reboot and tell me if there is a difference in time taken
 
Ran the trim command, following is the output

[sudo] password for dan:
/home/dan/data02: 417.5 GiB (448240611328 bytes) trimmed on /dev/nvme1n1p2
/home/dan/data01: 191.6 GiB (205739663360 bytes) trimmed on /dev/nvme1n1p1
/boot/efi: 86.4 MiB (90633728 bytes) trimmed on /dev/nvme0n1p1
/home: 622.7 GiB (668616974336 bytes) trimmed on /dev/nvme0n1p4
/: 167.8 GiB (180219678720 bytes) trimmed on /dev/nvme0n1p2

Disabling auto updates now. Will reboot and return here afterward.
 
Disabled auto updates and rebooted, From hitting enter after password to desktop visability, 2 minutes 15 seconds.
 
This unit has 2 1TB SSDs Neither of them are over 50% full. Niver heard of the trim command, or any command to optomize an SSD,
Might be time to look into optimising your SSDs...especially Trim.

I optimised my SSDs when I first got them because I wanted them to last trouble free for many years.
1776907918023.gif
 
Last edited:
have you tried restarting cinnamon ?

On a blank desktop, right click and select restart cinnamon. Hit enter. No need to reboot.
 
G'day all, I'll throw in my two cents. :)

Dan, from your output at #6, and from your

From hitting enter after password to desktop visability, 2 minutes 15 seconds.

...it appears to me that

2min 41.269s apt-daily.service

...is the culprit. Let's look at that.

I am currently in Linux Mint 22.3 'Zena' Cinnamon, which may be the same as you.

If I run

Code:
systemctl status apt-daily.service

I get

Code:
○ apt-daily.service - Daily apt download activities
     Loaded: loaded (/usr/lib/systemd/system/apt-daily.service; static)
     Active: inactive (dead)
TriggeredBy: ● apt-daily.timer
       Docs: man:apt(8)

I have done nothing to change the service since install, so to my min this should be the default. You may or may not have done something with Mint's Update Manager, or something else has modified the behaviour that I cannot guess, but one or another of our boffins may have an idea (I am thinking @dos2unix and @osprey , lol).

BTW you can also perhaps get more information which may be listed further on in the

systemd-analyze blame

output, with

Code:
systemd-analyze blame | grep apt-daily

I can likely tell you how to get a better result.

First, take a Timeshift snapshot, so you can roll back if something heads south for the winter.

Then run both of

Code:
sudo systemctl disable apt-daily.timer
sudo systemctl disable apt-daily.service

Following completion of that, reboot, see if performance improves, and report back here.

Cheers

Chris
 
have you tried restarting cinnamon ?

On a blank desktop, right click and select restart cinnamon. Hit enter. No need to reboot.
Just tried this, no joy. However, I did mange to learn how to add "restart cinnamon" to the desktop right click menu. So still a positive learning experience!
 
G'day all, I'll throw in my two cents. :)

Dan, from your output at #6, and from your



...it appears to me that

2min 41.269s apt-daily.service

...is the culprit. Let's look at that.

I am currently in Linux Mint 22.3 'Zena' Cinnamon, which may be the same as you.

If I run

Code:
systemctl status apt-daily.service

I get

Code:
○ apt-daily.service - Daily apt download activities
     Loaded: loaded (/usr/lib/systemd/system/apt-daily.service; static)
     Active: inactive (dead)
TriggeredBy: ● apt-daily.timer
       Docs: man:apt(8)

I have done nothing to change the service since install, so to my min this should be the default. You may or may not have done something with Mint's Update Manager, or something else has modified the behaviour that I cannot guess, but one or another of our boffins may have an idea (I am thinking @dos2unix and @osprey , lol).

BTW you can also perhaps get more information which may be listed further on in the

systemd-analyze blame

output, with

Code:
systemd-analyze blame | grep apt-daily

I can likely tell you how to get a better result.

First, take a Timeshift snapshot, so you can roll back if something heads south for the winter.

Then run both of

Code:
sudo systemctl disable apt-daily.timer
sudo systemctl disable apt-daily.service

Following completion of that, reboot, see if performance improves, and report back here.

Cheers

Chris
Still taking @ 2.25 minutes from password to desktop.
I ran systemd-analyze blame again. output follows.

dan@main01:~$ systemd-analyze blame
5.467s NetworkManager-wait-online.service
2.060s systemd-udev-settle.service
1.453s zfs-load-module.service
1.183s NetworkManager.service
831ms vboxdrv.service
187ms dev-nvme1n1p2.device
170ms blueman-mechanism.service
145ms [email protected]
137ms udisks2.service
135ms systemd-udev-trigger.service
118ms cups.service
91ms upower.service
89ms accounts-daemon.service
83ms gpu-manager.service
78ms rsyslog.service
76ms power-profiles-daemon.service
74ms polkit.service
70ms systemd-journal-flush.service
69ms lvm2-monitor.service
67ms systemd-journald.service
62ms lm-sensors.service
61ms ubuntu-system-adjustments.service
58ms update-notifier-download.service
lines 1-23

The apt-daily.service line is gone. But alas, the load time is still troubling.
Off to slumbertime for now. Have to get a cat scan or mri tomorrow, ( I can't remember which it is). Annual check of the artificial aorta. Don't need any leaks ya know. ;)
 
I'm running Mint Cinnamon 22.3. I'm trying to troubleshoot why Cinnamon is taking up to 3 minutes to load. The machine boots just fine, but after entering my password, it takes a long time to load the DE. It displays a black screen with a movable mouse pointer while doing whatever it does to load.
Can someone supply me a list of commands, or another way to troubleshoot this problem?
I can find lots of information on troubleshooting boot issues, but troubleshooting the desktop loading process, not so much.
As I understand the problem, the time for Cinnamon to load is the problem, not the booting up to the point where the display manager login prompt appears where you enter your password.

If that is the case, the systemd-analyze blame is not able to help you because it is a measure of the time taken to get to the graphical-user.target, not beyond that point. So, in other words, it provides times for the booting of the systemd-units to get the system to the point where you can login. It doesn't measure your user session startup after login that brings up the Cinnamon Desktop Environment.

If you look at the whole output of the systemd-analyze blame command you're likely to find that it only starts the systemd-logind.service, but nothing further which may be related to Cinnamon.

It may be reasonable thus, to look at everything that Cinnamon starts to see if there's a time sapping app in there somewhere. Not running Cinnamon here, I can't say anything useful about that at the moment.

Edit: accessing my notes I notice that there is another command which may or may not be useful:
Code:
systemd-analyze --user blame
This command will measure systemd units started by the user. It's worth checking the output of this command to see if it has excessive times for the user's units' startups, but it still may not be that useful in relation to Cinnamon because a desktop like Cinnamon just starts up heaps of apps.
 
Last edited:


Follow Linux.org

Staff online

Members online


Top