What is the correct procedure to do before unplug an OpenWrt device from the power supply?

I have an ER-X and a UniFi AP AC Lite and I unplug them from the power supply every night.
Is there a risk of corrupting the memory or causing any problem if I just unplug the power supply without giving the halt command before unplug them?

4 Likes

OpenWrt reduces writes to a minimum, but sudden power loss always holds some risk of damage - be it just for the filesystem consistency or the flash ship itself. While hard- and firmware (OpenWrt in this case) are made with this use case in mind, unnecessary power losses should still be avoided, so disconnecting it daily is not the best idea. halt, shutdown or poweroff are theoretically the correct procedure, however they're rarely properly implemented on these platforms and may have (for this purpose-) unintentional behaviour. Common implementations range from just rebooting, halting (keeping the CPU in an endless loop), first halting - but then triggering a reboot from the hardware watchdog or properly powering off - the later is the least common case. Some kind of rebooting, instead of powering down, is the most common implementation for these devices, as they are supposed to transparently come up again after an external power cut (think blown fuse, power-outtage, you having pulled the plug) without manual intervention. What you certainly do want to avoid, is pulling the plug while it is rebooting, as this increases the risks dramatically (lots of flash accesses), so relying on improperly implemented halt implementations might be even more risky than pulling the plug without any preparations.

If you care about the longetivity of your device (both firmware integrity and hardware), avoid unnecessary hard power cuts. This shouldn't scare you to move it to another place once in a while, but daily power-cuts pose a rather elevated risk (for little gain).

10 Likes

Doing this for years to save power and radiation so that I don't have to wear my tin foil hat in bed ;- ) Also to force IP change.

No problems, surely avoid if you have mass storage connected.

2 Likes

Same with me. Doing this since 2014 with 2 APs daily. No problems, but of course no mass storage.
Radiation could be switched off via button and/or cron job, e.g. with package wifischedule...
Power savings unfortunately not.
Consumer devices like TVs, ... also have to survive being switched off.
Of course I would never cut a PC from power without shutdown.

1 Like

should not be a problem, but I don't see why you should unpplug them. If you want to stop wifi there is a package that powers on and off the wifi at set hours

2 Likes

unplugging a low-power embedded device to save power? Is your electricity so expensive?

1 Like

As long as most of the time the standard electricity mix is atom, coal and gas, yes the bill is too high. And no, "cheap" reweable energy isnt't always an easy solution e.g. if "I" buy Norwegian water power and that company buys and sells standard electricity to their customers in Norway, what is gained?

What happens if millions of low power embedded devices are running and wasting energy in times when they are not used?

Also the life span of power supplies should be considered. Electronic waste increasing world wide. Do you heard of FFF?

2 Likes

Did you actually quantify any of this with numbers or is this all phylosophical rethoric?

Because by all numbers I run the cost (in my country) is negligible and so is the impact. Leaving a light on for a few hours consumes more power than a router does in a week and even then for half the year I need to heat the house anyway so any heat not generated by the router or other systems will be generated by the heaters (making any energy used "not wasted").

As for "life span of power supply", I've been using constantly old power bricks from 1999, well after the device they were shipped with died or was obsoleted. I have a crate full of power bricks like that.

1 Like

This discussion somehow leaves the OpenWRT area, but of course it is interesting. Considering the impact on the environment does not only include energy costs, but of course also the live cycle of the devices (might it be shorter by always powering them on/off, or longer because of the reduced runtime...), ...
I have steadily reduced our electricity consumption in a 4 people household to less than 2000 KWh per Year, including power consumption of a central heating that is not optimal. And once you are finished with the main consumers (fridges, washing machine, dryer), you continue with the lights and end with
the standby power consumption of TV, IPTV-Server, XBOX, Access Points, ... .
And especially in summer I do not want the additional heat produced by unused electronic devices.

1 Like

Billions of unused devices at night or in standby are unnecessary and summup. This energy also have to be produced with impact on multiple levels, not only monetary.

