Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
cluelessgenius

Rasperry Pi 3 - Fastest Boot to Application

Recommended Posts

Posted · Original PosterOP

so im making a smart mirror.

 

original plan was using windows iot on a pi.

 

then i noticed i have no constant power outlet in my bathroom. its all tied to the light switch meaning i only have power when the lights are on.

 

since windows iot is slow af booting up i guess its back to linux

 

im a noob at linux

 

how do i boot straight into an application that needs network/wifi and graphics for dispaying text on screen the fastest way possible?

 

EDIT: since i dont know anything idc if its python , Qt, or what just some easy way to realize a fast booting smart mirror. my thouhgt was on boot up it could even display data from the last time it synchronized (weather and shit) and then update it in the background so the user at least doesnt stare at a blank screen until its done


"I know its stupidly overdone and unreasonably unneccesary but wouldnt it be awesome if ..."

 

CPU: Intel i7 7700k Cooling: Stock cooler (temporary)  MB: ASUS z270i  RAM: G.Skill Trident Z RGB 16GB  GPU: MSI GTX1080 Ti Aero  DISPLAY: LG 34UC88-B 21:9 1440p SSD(OS): Samsung 960 EVO 250GB SSD(Games): Samsung 840 EVO 250GB  HDD(Scratch): WD Blue 500GB HDD(Downloads): WD Blue 320GB HDD(Long-term): WD Green 2TB (external)   PSU: Corsair SF600 Case: Lian Li PC-O11 Dynamic

 

Link to post
Share on other sites
3 hours ago, cluelessgenius said:

EDIT: since i dont know anything idc if its python , Qt, or what just some easy way to realize a fast booting smart mirror. my thouhgt was on boot up it could even display data from the last time it synchronized (weather and shit) and then update it in the background so the user at least doesnt stare at a blank screen until its done

The fastest booting way is probably going to be running your own apps baremetal. That will, of course, require significantly more work.

Barring that, I think there is an RTOS available for Pi. That could be worth looking into, but most RTOSs probably won't have all the features that you're looking for, like internet connection management.


Teacher: Does anyone have a thin ruler?

Students: No.

Teacher: Ok. Does anyone have a nail file.

Students: Why do you need a nail file?
Teacher: I have a staple I need to remove.

Student: Oh. I have a staple remover...

 

People don't want power drills, they want holes.

Link to post
Share on other sites
Posted · Original PosterOP
2 hours ago, straight_stewie said:

The fastest booting way is probably going to be running your own apps baremetal. That will, of course, require significantly more work.

could you elaborate?


"I know its stupidly overdone and unreasonably unneccesary but wouldnt it be awesome if ..."

 

CPU: Intel i7 7700k Cooling: Stock cooler (temporary)  MB: ASUS z270i  RAM: G.Skill Trident Z RGB 16GB  GPU: MSI GTX1080 Ti Aero  DISPLAY: LG 34UC88-B 21:9 1440p SSD(OS): Samsung 960 EVO 250GB SSD(Games): Samsung 840 EVO 250GB  HDD(Scratch): WD Blue 500GB HDD(Downloads): WD Blue 320GB HDD(Long-term): WD Green 2TB (external)   PSU: Corsair SF600 Case: Lian Li PC-O11 Dynamic

 

Link to post
Share on other sites
59 minutes ago, cluelessgenius said:

could you elaborate?

You don't have to have an OS to program a Raspberry Pi, or any computer for that matter.

All you need in this case is the data sheet for the processor, a schematic of the board, and the appropriate C compiler.

It's more advanced because you may not be able to find pre-rolled solutions for internet connectivity, screen display, user input gathering... and will have to build your own solutions for those tasks. Depending on your needs you may even have to fiddle with the bootloader, I'm just not sure exactly what's needed. I know how to program arduinos "bare-metal" (meaning "without an operating system"), and I know it can be done with RPi, but I've never done it with Raspberry Pi's myself.

Unfortunately the A53 processor does not have deep sleep states, so a small battery just to keep it booted in a sleep mode when the wall power is off isn't a feasible solution.


Teacher: Does anyone have a thin ruler?

Students: No.

Teacher: Ok. Does anyone have a nail file.

Students: Why do you need a nail file?
Teacher: I have a staple I need to remove.

Student: Oh. I have a staple remover...

 

People don't want power drills, they want holes.

Link to post
Share on other sites
Posted · Original PosterOP
On 3/11/2019 at 8:38 PM, straight_stewie said:

You don't have to have an OS to program a Raspberry Pi, or any computer for that matter.

