What's new

Asus RT-AC68U 386.2_6 low on free nvram

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

I am wondering what is that "nc_settings_conf" anyway? It is the largest consumer of my NVRAM. I did check the code https://github.com/RMerl/asuswrt-merlin.ng/blob/master/release/src/router/rc/services.c but can't understand what notify center this code is about. Anyone can shed more light on this? Is it safe to unset the value of "nc_settings_conf"?

For other possible alternatives to getting some unused NVRAM space back, see the posts here on this thread:

 
Hello guys.
I appreciate the contribution of any member of this community.

The NVRAM issue persists.

I've got to some frustration level trying to fix this issue.

Two ways appear on this thread.
1. YazDHCP solution is recommended.
2. The script provided by @RMerlin.

Results.
1. YazDHCP is no more efficient. I see in the log something consolidating nvram but no improvement is observed I have average 15bytes free.!!!!
As a result, all my 3 portfw rules were deleted and there is no solution to add (no save button).

How did that happen?
I updated the FW from 386.7_2 to 368.10 late in the evening.
Next day in the morning, the Asus router app reported the router has been reset to default.
Checked back, it was not reset to default, anyway the AImesh nodes (3xLyraAC2200) were gone.

I sad, "anyway I wanted to modify the AImesh configuration for not working properly".
(the story behind)
============
How dit this look? Wi-fi clients were disconnected after some time and no more connecting back.
Mainly there were sonoffs with Tasmota which got kicked out after some time and no more connects until the router restart.
I solved previously this issue by increasing DHCP lease to max permit, 7 days and scheduled a router reboot every wednesday on 4AM.
It worked.

I assigned static IP to all sonoffs, shelly, solarassistant, air conditioning, HomeAssistant and any other smart thing in the house (about 30 entries).
This was done by MAC-IP binding from the router interface
==============
(back in present)
so I configured manually the three AP Lyra (IP static, fixed gateway/DNS/netmask), set up for each one the ssid/pass/channel/guest, different ssids for 2.4/5GHz
I understood this MAC-IP reservations are saved in the NVRAM.

If YazDHCP took this role, would these reservations still eating NVRAM space?
I deleted 4 entries and I have seen YazDHCP deleted them from ".staticlist", after reboot the NVRAM usage is the same.
What does really do YazDHCP?
Would be better to write the IP reservations directly on dnsmasq.conf.add?

2. Regarding the script posted.
How do I run this script? I created a file named "whatever", copied on jffs/scripts/ by mc (yes Midnight Commander), and I know the question looks silly.
Please do not send me to the tutorial wiki because it does not explain how to run the script but the role of each file/script there in the directory.
A lot of us are windows users not linux CLI skilled ones. We encounter CLI only when we need to fix something that is not working as expected. For me, every time when I have to write some commands on linux, I need to perform a search on few websites to learn how to do it and what to write (despite the fact that I am somehow familiar with DOS commands on cmd and putty ssh)
So ... a simple guide how to run a script would be very helpful.

The solution to reset everything to default and start from 0 is not a go.
Many of us have some "mandatory" things on the configuration and finally ends up with NVRAM full.
I have over 30 devices with names saved and setting up again takes some time.
 
Last edited:
The solution to reset everything to default and start from 0 is not a go.
Sorry to break it to you but if you want to really deal with the low NVRAM issue on the RT-AC68U when using the 386.9 or 386.10 firmware then a hard factory reset followed by a manual configuration (do not import a saved router CFG file particularly if its from an older firmware version) is the very FIRST thing you should do. Sucks but that's the reality. Everything else suggested is just a band aid and most script commands or code commands won't survive a router reboot. Importing a saved router CFG file from older firmware can introduce unexpected issues.

If you are seeing kernel: nvram: consolidating space! entries in the system log those are normal system log entries.

