User avatar
Botspot
Posts: 333
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas

Why does shutdown dialog take so long to load?

Tue Jan 14, 2020 5:26 pm

Latest Raspbian Buster.

When running from a HDD, it takes nearly a minute for the shutdown dialog to load after clicking the button in the menu.
When running on a Sandisk Extreme Pro, it takes nearly 10 seconds. Chromium opens faster than the shutdown dialog in both cases.

Why?
I would think the shutdown dialog would be very lightweight, maybe 1 MB to load the GUI. But obviously not, and I'm curious as to why.
Ever wanted to run an .img file before flashing it to an SD card?
Or wished you could run Stretch on a Pi 4?
Or wanted to run two versions of Raspbian on a single Pi simultaneously?
You can do all of that, and more, with my Vdesktop script - https://bit.ly/2GeNuIw

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5284
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Why does shutdown dialog take so long to load?

Tue Jan 14, 2020 10:35 pm

Botspot wrote:
Tue Jan 14, 2020 5:26 pm
Latest Raspbian Buster.

When running from a HDD, it takes nearly a minute for the shutdown dialog to load after clicking the button in the menu.
When running on a Sandisk Extreme Pro, it takes nearly 10 seconds. Chromium opens faster than the shutdown dialog in both cases.

Why?
I would think the shutdown dialog would be very lightweight, maybe 1 MB to load the GUI. But obviously not, and I'm curious as to why.
Something's not quite right - I'm using fairly basic 32Gb uSDHC cards** in my P4B's and the Shutdown Options pop up does so in < 1sec. (NB. Since I normally don't boot direct to desktop I prefer to "Exit to command line" and then "sudo shutdown -h now" - gives me bit more time to ensure I can watch for the final PWR/ACT led sequence before, physically, removing power - those leds are not so easy to see through a suitable slot in two of the cases.)
Trev.
** AH - AK shown here: https://www.cpmspectrepi.uk/raspberry_p ... cards.html
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, A+ and a B2) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

User avatar
Botspot
Posts: 333
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas

Re: Why does shutdown dialog take so long to load?

Thu Jan 16, 2020 1:22 pm

FTrevorGowen wrote:
Tue Jan 14, 2020 10:35 pm
Something's not quite right - I'm using fairly basic 32Gb uSDHC cards** in my P4B's and the Shutdown Options pop up does so in < 1sec.
It's a genuine Sandisk, I ordered it directly from their website.

My Shutdown Options takes approximately as long to load as Chromium.
Chromium takes 6-10 seconds. Shutdown Options takes 6-10 seconds.
Ever wanted to run an .img file before flashing it to an SD card?
Or wished you could run Stretch on a Pi 4?
Or wanted to run two versions of Raspbian on a single Pi simultaneously?
You can do all of that, and more, with my Vdesktop script - https://bit.ly/2GeNuIw

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5284
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Why does shutdown dialog take so long to load?

Thu Jan 16, 2020 1:29 pm

Botspot wrote:
Thu Jan 16, 2020 1:22 pm
FTrevorGowen wrote:
Tue Jan 14, 2020 10:35 pm
Something's not quite right - I'm using fairly basic 32Gb uSDHC cards** in my P4B's and the Shutdown Options pop up does so in < 1sec.
It's a genuine Sandisk, I ordered it directly from their website.

My Shutdown Options takes approximately as long to load as Chromium.
Chromium takes 6-10 seconds. Shutdown Options takes 6-10 seconds.
Exactly which type of Sandisk (IIRC there's an early P4 thread where it was noted that one "high-performance" Sandisk type actually worked slower in a P4 than its (one model type) lower "brother". A3 vs. A2 or something like that)
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, A+ and a B2) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

User avatar
Botspot
Posts: 333
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas

Re: Why does shutdown dialog take so long to load?

Thu Jan 16, 2020 1:47 pm

FTrevorGowen wrote:
Thu Jan 16, 2020 1:29 pm
Botspot wrote:
Thu Jan 16, 2020 1:22 pm
FTrevorGowen wrote:
Tue Jan 14, 2020 10:35 pm
Something's not quite right - I'm using fairly basic 32Gb uSDHC cards** in my P4B's and the Shutdown Options pop up does so in < 1sec.
It's a genuine Sandisk, I ordered it directly from their website.