All you need in this case is the data sheet for the processor, a schematic of the board, and the appropriate C compiler.

It's more advanced because you may not be able to find pre-rolled solutions for internet connectivity, screen display, user input gathering... and will have to build your own solutions for those tasks. Depending on your needs you may even have to fiddle with the bootloader, I'm just not sure exactly what's needed. I know how to program arduinos "bare-metal" (meaning "without an operating system"), and I know it can be done with RPi, but I've never done it with Raspberry Pi's myself.

Unfortunately the A53 processor does not have deep sleep states, so a small battery just to keep it booted in a sleep mode when the wall power is off isn't a feasible solution.

well thanks but isnt all that a bit overkill. like i know i asked for the fastest way possible but i also mentioned me needing network and display and having not much knowledge in the matter. going bare metall seems a bit like im gonna spend the next 2 years studying this shit before i ever get it running. do you have a more packaged solution for me? 


"I know its stupidly overdone and unreasonably unneccesary but wouldnt it be awesome if ..."

 

CPU: Intel i7 7700k Cooling: Stock cooler (temporary)  MB: ASUS z270i  RAM: G.Skill Trident Z RGB 16GB  GPU: MSI GTX1080 Ti Aero  DISPLAY: LG 34UC88-B 21:9 1440p SSD(OS): Samsung 960 EVO 250GB SSD(Games): Samsung 840 EVO 250GB  HDD(Scratch): WD Blue 500GB HDD(Downloads): WD Blue 320GB HDD(Long-term): WD Green 2TB (external)   PSU: Corsair SF600 Case: Lian Li PC-O11 Dynamic

 

Link to post
Share on other sites
3 hours ago, cluelessgenius said:

do you have a more packaged solution for me?  

I have been able to find one good guide that talks about a solution for fast boot times at length. The blogger claims that following his guide can get you booting into Raspbian in around 4 seconds. The blog post: http://himeshp.blogspot.com/2018/08/fast-boot-with-raspberry-pi.html

However, after that 4 second Raspbian boot time, you will still have to start your smart mirror software.

There is potentially a solution in moving to Arduino. You get the benefits of running "bare metal", but you can still get pre-rolled solutions for wifi/ethernet/screen libraries. These will still be more work than using nice libraries that are available inside of an OS environment, however. I remember reading in the past, many, many years ago, about Arduino smart mirrors. At this time I cannot find any guides of such a thing on the first 4 pages of Google, people seem to like the RPi for that this task these days.


Teacher: Does anyone have a thin ruler?

Students: No.

Teacher: Ok. Does anyone have a nail file.

Students: Why do you need a nail file?
Teacher: I have a staple I need to remove.

Student: Oh. I have a staple remover...

 

People don't want power drills, they want holes.

Link to post
Share on other sites
Posted · Original PosterOP
35 minutes ago, straight_stewie said:

I have been able to find one good guide that talks about a solution for fast boot times at length. The blogger claims that following his guide can get you booting into Raspbian in around 4 seconds. The blog post: http://himeshp.blogspot.com/2018/08/fast-boot-with-raspberry-pi.html

However, after that 4 second Raspbian boot time, you will still have to start your smart mirror software.

There is potentially a solution in moving to Arduino. You get the benefits of running "bare metal", but you can still get pre-rolled solutions for wifi/ethernet/screen libraries. These will still be more work than using nice libraries that are available inside of an OS environment, however. I remember reading in the past, many, many years ago, about Arduino smart mirrors. At this time I cannot find any guides of such a thing on the first 4 pages of Google, people seem to like the RPi for that this task these days.

very interesting and the guide is quite good. 

i really would like to stick with the pi.

i will definitly try following the guide but sadly i do need network and display drivers which i fear will impact quite heavily but ill try and see how fast i can get it. since ssh and usb and all that need to as well i will probably leave ssh on till the very last 


"I know its stupidly overdone and unreasonably unneccesary but wouldnt it be awesome if ..."

 

CPU: Intel i7 7700k Cooling: Stock cooler (temporary)  MB: ASUS z270i  RAM: G.Skill Trident Z RGB 16GB  GPU: MSI GTX1080 Ti Aero  DISPLAY: LG 34UC88-B 21:9 1440p SSD(OS): Samsung 960 EVO 250GB SSD(Games): Samsung 840 EVO 250GB  HDD(Scratch): WD Blue 500GB HDD(Downloads): WD Blue 320GB HDD(Long-term): WD Green 2TB (external)   PSU: Corsair SF600 Case: Lian Li PC-O11 Dynamic

 

