Any trick to make any existing distro boot extremely fast to GUI ?

Post Reply
att2
Posts: 75
Joined: Tue Jan 17, 2017 10:56 pm
languages_spoken: english, german
ODROIDs: Odroid C2, Odroid C4 Also : Bananapi, Orangepi, Raspi3
Location: Graz, Austria, Europe
Has thanked: 9 times
Been thanked: 8 times
Contact:

Any trick to make any existing distro boot extremely fast to GUI ?

Post by att2 »

Hello,
I would like to know if I can speed up the booting time until the GUI is displayed for an Odroid-C4.
I am trying out every distro, the tinier the better, but even OpenELEC needs like 25 seconds to boot until it is ready.
Currently my best bet seems to be to use debian-buster-server-odroidc4-20210301.img.xz 117.927.164 bytes ; but it still needs 12 seconds until the text login appears. And I have not even installed the GUI yet.

I am aware there are special distributions and systems that have an extremely fast booting image, but that image is often the result of a long, painful process and a steep learning curve ; I am talking about "yocto".

If you have good tips on how to get to the GUI really fast, please let me know. I am also aware that there is "TinyCoreLinux", but so far, nobody ported it to Odroid-C4 (which would be awesome).

The problem is we are developing a custom device that is often switched on and off, and a slow boot time seriously hampers the users' experience. Any help in getting a really fast booting experience?

crashoverride
Posts: 5521
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 490 times
Contact:

Re: Any trick to make any existing distro boot extremely fast to GUI ?

Post by crashoverride »

I am actually looking into this too except on N2. So far I have discovered that a significant amount of time is spent in uboot. Then, another substantial amount of time is spent initialing the kernel. I suspect both may be related to the amount of diagnostic messages output during the process. These messages go out the UART console port which is a low speed device.

I plan to:
1) Investigate silencing the messages to see if boot time is meaningfully affected.
2) Remove any unnecessary uboot processing. The HDMI EDID routines seem to be a prime target for this.

chewitt
Posts: 158
Joined: Mon Aug 12, 2019 12:27 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 122 times
Contact:

Re: Any trick to make any existing distro boot extremely fast to GUI ?

Post by chewitt »

N2PLUS:~ # systemd-analyze
Startup finished in 2.402s (kernel) + 5.082s (userspace) = 7.484s
kodi.target reached after 5.076s in userspace

VIM2:~ # systemd-analyze
Startup finished in 4.721s (kernel) + 7.311s (userspace) = 12.033s
kodi.target reached after 7.310s in userspace

WP2:~ # systemd-analyze
Startup finished in 3.425s (kernel) + 7.958s (userspace) = 11.384s
kodi.target reached after 7.957s in userspace

^ Those are from S922X, S912, S905 boards I'm fiddling with at the moment (no overclocks) and I normally see another 5 seconds from reaching kodi.target to seeing the home-screen on-screen. There are generally two things needed for fast booting: a) build more kernel modules with =m so the kernel can be more asynchronous about how things are probed and loaded, and b) run less, as less stuff to execute takes less time to execute.

The current record for LE images is a custom one for WeTek Play2 (S905) on the 3.14 kernel, which had an ultra-minimal kernel and software set (Kodi + TVheadend + 1x screensaver) with a total image size of 35MB and kodi.target being reached in about 5 seconds. Bootlin have some good articles and slide-sets on reducing boot times if you Google them, and they present regularly at Linux Foundation events (Embedded Linux Conference) and similar like Kernel Plumbers, Kernel Recipies.

User avatar
mctom
Posts: 980
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 102 times
Been thanked: 123 times
Contact:

Re: Any trick to make any existing distro boot extremely fast to GUI ?

Post by mctom »

How about dirty Windows tricks like hibernating instead of shutting down? Would that count as well?
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

att2
Posts: 75
Joined: Tue Jan 17, 2017 10:56 pm
languages_spoken: english, german
ODROIDs: Odroid C2, Odroid C4 Also : Bananapi, Orangepi, Raspi3
Location: Graz, Austria, Europe
Has thanked: 9 times
Been thanked: 8 times
Contact:

Re: Any trick to make any existing distro boot extremely fast to GUI ?

Post by att2 »

Hibernating would be nice! Tell me how to implement this !

User avatar
mctom
Posts: 980
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 102 times
Been thanked: 123 times
Contact:

Re: Any trick to make any existing distro boot extremely fast to GUI ?

Post by mctom »

I don't know much about this. All I know is that you'd need more swap space than the physical RAM size, so the RAM contents may be saved to HDD.

Here's Arch Wiki entry on hibernation: https://wiki.archlinux.org/title/Power_ ... ibernation

