What's new

[R7800] settings/disable/optimization documentation consolidation

  • 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!

Little trick to make the script neater:
There is already a killall command in /usr/bin
Create a fonction to kill by name, here nkill, and a fonction to check, make non executable and kill, here neutralize, and then just call the fonction for each binaries with f
Code:
neutralize() { [ -x "$1" ] && { chmod -x $1; killall -q ${1##*/}; } }

neutralize '/usr/sbin/ra_check'
neutralize '/sbin/qos.sh'
# PRINT SERVICES
neutralize '/sbin/KC_BONJOUR'
neutralize '/sbin/KC_PRINT'
# DNI POT
neutralize '/usr/sbin/netconn.sh'
neutralize '/usr/sbin/potd'
neutralize '/usr/sbin/potval'

etc...

Note that anything that needs to be stopped or disabled from init.d scripts are to not use those, like:
Code:
# init.d
[ -x /usr/sbin/aws-iot ] && { /etc/init.d/aws disable; chmod -x /usr/sbin/aws-iot; }
[ -x /sbin/traffic_meter ] && { /etc/init.d/traffic_meter stop; chmod -x /sbin/traffic_meter; }

etc...
 
Last edited:
Actually, I looked deeper into most of the processes I block, and all of them are depending on a service (init.d and rc.d).
So here is what I use now:
Code:
neutralize() { chmod -x $1; killall -q ${1##*/}; } >/dev/null 2>&1
initd_kill() { /etc/init.d/$1 stop; /etc/init.d/$1 disable; } >/dev/null 2>&1

# init.d
[ -x /sbin/KC_BONJOUR -o -x /sbin/KC_PRINT ] && { initd_kill kcode; neutralize /sbin/KC_*; }
[ -x /usr/sbin/netconn.sh ] && { initd_kill pot; neutralize /usr/sbin/netconn.sh; }
[ -x /usr/sbin/aws-iot ] && { initd_kill aws; chmod -x /usr/sbin/ra_check; chmod -x /usr/sbin/aws-iot; \rm /etc/rc.d/S99aws; }
[ -x /sbin/traffic_meter ] && { initd_kill traffic_meter; chmod -x /sbin/cmd_traffic_meter; chmod -x /sbin/traffic_meter; }
[ -x /sbin/dni_qos -o -x /sbin/qos.sh ] && { initd_kill dni-qos; chmod -x /sbin/qos.sh; chmod -x /sbin/dni_qos; }
[ -x /etc/init.d/streamboost ] && { initd_kill streamboost; /etc/init.d/uci2streamboost disable; chmod -x /etc/init.d/streamboost; chmod -x /usr/sbin/streamboost_status_monit; }
[ -x /sbin/cloud ] && { initd_kill cloud; chmod -x /sbin/cloud; }
initd_kill upnp

Services can be stopped and launch at reboot disabled.
That should be enough in fact, but I did not try with only that:
Code:
# init.d
/etc/init.d/kcode disable           #  disable print services
/etc/init.d/pot disable             # |
killall netconn.sh                  # | disable dni pot
/etc/init.d/aws disable             #  disable aws iot and router analytics
/etc/init.d/traffic_meter disable   #  disable traffic meter
/etc/init.d/dni-qos disable         #  disable dni qos
/etc/init.d/streamboost disable     # |
/etc/init.d/uci2streamboost disable # | disable stream boost
/etc/init.d/cloud disable           #  disable cloud
/etc/init.d/upnp disable            #  disable UPnP
 
Last edited:
Hello :)
Great and very very interresting post :)
Stupid question : is a reboot required after running the script?
 
Hello :)
Great and very very interresting post :)
Stupid question : is a reboot required after running the script?
Hi,
Most of the folks run this from USB autorun "post-mount.sh" script.

If you run it manually and have no plan to reboot, you are good till next reboot. Services are stopped/killed and then made readonly except for "transmission-daemon, transmission-remote, ra_check". Check with "ps -w" if anyone of these 3 is running kill it.
 
It seems unnecessary, and even potentially harmful, to update the nvram settings at every bootup. The nvram settings survive through reboots and firmware updates, so I think they only need to redone after a factory reset.
 
It seems unnecessary, and even potentially harmful, to update the nvram settings at every bootup. The nvram settings survive through reboots and firmware updates, so I think they only need to redone after a factory reset.
The script could be modified to check for the existence of a file and only run the nvram settings if the file does not exist or
firmware version does not match. If this fails then the script could run and as a last step to confirm success it would write this file so subsequent
reboots would find it. The installation of a new firmware would wipe out this control file and start the process all over again.

I used to do a rudementary version of this idea with my modified streamboost cron to decide whether to overwrite certain files on boot.

FWIW i think most (if not all) of the things discussed in this thread are covered by the amazing @kamoj addon, this thread
is now more of a documentation/information resource.
 
It seems unnecessary, and even potentially harmful, to update the nvram settings at every bootup. The nvram settings survive through reboots and firmware updates, so I think they only need to redone after a factory reset.
Yes it is only needed after factory reset. I already check for file existence on router for this optimization script before copy & execute in "post-mount.sh"

Something like this:
Code:
if [[ -f <path-name-of-file-on-router> ]]; then

For some other files and scripts that I change at times I further check for difference before copy / execute.

Something like this:
Code:
if ! diff -q <path-name-of-file-on-usb> <path-name-of-file-on-router> >/dev/null; then
 
Another stupid question : when the router reboots, then the services that were disable (the print services, the Alexa snitch, etc) are once again enable, right? So I have to stop them again with the command lines, correct?
Thanx for your feedback :)
 