Link to post
Share on other sites

you're going to have some issues with power being tied to the switch..

the "unexpected shutdowns" caused by turning the switch off, will very quickly degrade the image on the SD card.

 

 

This has a really good answer that explains the problem.

https://raspberrypi.stackexchange.com/questions/50345/is-it-okay-to-just-pull-the-plug

 

 

one option would be to have the pi plugged into a high capacity power bank. this would allow the pi to not shutdown when you flip the switch. it would just power off the monitor. which will come back up faster after turning the switch on anyways.  

while the switch is off, itll pull small amounts of power from the power bank, to prevent shutdown.

while the switch is on, itll charge your power bank.

 

 

this should also fix your issue with needing it to turn on quickly too, since you only have to wait for the monitor to have power, everything else is already running


How do Reavers clean their spears?

|Specs in profile|

The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Link to post
Share on other sites
Posted · Original PosterOP
1 hour ago, Tsuki said:

you're going to have some issues with power being tied to the switch..

the "unexpected shutdowns" caused by turning the switch off, will very quickly degrade the image on the SD card.

 

 

This has a really good answer that explains the problem.

https://raspberrypi.stackexchange.com/questions/50345/is-it-okay-to-just-pull-the-plug

 

 

one option would be to have the pi plugged into a high capacity power bank. this would allow the pi to not shutdown when you flip the switch. it would just power off the monitor. which will come back up faster after turning the switch on anyways.  

while the switch is off, itll pull small amounts of power from the power bank, to prevent shutdown.

while the switch is on, itll charge your power bank.

 

 

this should also fix your issue with needing it to turn on quickly too, since you only have to wait for the monitor to have power, everything else is already running

thought about that too but the bathroom lights are off more often in day than they are on so i fear the powerbank would discharge faster than it would charge and eventually run out of juice i would need a very quick charging powerbank.


"I know its stupidly overdone and unreasonably unneccesary but wouldnt it be awesome if ..."

 

CPU: Intel i7 7700k Cooling: Stock cooler (temporary)  MB: ASUS z270i  RAM: G.Skill Trident Z RGB 16GB  GPU: MSI GTX1080 Ti Aero  DISPLAY: LG 34UC88-B 21:9 1440p SSD(OS): Samsung 960 EVO 250GB SSD(Games): Samsung 840 EVO 250GB  HDD(Scratch): WD Blue 500GB HDD(Downloads): WD Blue 320GB HDD(Long-term): WD Green 2TB (external)   PSU: Corsair SF600 Case: Lian Li PC-O11 Dynamic

 

Link to post
Share on other sites
57 minutes ago, cluelessgenius said:

thought about that too but the bathroom lights are off more often in day than they are on so i fear the powerbank would discharge faster than it would charge and eventually run out of juice i would need a very quick charging powerbank.

yea thats the issue you're going to have..  with the outlet tied to the switch, its causing issues one way or the other.

unless you want to rewire the outlet.  most likely its setup with 3 wires.  one it always hot, one is ground, and one is switched hot.  cap off the switched hot, and problem solved. just make sure to flip the breaker before messing with it


How do Reavers clean their spears?

|Specs in profile|

The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Link to post
Share on other sites
Posted · Original PosterOP
11 hours ago, Tsuki said:

yea thats the issue you're going to have..  with the outlet tied to the switch, its causing issues one way or the other.

unless you want to rewire the outlet.  most likely its setup with 3 wires.  one it always hot, one is ground, and one is switched hot.  cap off the switched hot, and problem solved. just make sure to flip the breaker before messing with it

actually interesting. i havent tested the 3rd wire yet. i just tested 2 of them and figured the 3rd one is ground or wht would you call it. one power, one ground, one ...you for safety in case of lightning strike or whatever. now that you mention it i will definitly check and make sure. if the other one truly is constant power then this whole topic is obsolete and im staying with windows iot. if not then im still staying with windows iot but will probably try running it on a powerbank 


"I know its stupidly overdone and unreasonably unneccesary but wouldnt it be awesome if ..."

 

CPU: Intel i7 7700k Cooling: Stock cooler (temporary)  MB: ASUS z270i  RAM: G.Skill Trident Z RGB 16GB  GPU: MSI GTX1080 Ti Aero  DISPLAY: LG 34UC88-B 21:9 1440p SSD(OS): Samsung 960 EVO 250GB SSD(Games): Samsung 840 EVO 250GB  HDD(Scratch): WD Blue 500GB HDD(Downloads): WD Blue 320GB HDD(Long-term): WD Green 2TB (external)   PSU: Corsair SF600 Case: Lian Li PC-O11 Dynamic

 