The use of electrical devices which are not used or have bad efficiency is a bad way to heat the house, based on most of the time the standard electricity mix is atom, coal and gas and the additional (unnecessary) transformation.

You are exeggerating or using Edison light bulbs but at least you are using old spare power supplies ;- )

I make a 10W router uses 88 kWh per year running 24 hrs. So by turning it off half the time it would save 44kWh per year. It's not nothing but compared to the 2000/yr you're using it's not much. If you junk the router a year earlier due to the on off cycles it's probably a net negative

1 Like

@Stefan1 got the low 2000kW/a for a four person household. That is really low and he really must have put some effort in to archive this!

Mine is a little less than 1200kWh/a for a single household and I am know what I am doing to get there e.g. refrigerator A+++ (best energy efficiency standard nowadays in Germany) and turning off modem + router at night ;- )

10W multiplied with 500 Million households and you have to use quite some atom or coal power plants to get there....for nothing at night (or day)

Regarding your assumption of premature failure....from my single point of experience I can't confirm this, nor Stefan1, powering off two routers since 2014. At least there are the two of us ;- )

I agree with you that millions of households who all turn off 10W would be a good thing. And I don't know about premature failure. Probably not a real issue based on your data. I do think it's worthwhile for people to think quantitatively on these topics and balance the utility vs the cost.

3 Likes

A journey of 10.000 miles begins with the first step. :wink:

I think, you can't focus just only on the monetary bill. What about CO2 emission and the whole climate change.

1 Like

I would still argue not to burn energy for powering routers with 10W in 500 million households while you are asleep or at work. For what purpose? It is use and thoughtless. Coal, atom, gas comes with a price tag way beyond the pennies you are paying for because the real damage for mankind and the whole planet isn't priced in.

By the way: Don't support Bitcoin. Wait until it is replaced with a better and usefull alternative ;- )

1 Like

If you need to invent reasons to feel good about it, then it's probably not worth it.

The numbers show that it's mostly irrelevant.

I'm all for doing meaningful changes, but this is just cargo culting.

2 Likes

No, that is not true. What I measured with older routers without actual WiFi 5 / 6 support power drawn during idle mode IIRC was around 4-7W, newer ones with more potent hardware 7 to 12W and that's without modem.

Also OpenWRT isn't the magic bullet for a long life time of routers regarding faster internet connection nowadays >500 Mbit/s and SQM enabled because hardware support for flow offloading / AES seems not widely available (if at all) AFAIK

1 Like

Well, i must say i didn't see anyone in this thread talking about stopping to use something that is useful (let alone shutting down the whole power grid or - by extension - giving up on technology and modernities as you may seem to imply), but turning off something that is not being used... If you can understand the difference between the two things, then arguing about quantities is just a subjective matter for which each one has his own thresholds, too high or too low shouldn't bother anyone of us so much imho. Because everyone turns off something at some point...

There are lots of similar posts on the forum (about wifi scheduling and such) and they all manage to go offtopic when someone starts to argue about someone else's habits... just saying...

There are many different aspects in this discussion that should not be mixed up:

  1. Some use openwrt access points that may be switched off if they are not used. This is a different story to that of the router keeping internet and maybe landlines connections, ...

  2. I do not rate electricity a bad thing. I just want to use it (like any resource) carefully and not waste it. In the same way I use water as a precious resource. And e.g. looking at the Colorado River mouth ( use Google maps, no water left!!!), you can see that such resources are not endless. Why would I let an access point run that is not needed for the next 8 hours ? Would I not stop a water tap once I am finished washing my hands ?

Of course I would love to see access points that have a standby power consumption near zero, as long as they are not used. Just the same with all other devices like tvs, ...

  1. The argument "you cannot change the world", "that saving is too small" is just not true. I have been able to reduce my electricity consumption by looking at ALL the possible saving potentials.

  2. Energy prices are not as low as in Sweden for the rest of the world. In middle Europe they are factor 10-15 higher. 1kwh in Germany is around 0,35 to 0,40 usd.

1 Like

No, I am using 30/3 Mbit/s. I argue for power & resource saving, environment and health. There is no Planet B.