Router goes to sleep

Started by bobeinstein, July 28, 2025, 11:51:42 AM

Previous topic - Next topic
July 28, 2025, 11:51:42 AM Last Edit: July 28, 2025, 11:53:16 AM by bobeinstein
First week with a new diy router and opnsense 25.7. I forgot to turn off the router last night, and this morning I found it "off" and there was no network. It is either off or in s3 sleep. I think probably sleep, as the network was very quickly back up again after pressing the power button.

My question is simply - does opnsense have a setting allowing the machine to go to a suspended state? PowerD is off after the upgrade to 25.7.

There's surely settings in bios that allows a machine to go to suspended states like S3 and there are settings for c-states and so on. But I've never owned a machine where the control over suspended states are in bios. It's always the OS that controls whether the machine goes to S3 is it not?

What's putting my machine to sleep? I've used the network intensively for a week and the router has never gone to sleep during normal operation, so the behavior appears to be timed along idling.

check sysctl for dev.cpu.1.cx_lowest (dev.cpu.[cpu num].cx_lowest)

Are any C2 or C3 ??

I not expecting that setting to cause full sleep.

Is sleepd running in your ps list?

Are you using the APC or NUT plugin?  I found my router shut down a couple times and tracked it down to my UPS running a self test which triggered a shutdown of the router.  Not sure why a UPS self test should ever trigger any device shutdown.

Log file hunting will give an answer perhaps.
Maybe in /var/log/utx.log or /var/log/messages

Quote from: BrandyWine on July 29, 2025, 05:41:32 AMcheck sysctl for dev.cpu.1.cx_lowest (dev.cpu.[cpu num].cx_lowest)

Are any C2 or C3 ??

I not expecting that setting to cause full sleep.

Is sleepd running in your ps list?

Hey thanks for replying and apologies for the slowness. I'll get there but right now I need to figure out how to execute your suggestions first.

Quote from: gpfountz on July 29, 2025, 07:35:40 PMAre you using the APC or NUT plugin?  I found my router shut down a couple times and tracked it down to my UPS running a self test which triggered a shutdown of the router.  Not sure why a UPS self test should ever trigger any device shutdown.

Thanks for replying and suggesting a culprit. No, I'm not running any of those. 

Quote from: BrandyWine on July 29, 2025, 11:31:11 PMLog file hunting will give an answer perhaps.
Maybe in /var/log/utx.log or /var/log/messages

Ok, cool. I'll get there eventually. I don't even know how to open a cli on opnsense.

Quote from: bobeinstein on July 31, 2025, 09:11:52 PMI don't even know how to open a cli on opnsense.

You need to login from your desktop via ssh.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Quote from: bobeinstein on July 31, 2025, 09:11:52 PM
Quote from: BrandyWine on July 29, 2025, 11:31:11 PMLog file hunting will give an answer perhaps.
Maybe in /var/log/utx.log or /var/log/messages

Ok, cool. I'll get there eventually. I don't even know how to open a cli on opnsense.
No worries, I think the community forum will help.
You need to turn on SSH from OPNsense gui, then proceed.
Once you connect you'll get a login shell menu script, use 8 to get into a cli shell.
From there, try something like this

cat /var/log/utx.log |grep sleep
cat /var/log/messages |grep power

Where words "sleep" and "power" is what you are searching for. These keywords may not be the exact words to look for, but now you can search.