Link to post
Share on other sites

@cluelessgenius What colors are the wires? Depending on the age of the installation it might be brown/blue/black/yellow-green or black/red/gray/white

Either way most sockets will be wired with just 3 yes, but those 3 are live/neutral and ground. And while you are allowed to change the first two. Ground must always be ground. 

Link to post
Share on other sites
Posted · Original PosterOP
22 minutes ago, Dujith said:

@cluelessgenius What colors are the wires? Depending on the age of the installation it might be brown/blue/black/yellow-green or black/red/gray/white

Either way most sockets will be wired with just 3 yes, but those 3 are live/neutral and ground. And while you are allowed to change the first two. Ground must always be ground. 

well im not 100% sure right now but i believe they are black, blue and green


"I know its stupidly overdone and unreasonably unneccesary but wouldnt it be awesome if ..."

 

CPU: Intel i7 7700k Cooling: Stock cooler (temporary)  MB: ASUS z270i  RAM: G.Skill Trident Z RGB 16GB  GPU: MSI GTX1080 Ti Aero  DISPLAY: LG 34UC88-B 21:9 1440p SSD(OS): Samsung 960 EVO 250GB SSD(Games): Samsung 840 EVO 250GB  HDD(Scratch): WD Blue 500GB HDD(Downloads): WD Blue 320GB HDD(Long-term): WD Green 2TB (external)   PSU: Corsair SF600 Case: Lian Li PC-O11 Dynamic

 

Link to post
Share on other sites
4 minutes ago, cluelessgenius said:

well im not 100% sure right now but i believe they are black, blue and green

If you are correct then its modern wiring. Black will be the switched live wire / blue the neutral and green (with a yellow stripe) will be ground.

If you are lucky then there will be a reachable junctionbox where an electrician can attach the black wire to the brown making the socket always live.

Tho without knowing how the wiring is done this is just guess work.

Link to post
Share on other sites
Posted · Original PosterOP
13 minutes ago, Dujith said:

If you are correct then its modern wiring. Black will be the switched live wire / blue the neutral and green (with a yellow stripe) will be ground.

If you are lucky then there will be a reachable junctionbox where an electrician can attach the black wire to the brown making the socket always live.

Tho without knowing how the wiring is done this is just guess work.

isnt black always ground? i will look for a junctionbox but i dont believe there is one. but i do have a fan in there (since theres no window) and i know for sure that thing somehow has constant power so maybe if i take it off the wall ill find something behind it that i could rewire. 

also i can see the warning post coming already. "dont do it yourself let an expert do it" be asured i wont touch it without my dad there. hes pretty handy with that type of stuff.


"I know its stupidly overdone and unreasonably unneccesary but wouldnt it be awesome if ..."

 

CPU: Intel i7 7700k Cooling: Stock cooler (temporary)  MB: ASUS z270i  RAM: G.Skill Trident Z RGB 16GB  GPU: MSI GTX1080 Ti Aero  DISPLAY: LG 34UC88-B 21:9 1440p SSD(OS): Samsung 960 EVO 250GB SSD(Games): Samsung 840 EVO 250GB  HDD(Scratch): WD Blue 500GB HDD(Downloads): WD Blue 320GB HDD(Long-term): WD Green 2TB (external)   PSU: Corsair SF600 Case: Lian Li PC-O11 Dynamic

 

Link to post
Share on other sites
5 minutes ago, cluelessgenius said:

isnt black always ground?

Black is either a switched wire, or one of the phases (live) but never ground.

pre 1970ish i believe ground was grey or red (depending on region in germany) after that it is green with a yellow stripe.

 

Link to post
Share on other sites
Posted · Original PosterOP
1 hour ago, Dujith said:

Black is either a switched wire, or one of the phases (live) but never ground.

pre 1970ish i believe ground was grey or red (depending on region in germany) after that it is green with a yellow stripe.

 

just looked it up. you are right and i probably dont have constant power but i will still look behind that damn fan. i just can believe theres not a single constant power output in the bathroom. like sure its impracticle for this project but its also really dumb for ..ohh idk charging an electric toothbrush or razor or whatever.


"I know its stupidly overdone and unreasonably unneccesary but wouldnt it be awesome if ..."

 