Because of the RT-AC68U's limited NVRAM (64k) one will always be fighting to deal with it being full or close to full if one, not using YazDHCP or a dnsmasq.conf.add file, uses a lot of manual DHCP IP addresses (and using custom names) or if one uses some or all of the OpenVPN clients when using the 386.9 or 386.10 firmware. One should stay on 386.7_2 firmware which seems to be the last one that didn't have severe NVRAM space issues if they don't want to perform a hard factory reset and manual configuration.

One uses SSH to access the router at the root level to run code commands or to create and run scripts to try and clear out NVRAM values. One enables SSH in the router's Administration > System > Services section and one can use an SSH client Putty or WinSCP on Windows. One would paste in the entire script code and save the file with a ".sh" file extension on the router. Then run that ".sh" file by issuing a command like ./filename.sh or sh filename.sh.

See the scripts or code commands at the following link:
https://www.snbforums.com/threads/asus-rt-ac68u-386-2_6-low-on-free-nvram.73158/#post-695283
https://www.snbforums.com/threads/3...uild-s-for-ac-models.83565/page-2#post-824457
https://www.snbforums.com/threads/high-nvram-usage.56848/#post-494736
https://www.snbforums.com/threads/r...stnames-from-nvram-to-jffs.63886/#post-817090

One thing to do when NVRAM is low, is to run the following code line via SSH to see what is using the most in NVRAM.
Code:
nvram show | awk '{print length(), $0 | "sort -n -r"}' | cut -d"=" -f 1 | head -n 20
If one has custom_clientlist in that list highest NVRAM usage at the top or near the top, one may want to avoid using custom_clientlist and see if that helps. Or clear out the custom_clientlist NVRAM value to see if things improve. Example of how to clear the custom_clientlist NVRAM entry via SSH command:
Code:
nvram set custom_clientlist=""
nvram commit
There is some discussion about what YazDHCP does with respect to NVRAM at the following link:
https://www.snbforums.com/threads/y...umber-of-dhcp-reservations.69247/#post-651176

RMerlin discusses the low NVRAM on the RT-AC68U here, here, here and here.

A standard warning about clearing out an NVRAM value using any of the methods listed may potentially cause problems and or may not survive reboot. Doing a hard factory reset and manual configuration (no router CFG import) should be one's first step.
 
Last edited:
Many thanks for the putting effort to explain in detail.

Probably the solution I will try first is to downgrade to 386.7_2 and use the saved configuration.
It already took me some time to reconfigure and tune those 3 access points so I will try to minimize the effort to fix this issue.

If this solution does not work...
I will stick with 386.7_2, perform the factory reset and reconfigure from scratch.
 
If this solution does not work...
I will stick with 386.7_2, perform the factory reset and reconfigure from scratch.
It should be noted that 386.10 does work on the RT-AC68U, its just one is better off doing a hard factory reset and manually configuring if they get a low NVRAM warning. From my post here is a screen capture showing the approximate NVRAM post hard factory reset on 386.10/RT-AC68U at initial base configuration:
rt-ac68u-post-factory-hard-reset-merlin-nvram-jpg.48796

That post also shows some other examples of hard factory reset NVRAM values on Asus stock 3.0.0.4.386_51255 and flashing from 3.0.0.4.386_51255 to 386.10.
 
Did the factory reset (from the interface).
After QIS I checked the NVRAM usage 59141

configured the following:
wifi channels
wps off
ntp servers
IP range, netmask
wifi guest
installed yazDHCP
import reserved ip list
samba guest login
ftp one user
ddns
remote wan access
vpn server pptp one user
amtm reuse existing entware
set swap file
add 4 portFW rules

NVRAM usage 61570

fill the names for the usual network clients
NVRAM usage 62981
end configuration

after 10h the NVRAM usage reached 63358.

If it stays this way that will be ok.
But I doubt it stops eating NVRAM.
 
