suggestions for debugging slow logout/shutdown

Archived topics about LMDE 1 and LMDE 2
Locked
wilo108

suggestions for debugging slow logout/shutdown

Post by wilo108 »

Hi folks,

my new installation of LMDE (64bit, Cinnamon) is painfully slow to logout and shutdown. it's lovely and snappy to start and very responsive (and I love it to bits), and generally noticeably faster than the Mint 15 Olivia installation I was using on the same laptop previously. the Mint 15 installation would logout and shutdown considerably faster, though.

i am hoping someone here might be able to offer some suggestions as to how to profile/debug the logout and shutdown process so that I can try to work out what's causing the problem. i've not found anything obviously relevant in the log files i've checked, and while the internet has lots of articles about debugging systemd, i can't find anything specific about doing the same with sysvinit. but i think Cinnamon might be the bigger problem anyway. after clicking shutdown on the Cinnamon menu, my desktop and panel icons all revert to gnome defaults, and then i get to look at that for somewhere between 10 and 20 seconds (sometimes longer), before the plymouth splash appears.

if anyone can suggest what might be causing this problem, or where i might look for clues, i will be very grateful!

thanks!

wilo
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
gtsfer

Re: suggestions for debugging slow logout/shutdown

Post by gtsfer »

I'm not sure where to start but this doesn't seem normal. Shutdown is generally really fast on Linux Mint (I had 15 installed before) and it's just terrific on LMDE.

I don't see any of what you're describing on my system. Complete shutdown takes way under 10 seconds on my 5 year old Dell dual core 2.8 Ghz machine. You've looked at the right things for starters so somebody more guru-ish needs to jump in to diagnose this.

You said it's a new install. And that it was faster to shutdown with v15 Olivia. Can you look at your filesystems, see if they appear as expected (like ext 4 or whatever in Gparted or whatever)? It sounds like a flakey install especially if it was faster before w v15 too.
wilo108

Re: suggestions for debugging slow logout/shutdown

Post by wilo108 »

hi gtsfer, thanks for the response. indeed, i don't think this is normal, which is why i'd like to try to identify the culprit. i do have a number of (relatively) uncommon services installed, including MySQL and PostgreSQL, redis, nginx, and so on. most of these are not running all the time though (`update-rc.d -f <service> remove`). systemd has a way of profiling the shutdown sequence, but i don't think there's anything similar for sysvinit. and i'm not even sure this is where the problem is.
gtsfer

Re: suggestions for debugging slow logout/shutdown

Post by gtsfer »

I've got a few uncommon services running too, no problems. Do you remember if it was this way right after the install? Or if it got this way later on in time.

See if somebody else picks up on your post after a day or so. If not maybe we can call attention to it with some heavy hitters on the forums. I've seen guys with 1500 or more posts. One even with 21,000 = a level 21. These guys are actively involved on here. I kind of a newbie trying to learn by helping w what little I know.
wilo108

Re: suggestions for debugging slow logout/shutdown

Post by wilo108 »

just to see if it would make a difference, i removed sysvinit and installed systemd, and while it's made the startup and shutdown quicker, i still have the 10-20 seconds hang logging out of Cinnamon :( I also installed the new beta version of MDM (1.5.1+lmde) to see if that would help, but alas no... :( still hoping to get some pointers!
gtsfer

Re: suggestions for debugging slow logout/shutdown

Post by gtsfer »

That's still way too slow. Something is afoot. It's Saturday and your post is up top there in the "new" ones. Let's wait a bit and see if a guru bites on this.

Bingo! Listen to this guy kurotsugi. He's a level 5. I'm a lowly newbie. :oops:
Last edited by gtsfer on Sat Mar 15, 2014 1:09 pm, edited 1 time in total.
kurotsugi

Re: suggestions for debugging slow logout/shutdown

Post by kurotsugi »

if you have systemd, we can start with

Code: Select all

systemd-analyze blame
systemd-analyze critical-chain

you can also see the bootlog in /var/log to investigate further
wilo108

Re: suggestions for debugging slow logout/shutdown

Post by wilo108 »

thanks folks. as I mentioned, i removed `sysvinit` in favour of `systemd`, and that's gone well. `systemd-analyze` reports a very reasonable time:

Code: Select all

Startup finished in 6.196s (kernel) + 5.855s (userspace) = 12.052s
`systemd-analyze critical-chain` looks like this:

Code: Select all

graphical.target @5.850s
└─multi-user.target @5.850s
  └─psd.service @2.585s +3.265s
    └─basic.target @2.580s
      └─sockets.target @2.580s
        └─dbus.socket @2.580s
          └─sysinit.target @2.578s
            └─mintsystem.service @1.676s +902ms
              └─dbus.service @2.957s
                └─basic.target @2.580s
                  └─...
so no problems there.

The issue seems to be with Cinnamon somewhere, but I'm not sure where, or how to go about tracking it down. ~/.xsession-errors doesn't contain anything useful or relevant, I think.
kurotsugi

Re: suggestions for debugging slow logout/shutdown

Post by kurotsugi »

I see :3
the problem is on cinnamon. using newest mdm won't solve the problem. the solution will be to not use cinnamon at all.
gtsfer

Re: suggestions for debugging slow logout/shutdown

Post by gtsfer »

I'm curious then. Are you saying Cinnamon is inherently slower than Mate in this way sometimes? I run LMDE Mate 64 myself. But I'll stay away from Cinnamon in the future if this is the case.
kurotsugi

