Luci reboot/ssh reboot command not working (WRT1900AC v1, fan script)

I am running a WRT1900AC v1 with 24.10.0 on it. When I try to reboot the router from Luci or from SSH the router does not reboot. If I am on luci, all that happens after I click to reboot under the system tab is that the page refreshes and comes back less than 5 seconds later. The only way reboot the router is to pull the power cable. Everything else is working normally.

The only thing I changed is that I added the following to the "local startup" under the startup tab in luci:
This

The codes under usr/sbin/fan_monitor and etc/init.d/fan_control were the ones that I added to the startup

I did this to have some control the router's fan and it was either running at 100% at startup or not running at all. The router is going inside a closed on my new place so it would be great to have the fan working normally.

Any ideas why the reboot is not working properly?

ps. i tried to format correctly but no matter how hard I tried, it did not come out correct on the forum post

Format your code </> as currently it is 101% unreadable.

Fixed the best way I could

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

cat /etc/init.d/fan_control
cat /usr/sbin/fan_monitor
cat /etc/rc.local

Might be obvious, but I made a mistake in that post. You should comment out the default cron fan control job. But regardless, II do not think this would cause what you are seeing.

1 Like

Sorry can you elaborate? It went over my head as i am very green with openwrt

In file /etc/crontab/root comment out the default fan job:

# mamba fan script runs every 5 minutes
## */5 * * * * /sbin/fan_ctrl.sh

I just flashed a mamba with:

OpenWrt SNAPSHOT, r28986-6c8cc86295
Linux OpenWrt 6.6.83 #0 SMP Fri Mar 14 11:23:57 2025 armv7l GNU/Linux

and reboot is fine...

Did you modify /etc/rc.local by any chance ?

No.

All I did was copy the commands to the local startup tab in luci.

Yep., that's the same thing.. and the most likely cause

Comment out or remove, then reboot

Then why didn’t you respond to my request?

What line do I needed to comment out?

I'm in the middle of moving, so I am running my old router that will not be used in the new place. Once I get the wrt1900ac at the new place then I will respond with the requested info.

To be clear, there is no change to file rc.local (local startup in GUI), just the cron job as noted above. Then the two files put in place on the router file system as per the post you linked. So if you scp'd the two files to your router, say /tmp, you would then:

cd /tmp
mv fan_control /etc/init.d/
mv fan_monitor /usr/sbin/
/etc/init.d/fan_control enable
/etc/init.d/fan_control start

I'm assuming file attributes to be set appropriately.

1 Like

Thanks, understood.

Follow instructions in Post #14 by the author.

All of them, then reboot. After, check if you can reboot from LUCI or shell properly.
If you can, the problem is in the rc.local if not its something else.

In case its working again empty, start uncommenting lines, testing the reboot function.

1 Like

@anomeome I did scp the files into the /temp, but when I put the command mv fan_control /etc/init.d/ into the command prompt affter ssh into the router, I get this response "mv: can't rename 'fan_control': No such file or directory". I get the same response for the "mv fan_monitor /usr/sbin/" command". I get this response "-ash: /etc/init.d/fan_control: not found" when I put the "/etc/init.d/fan_control enable" and same response to the "/etc/init.d/fan_control start" command.

Also, how do I change the file in the etc/crontab/root. I usually use vi command but when I do this response

As you can see I am very new to having to deal with scripts. I usually just install openwrt on my needed router and copy my old set up. This is the first time I have to play around with script. Any further help would be greatly appreciated.

  • /tmp vs /temp, file not extent where you are looking / located ???
  • did not move into place so of course you cannot execute the script.
  • /etc/crontabs/root, a typo
  • the command ls is your friend on the CLI

@anomeome hahaha it has been a long weekend moving from one apartment to another. My brain is not working at 100%.

When I typed the reply I was about to leave for work. However, when I was inputting the commands on the CLI, I was copying and pasting (from your reply above) rather than typing it out.

Just to clear things up, I did remove all the commands from the local start in the GUI. Afterwards, I downloaded the two file from github then moved them into the /tmp directory via scp using WinSCP application. I then rebooted the router. That I exactly what I did step by step.
Then I ran the commands "mv fan_control /etc/init.d/; mv fan_monitor /usr/sbin/" after doing cd /tmp. Are those steps correct? If not, what should I change so the script can be executed?

What command in the CLI do I need to run to do this part: "/etc/init.d/fan_control enable; /etc/init.d/fan_control start" and to comment out the recommended instructions:

"# mamba fan script runs every 5 minutes ## */5 * * * * /sbin/fan_ctrl.sh"

I am asking because vi does not seem to be working this time. If that is not correct, can you please let me know which command I should use?

When you SCP'd the two scripts to /tmp and then re-booted the router, this effectively removed the two scripts. /tmp is exactly what it says *a temporary file location that will be reinitalized to empty on a re-boot.

Follow the same process you used above, but omit the re-boot step.

Just paste it into the command line and hit Enter. fan_control is a procd service script that controls the fan_monitor script. The enable and start commands condition the script to be enabled to start on boot, and then start it running.

The # at the beginning of a command indicates that a command should not execute. cron is not used to run the fan contol function, so you can remove this line totally. The fan_control service runs the fan_monitor script which checks the current thermal status of the cpu/ddr/wifi sensors from the router and sets the fan motor speeds dynamically as needed. It sleeps 20 seconds and then does it again.

Once you have followed these changes you can check the service status. On the command line issue: /etc/init.d/fan_control status this should return running.

The fan_monitor script also contains a logger function that sends messages to the syslog that details what it has done. From the command line you can issue: logread -e FAN_MONITOR or from the GUI Status/System Log use your browser Find in Page function for FAN_MONITOR.