Did the factory reset (from the interface).
....
If it stays this way that will be ok.
But I doubt it stops eating NVRAM.
Not sure if a factory reset from interface does the same as a WPS hard factory reset. But in any event one can check which NVRAM entries are using the most by running a command like this from SSH command line:
Code:
nvram show | awk '{print length(), $0 | "sort -n -r"}' | cut -d"=" -f 1 | head -n 20
One can then decide if they want to address the NVRAM values (or the router services, options, or settings) consuming the most resources.
 
Last edited:
There are 4 days since the factory reset.
The NVRAM usage is now 63311.
It seems the configuration does not eat more memory.
 
There are 4 days since the factory reset.
The NVRAM usage is now 63311.
It seems the configuration does not eat more memory.
If you haven't seen it already, RMerlin put out new 386.11 Alpha1 firmware yesterday that among other things tries to deal with the low NVRAM on two of the AC68U models:
"Reduce max OpenVPN clients to 2 for RT-AC68U and DSL-AC68U due to lack of NVRAM on these two models."
[ 386.11alpha Build(s) ] Testing available build(s)

If low NVRAM is still an issue you may want to look into trying out that Alpha1 firmware. See that discussion for examples of NVRAM usage on RT-AC68U's when running that Alpha1 firmware. Running that Alpha firmware on a RT-AC68U is now at the following after 20 hours of run time:
NVRAM usage 57162 / 65536 bytes
 
Last edited:
Thanks but I don't think it helps me.
I use only VPN server PPTP (router set as server) with one account now.

When I have some time, I will investigate what's eating the memory.
 
Hello. Tried RMerlin's script, but that's what I got:
: not foundsh: line 2: Removing unused cert/key from nvram... : not foundsh: line 4: nvramclear.sh: line 6: syntax error: unexpected word (expecting "do")
How to fix it?
 
How to fix it?
There's no need to run that script. Install the current version of Merlin's firmware on your RT-AC68U and then run the clear_vpnclients.sh that comes with it.

Code:
  - CHANGED: Reduce max OpenVPN clients to 2 for RT-AC68U and
             DSL-AC68U due to lack of NVRAM on these two
             models.  Note that existing settings are not
             automatically removed, you must run the following
             command over SSH to remove them from nvram and
             the /jffs/openvpn/ directory:

                clear_vpnclients.sh

             A backup will be saved in /jffs/openvpn_backup.tgz.
 
There's no need to run that script. Install the current version of Merlin's firmware on your RT-AC68U and then run the clear_vpnclients.sh that comes with it.

Code:
  - CHANGED: Reduce max OpenVPN clients to 2 for RT-AC68U and
             DSL-AC68U due to lack of NVRAM on these two
             models.  Note that existing settings are not
             automatically removed, you must run the following
             command over SSH to remove them from nvram and
             the /jffs/openvpn/ directory:

                clear_vpnclients.sh

             A backup will be saved in /jffs/openvpn_backup.tgz.
I am sorry, but how do I use it? There is no such file in the /jffs/openvpn/ or /scripts directory. I think I do something wrong. My firmware version is 386.12, updated today (was official before).

upd: I am a noob at these things.
 
Is your router RT-AC68U or variant of it? What's the exact model?
 
I am sorry, but how do I use it? There is no such file in the /jffs/openvpn/ or /scripts directory. I think I do something wrong.
It's built into the base firmware image. Just enter that command. If it still doesn't work try /usr/sbin/clear_vpnclients.sh

My firmware version is 386.12, updated today (was official before).
If you weren't using Merlin's firmware before then there's nothing to fix. You don't need to run this script.
 
Last edited:
It's built into the base firmware image. Just enter that command. If it still doesn't work try /usr/sbin/clear_vpnclients.sh


If weren't using Merlin's firmware before then there's nothing to fix. You don't need to run this script.
This command worked, thank you! But I still have 2 clients in VPN Status - PPTP/L2TP Clients. I guess, I have to switch back to official firmware, than delete it and install Merlin again?

upd: Nevermind, I found a tab of it.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Staff online

Top