My Shutdown Options takes approximately as long to load as Chromium.
Chromium takes 6-10 seconds. Shutdown Options takes 6-10 seconds.
Exactly which type of Sandisk (IIRC there's an early P4 thread where it was noted that one "high-performance" Sandisk type actually worked slower in a P4 than its (one model type) lower "brother". A3 vs. A2 or something like that)
Trev.
I don't think the SD card is an issue. After all, Chromium loads in 8 seconds average!

It is a 64GB SanDisk Extreme Pro A1.
Ever wanted to run an .img file before flashing it to an SD card?
Or wished you could run Stretch on a Pi 4?
Or wanted to run two versions of Raspbian on a single Pi simultaneously?
You can do all of that, and more, with my Vdesktop script - https://bit.ly/2GeNuIw

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24675
Joined: Sat Jul 30, 2011 7:41 pm

Re: Why does shutdown dialog take so long to load?

Thu Jan 16, 2020 3:33 pm

Does it take that long every time? I wonder if it's waiting for a disk sync or similar - they can take a while if you have a lot of cache to save.

What does htop say whilst its happening?

edit: Just tried this with most recent stuff, up in less than 0.5s.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

W. H. Heydt
Posts: 11278
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Why does shutdown dialog take so long to load?

Thu Jan 16, 2020 4:17 pm

FTrevorGowen wrote:
Thu Jan 16, 2020 1:29 pm
Exactly which type of Sandisk (IIRC there's an early P4 thread where it was noted that one "high-performance" Sandisk type actually worked slower in a P4 than its (one model type) lower "brother". A3 vs. A2 or something like that)
Trev.
A2 (slower) vs. A1 (faster). A2 requires specific--proprietary--hardware support that Pis lack.

User avatar
Botspot
Posts: 333
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas

Re: Why does shutdown dialog take so long to load?

Thu Jan 16, 2020 5:20 pm

jamesh wrote:
Thu Jan 16, 2020 3:33 pm
Does it take that long every time? I wonder if it's waiting for a disk sync or similar - they can take a while if you have a lot of cache to save.

What does htop say whilst its happening?

edit: Just tried this with most recent stuff, up in less than 0.5s.
Yes it takes about as long every time. On this SD card on 4B4 latest Buster, it ranges from 7 secs to 5 secs. (My 3B usually took 10 secs)

I agree, likely to be disk related. Back when my 3B ran on a hard drive, I could hear the HDD's reading head rattling all over the place while Shutdown Options was loading.

Sure, I will try htop in a few minutes, once the data is cleared from the cache.
Ever wanted to run an .img file before flashing it to an SD card?
Or wished you could run Stretch on a Pi 4?
Or wanted to run two versions of Raspbian on a single Pi simultaneously?
You can do all of that, and more, with my Vdesktop script - https://bit.ly/2GeNuIw

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24675
Joined: Sat Jul 30, 2011 7:41 pm

Re: Why does shutdown dialog take so long to load?

Thu Jan 16, 2020 5:23 pm

Botspot wrote:
Thu Jan 16, 2020 5:20 pm
jamesh wrote:
Thu Jan 16, 2020 3:33 pm
Does it take that long every time? I wonder if it's waiting for a disk sync or similar - they can take a while if you have a lot of cache to save.

What does htop say whilst its happening?

edit: Just tried this with most recent stuff, up in less than 0.5s.
Yes it takes about as long every time. On this SD card on 4B4 latest Buster, it ranges from 7 secs to 5 secs. (My 3B usually took 10 secs)

I agree, likely to be disk related. Back when my 3B ran on a hard drive, I could hear the HDD's reading head rattling all over the place while Shutdown Options was loading.

Sure, I will try htop in a few minutes, once the data is cleared from the cache.
Well I'm running from a basic 8GB card, and its very quick on that. It is odd.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

User avatar
Botspot
Posts: 333
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas

Re: Why does shutdown dialog take so long to load?

Thu Jan 16, 2020 5:41 pm

jamesh wrote:
Thu Jan 16, 2020 5:23 pm
Botspot wrote:
Thu Jan 16, 2020 5:20 pm
jamesh wrote:
Thu Jan 16, 2020 3:33 pm
Does it take that long every time? I wonder if it's waiting for a disk sync or similar - they can take a while if you have a lot of cache to save.

What does htop say whilst its happening?

edit: Just tried this with most recent stuff, up in less than 0.5s.
Yes it takes about as long every time. On this SD card on 4B4 latest Buster, it ranges from 7 secs to 5 secs. (My 3B usually took 10 secs)

I agree, likely to be disk related. Back when my 3B ran on a hard drive, I could hear the HDD's reading head rattling all over the place while Shutdown Options was loading.

Sure, I will try htop in a few minutes, once the data is cleared from the cache.
Well I'm running from a basic 8GB card, and its very quick on that. It is odd.
I have always had this issue, thought everyone had it. Even Stretch (and Jessie IIRC). In general it takes as long to load the shutdown dialog as it takes chromium to load.

How long does chromium-browser take to cold-start for you?
Ever wanted to run an .img file before flashing it to an SD card?
Or wished you could run Stretch on a Pi 4?
Or wanted to run two versions of Raspbian on a single Pi simultaneously?
You can do all of that, and more, with my Vdesktop script - https://bit.ly/2GeNuIw

GlowInTheDark
Posts: 240
Joined: Sat Nov 09, 2019 12:14 pm

Re: Why does shutdown dialog take so long to load?

Thu Jan 16, 2020 5:44 pm

Why bother?

I just do:

Code: Select all

sudo poweroff
from a terminal window.
Works every time - and quickly.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24675
Joined: Sat Jul 30, 2011 7:41 pm

Re: Why does shutdown dialog take so long to load?

Thu Jan 16, 2020 9:26 pm

GlowInTheDark wrote:
Thu Jan 16, 2020 5:44 pm
Why bother?

I just do:

Code: Select all

sudo poweroff
from a terminal window.
Works every time - and quickly.
Because there is clearly something wrong if its taking that long to start up. And that's probably not the only symptom.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

User avatar
Botspot
Posts: 333
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas

Re: Why does shutdown dialog take so long to load?

Sat Jan 18, 2020 6:37 pm

Strangely
jamesh wrote: What does htop say whilst its happening?
As long as htop is running, Shutdown dialog appears almost instantly. But if I exit htop and wait for a few minuted, it takes a while to open as it did before.
jamesh wrote: And that's probably not the only symptom.
Everything else opens fast, pcmanfm in 0.3 seconds, lxerminal in 0.5 seconds, gpicview in 1 second. I'm going to try a fresh Raspbian install.
Ever wanted to run an .img file before flashing it to an SD card?
Or wished you could run Stretch on a Pi 4?
Or wanted to run two versions of Raspbian on a single Pi simultaneously?
You can do all of that, and more, with my Vdesktop script - https://bit.ly/2GeNuIw

Return to “Beginners”