Re: suggestions for debugging slow logout/shutdown

Post by kurotsugi »

@wilo108: I forget to tell you that we can make systemd load the system faster by activating readahead mechanism. in my case my boot time was decreased by ~10 seconds. :3
@gtsfer: the DE itself is quite fast but it takes long time to load the DE on boot. the culprit is actually muffin and hw accelerated rendering mode. you can get a faster load by using software rendering mode but it might not the solution you wanted for. anyway, since you're using mate it means you have different problem with wilo108. you'll need to debug your system to find the culprit. I believe there was a tool called bootchart to analyze boot process on sysvinit.
wilo108

Re: suggestions for debugging slow logout/shutdown

Post by wilo108 »

@kurotsugi -- yes, I used readahead as a matter of course on any system i install.

as far as Cinnamon goes, let me reiterate to make sure i'm clear: there is no problem for me with Cinnamon load time (and never has been since 1.4). i currently have a specific issue on this LMDE install with the Cinnamon logout / shutdown time that I'm looking to debug. i've never had this problem with Cinnamon before (on LMDE or on LM14, 15, 16) -- in fact, my partner is currently running Cinnamon on LM16 and the shutdown time is really remarkably fast (which is one reason why i'm trying to do something about this: a) i know there is no good reason why it should have to be so slow; and b) i'm jealous of her shutdown times!).

My suspicion is that it's to do with some settings or addons (applets or themes) that i'm using, or something along those lines. i'll begin the tedious process of methodically and systematically disabling things one-by-one, and trying to isolate the culprit. i had hoped that there might be a less tedious and more targeted way of narrowing down the issue.

thanks!
gtsfer

Re: suggestions for debugging slow logout/shutdown

Post by gtsfer »

Thanks...
kurotsugi wrote:@gtsfer: the DE itself is quite fast but it takes long time to load the DE on boot. the culprit is actually muffin and hw accelerated rendering mode. you can get a faster load by using software rendering mode but it might not the solution you wanted for. anyway, since you're using mate it means you have different problem with wilo108. you'll need to debug your system to find the culprit. I believe there was a tool called bootchart to analyze boot process on sysvinit.
But my system doesn't have this problem. :) My boot up time is fine. And shutdown takes about 7 seconds. I'm going to look at "bootchart" just so I can learn more about the process.
jewnersey

Re: suggestions for debugging slow logout/shutdown

Post by jewnersey »

have you made any progress on this?

I am experiencing the same issue (10 second boot time from cold, 25+ seconds to logout/shutdown)
reference2myself

Re: suggestions for debugging slow logout/shutdown

Post by reference2myself »

I've experienced this problem at times too. It wasn't every time for me, but on occasion when I would try to log out or shut down it would hang for a minute before it did anything. I'm currently not seeing that problem after updating to betsy with cinnamon 2.4.3 (not recommended for the inexperienced) so hopefully when LMDE 2 is out it will no longer be an issue for people. I always suspected it was a problem with some service not shutting down right away.
kurotsugi

Re: suggestions for debugging slow logout/shutdown

Post by kurotsugi »

there is some missing post in this thread. please allow me explain. the boot time, showed by 'systemd-analyze time' is different with the times needed to load cinnamon. we don't have problem with cinnamon in mint main version but we do have some problem with cinnamon in LMDE. there was a bug in muffin which makes cinnamon on LMDE take longer time to load. this issue IIRC is introduced on cinnamon 1.6 and theorically it should have been fixed on current newest cinnamon. it's exactly the reason why newest cinnamon doesn't have this problem
I'm currently not seeing that problem after updating to betsy with cinnamon 2.4.3
since you're on LMDE your solution is:

1. build your own cinnamon 2.4 on current UP.
2. ask mint team to provide an UP with newest cinnamon.
3. don't use cinnamon.

the bad news, (1) no one can guarantee cinnamon 2.4 could work on current UP. the development gap between current UP and the GTK version needed to build cinnamon is quite wide. (2) you won't get any updates - bug fixes - nor security updates on LMDE since mint team officially won't provide system maintenance to this distro until jessie becomes stable. there won't be next UP since mint team insisted to left LMDE user with their problem. your last choice, if you insisted using LMDE and avoid this issue is "don't use cinnamon".
py-thon

Re: suggestions for debugging slow logout/shutdown

Post by py-thon »

kurotsugi wrote:if you insisted using LMDE and avoid this issue is "don't use cinnamon".
Even though I don't use Cinnamon I would consider this step somewhat drastic to avoid a 10 to 20 second delay on shutdown :D
kurotsugi

Re: suggestions for debugging slow logout/shutdown

Post by kurotsugi »

well...there're reasons why I give alternatives instead of one solution, and I deliberately put it as the last option. he can choose one of the proposed solution based on his needs, and the last solution also doesn't means that he should _permanently_ not using cinnamon. it's just just a termporary solution to avoid the issue. when lmde receives newer cinnamon this issue will get resolved, and he can use cinnamon again :3
kpatient

Re: suggestions for debugging slow logout/shutdown

Post by kpatient »

Bit late to the party, however this might be a simpler solution for people encountering the same problem.

I've found that using the bash command

Code: Select all

shutdown -h now
turns my machine off in less than 2 seconds. Maybe you could make a script with this instead.
Locked

Return to “LMDE Archive”