CPU: Intel i7 7700k Cooling: Stock cooler (temporary)  MB: ASUS z270i  RAM: G.Skill Trident Z RGB 16GB  GPU: MSI GTX1080 Ti Aero  DISPLAY: LG 34UC88-B 21:9 1440p SSD(OS): Samsung 960 EVO 250GB SSD(Games): Samsung 840 EVO 250GB  HDD(Scratch): WD Blue 500GB HDD(Downloads): WD Blue 320GB HDD(Long-term): WD Green 2TB (external)   PSU: Corsair SF600 Case: Lian Li PC-O11 Dynamic

 

Link to post
Share on other sites
Posted · Original PosterOP
On ‎3‎/‎13‎/‎2019 at 2:25 PM, straight_stewie said:

I have been able to find one good guide that talks about a solution for fast boot times at length. The blogger claims that following his guide can get you booting into Raspbian in around 4 seconds. The blog post: http://himeshp.blogspot.com/2018/08/fast-boot-with-raspberry-pi.html

However, after that 4 second Raspbian boot time, you will still have to start your smart mirror software.

There is potentially a solution in moving to Arduino. You get the benefits of running "bare metal", but you can still get pre-rolled solutions for wifi/ethernet/screen libraries. These will still be more work than using nice libraries that are available inside of an OS environment, however. I remember reading in the past, many, many years ago, about Arduino smart mirrors. At this time I cannot find any guides of such a thing on the first 4 pages of Google, people seem to like the RPi for that this task these days.

alright so i followed his instructions to some degree (cause i still need networking) and it is pretty fast now but somehow i cant figure out how to make chromium work. id be happy with any webbrowser but most tutorials are for chromium. i thought running without ldxe would keep it somewhat fast but somehow im missing something and chromium just shows a blank.

 

is there no packaged solution that does nothing but start fast and show a defined website?

 


"I know its stupidly overdone and unreasonably unneccesary but wouldnt it be awesome if ..."

 

CPU: Intel i7 7700k Cooling: Stock cooler (temporary)  MB: ASUS z270i  RAM: G.Skill Trident Z RGB 16GB  GPU: MSI GTX1080 Ti Aero  DISPLAY: LG 34UC88-B 21:9 1440p SSD(OS): Samsung 960 EVO 250GB SSD(Games): Samsung 840 EVO 250GB  HDD(Scratch): WD Blue 500GB HDD(Downloads): WD Blue 320GB HDD(Long-term): WD Green 2TB (external)   PSU: Corsair SF600 Case: Lian Li PC-O11 Dynamic

 

Link to post
Share on other sites
58 minutes ago, cluelessgenius said:

is there no packaged solution that does nothing but start fast and show a defined website? 

I doubt it. A modern web browser, even a very simple one, is going to require quite a few different services to function correctly.

Just as a test, close every application and run the command:

sudo apt-get update && sudo apt-get install -f


Then try Chromium again.

 

Otherwise, you can try to get Chromium OS booting fast. It's fairly thin.
 


Teacher: Does anyone have a thin ruler?

Students: No.

Teacher: Ok. Does anyone have a nail file.

Students: Why do you need a nail file?
Teacher: I have a staple I need to remove.

Student: Oh. I have a staple remover...

 

People don't want power drills, they want holes.

Link to post
Share on other sites
Posted · Original PosterOP
7 minutes ago, straight_stewie said:

I doubt it. A modern web browser, even a very simple one, is going to require quite a few different services to function correctly.

Just as a test, close every application and run the command:


sudo apt-get update && sudo apt-get install -f


Then try Chromium again.

 

Otherwise, you can try to get Chromium OS booting fast. It's fairly thin.
 

will try. but im not married to chromium ill anything that displays a very basaic html page. there are ready to use kiosk solutions but non of them concern themselves with boot up time cause they all assume itll just run all day. chromium  seems a bit overkill and unneccessary. again ill take anything i just need a very basic website as fast as possible displayed on screen.


"I know its stupidly overdone and unreasonably unneccesary but wouldnt it be awesome if ..."

 

CPU: Intel i7 7700k Cooling: Stock cooler (temporary)  MB: ASUS z270i  RAM: G.Skill Trident Z RGB 16GB  GPU: MSI GTX1080 Ti Aero  DISPLAY: LG 34UC88-B 21:9 1440p SSD(OS): Samsung 960 EVO 250GB SSD(Games): Samsung 840 EVO 250GB  HDD(Scratch): WD Blue 500GB HDD(Downloads): WD Blue 320GB HDD(Long-term): WD Green 2TB (external)   PSU: Corsair SF600 Case: Lian Li PC-O11 Dynamic

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×