Note Arch Linux is different than Ubuntu and pals, but the general idea should be the same across all Linux flavors. Just be mindful of the possible differences. I use Arch Wiki even despite that, is usually more comprehensive than a random article online.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
tobetter
Posts: 8896
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 521 times
Been thanked: 1421 times
Contact:

Re: Any trick to make any existing distro boot extremely fast to GUI ?

Post by tobetter »

@att2, which OS are you going to play with and which desktop/UI?

att2
Posts: 75
Joined: Tue Jan 17, 2017 10:56 pm
languages_spoken: english, german
ODROIDs: Odroid C2, Odroid C4 Also : Bananapi, Orangepi, Raspi3
Location: Graz, Austria, Europe
Has thanked: 9 times
Been thanked: 8 times
Contact:

Re: Any trick to make any existing distro boot extremely fast to GUI ?

Post by att2 »

Hi @tobetter , I am open for any suggestions which OS and which GUI to use. All I need is that it boots faaaaaaaaaaaast.
If you have any kind advice for me, and if you can suggest a particular OS including download link, that would be great. Thanks!

User avatar
tobetter
Posts: 8896
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 521 times
Been thanked: 1421 times
Contact:

Re: Any trick to make any existing distro boot extremely fast to GUI ?

Post by tobetter »

att2 wrote:
Thu Jan 13, 2022 11:04 pm
Hi @tobetter , I am open for any suggestions which OS and which GUI to use. All I need is that it boots faaaaaaaaaaaast.
If you have any kind advice for me, and if you can suggest a particular OS including download link, that would be great. Thanks!
Not much idea as of now, I wonder what kind of application will run on ODROID-C4 and also curious if it's based on a browser or a certain framework like Qt.

att2
Posts: 75
Joined: Tue Jan 17, 2017 10:56 pm
languages_spoken: english, german
ODROIDs: Odroid C2, Odroid C4 Also : Bananapi, Orangepi, Raspi3
Location: Graz, Austria, Europe
Has thanked: 9 times
Been thanked: 8 times
Contact:

Re: Any trick to make any existing distro boot extremely fast to GUI ?

Post by att2 »

@tobetter - not based on any browser... some hand-crafted, very special measurement device control software that communicates an awful lot over highspeed serial lines with some sensors and displays sensor data.

User avatar
tobetter
Posts: 8896
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 521 times
Been thanked: 1421 times
Contact:

Re: Any trick to make any existing distro boot extremely fast to GUI ?

Post by tobetter »

att2 wrote:
Fri Jan 14, 2022 8:56 am
@tobetter - not based on any browser... some hand-crafted, very special measurement device control software that communicates an awful lot over highspeed serial lines with some sensors and displays sensor data.
Which GUI framework are you willing to use and what's the display resolution? Why keep asking about GUI framework is that you must be having working application already or you need to learn a new framework, it's absolutely depends on how the UX of your application is complicated as you know. Would it be possible to use even SDL or DirectFB?

att2
Posts: 75
Joined: Tue Jan 17, 2017 10:56 pm
languages_spoken: english, german
ODROIDs: Odroid C2, Odroid C4 Also : Bananapi, Orangepi, Raspi3
Location: Graz, Austria, Europe
Has thanked: 9 times
Been thanked: 8 times
Contact:

Re: Any trick to make any existing distro boot extremely fast to GUI ?

Post by att2 »

@tobetter - currently we use Lazarus/FreePascal in a VM to cross-compile to Odroid C4; we use whatever widgets Lazarus gives us, i.e. GTK2.
SDL/DirectFB is probably not an option, since other programs are also called and these other programs simply use the current LXDE or Openbox WM.
Fixed screen resolution of the touch screen is 1024x600. Any suggestions ?

User avatar
tobetter
Posts: 8896
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 521 times
Been thanked: 1421 times
Contact:

Re: Any trick to make any existing distro boot extremely fast to GUI ?

Post by tobetter »

att2 wrote:
Fri Jan 14, 2022 6:41 pm
@tobetter - currently we use Lazarus/FreePascal in a VM to cross-compile to Odroid C4; we use whatever widgets Lazarus gives us, i.e. GTK2.
SDL/DirectFB is probably not an option, since other programs are also called and these other programs simply use the current LXDE or Openbox WM.
Fixed screen resolution of the touch screen is 1024x600. Any suggestions ?
Thanks for the info, I was curious what components I need to test for your use. :)
I am not sure whether I can make it boot faster but...I am also curious how much C4 can boot up for specific case.

User avatar
mad_ady
Posts: 10155
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 632 times
Been thanked: 817 times
Contact:

Re: Any trick to make any existing distro boot extremely fast to GUI ?

Post by mad_ady »

@att2 what does systemd-analyze show in your case? And systemd-analyze blame

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 2 guests