Another stupid question : when the router reboots, then the services that were disable (the print services, the Alexa snitch, etc) are once again enable, right? So I have to stop them again with the command lines, correct?
Thanx for your feedback :)
if you have correctly set the nvram parameters and used 'chmod -x <program>' where needed then the services will not start again even after reboot. The reason most people use a script which runs on router reboot is to ensure they stay disabled even after a firmware update.

While you can manually set everything as detailed in this thread, for an easier way to do so I recommend the amazing @kamoj addon
which can give you a GUI interface to all these settings - AND- even more.
 
Thank you for your so fast reply :)
I haven't set the nvram parameters yet.
When you say "used chmod -x <program> where needed", you mean adding all the nvram lines and all the other command lines into one file, like a text file I would call for example optimisation.sh and then making it executable (chmod -x). Am I right?
Then after running this file once, the setting would stick even after a reboot, correct?
But this executable file would have to be run again if I upgrade the firmware with a new Voxel firmware, am I right again? The nvram settings would be overwritten ? Or they would keep their settings even after a firmware upgrade?

I use an old @kamoj add-on I guess. This is the one I've been using for a long long time :
kamoj-addon_191214-083737-1_ipq806x.ipk

I guess I have to contact Mr Kamoj to see if I can get a newer one?
The one I am using doesn't show all the services to be stopped in this thread, like the print service, or the Amazon & other snitches. Guess the add-on is too old.

Sorry if my questions are dumb :(

Thanx again for your help :)
 
The optimization cmds in this post are combination of setting nvram variables and making some scripts/binaries non-executable.

Code:
chmod -x <program> - [Makes that script/binary Non-executable]
chmod +x <program> - [Makes that script/binary Executable]

So if you put all the cmds in this post in a script, lets say optimization.sh. That script should be executable with shebang as first line "#!/bin/sh". And you need to do "nvram commit" after setting all nvram variables.

Once you run that optimization.sh, all settings (including nvram vars and making script/binaries non-executable) will stick till next firmware upgrade. You need to run that optimization.sh again after firmware update. You can automate this process of running this script after firmware update as well using usb and "post-mount.sh" to copy and execute "optimization.sh" only once if it does not exist.
 
My understanding is this:
  • NVRAM settings persist through reboots and firmware upgrades. There is no need to redo them when the router is rebooted or updated.
  • The other optimization commands discussed in this thread need to be reapplied after a firmware upgrade, but not after a reboot.
 
My understanding is this:
  • NVRAM settings persist through reboots and firmware upgrades. There is no need to redo them when the router is rebooted or updated.
Yes custom nvram settings do persist between firmware upgrade. Reset router either from the back reset button or telnet/ssh cmds will clear any custom nvram setting.

Voxel/NG do occasionally add/remove nvram variables between firmware upgrades. People do reset router once in a while between firmware upgrades 'or' to troubleshoot after encountering unknown issue between firmware updates.

Generally a good idea to keep selective custom nvram settings in a script (or selective settings along with other default settings as a backup config). This will avoid manually restoring each setting from UI.
 
Thanx a lot again for your replies :)

What about Kamoj's add-on? The version I'm always installing is old, correct?
( kamoj-addon_191214-083737-1_ipq806x.ipk )

Only way to get a new one is to contact directly Mr Kamoj, if I'm not mistaken.
A newer one would give me more options, if I'm correct again :)
 
Thanx a lot again for your replies :)

What about Kamoj's add-on? The version I'm always installing is old, correct?
( kamoj-addon_191214-083737-1_ipq806x.ipk )

Only way to get a new one is to contact directly Mr Kamoj, if I'm not mistaken.
A newer one would give me more options, if I'm correct again :)
Yes, you would need to contact kamoj and yes, the newer versions have way more options.
 
Currently R7800 firmware (@Voxel firmware is affected too) has a really annoying software bug.
I've described it in this post https://www.snbforums.com/threads/r...-when-a-client-is-connected-at-100mbps.78375/
Unfortunately if you have any 100Mbps client devices connected to any LAN port and you have for example a file server running on your LAN and have regular LAN transfers between your LAN devices, R7800 cannot achieve full WAN/LAN Gigabit Full Duplex performance and that's really a pity for this otherwise excellent hardware.
 

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!
Top