SQM Script Hotplug

I've been running a script by @dlakelan for a couple weeks now and it was working great until recently. About a week ago the script will work for a few minutes after running it then will stop and as of now it doesn't even do anything. Using the sqm luci app works so I'm not sure why the script doesn't work. @dlakelan saids it might be some sort of hotplug that keeps reverting my firewall but he's not sure, so any help on fixing this will be appreciated. I've tried reseting my router a couple times and got no success with that.

The instructions and script can be found on this site; https://github.com/dlakelan/routerperf

Yes the observed behavior is that immediately after running the script the qdisc and firewall tagging works fine. But some time later a firewall dump doesn't show the dscptag chain anymore and the whole thing goes out of control.

What mechanisms might be reloading the firewall and/or resetting the qdiscs? I'm not sure.

It's not clear this is actually solved at this point... there's a similar issue people are seeing with an older script reported as well.

For me, only like the lan portion of sqm doesnt work, veth gives me shape sometimes, sometimes it just stops working... i restarted my router like 5-6 times checked on dscp script... nothing helped...

Then i checked tc -s qdisc... seemed veth0 had no queing shown in it...

But i had it set up...

Then i changed the interface in sqm to br-lan, applied it then change it back to veth0... now it works... idk which bug it is...

So current SQM has issues with hotplug on bridges, but the current github version has a fix for that.

I will check it out.

i checked on sqm hotplug.
i kept the text below on /etc/hotplug.d/iface/11-sqm

[ -n "$DEVICE" ] || exit 0

ALL_DEVICES=$(echo $DEVICE $(uci -q get network.$INTERFACE.ifname) | tr ' ' '\n' | sort -u)

restart_sqm() {
    for dev in $ALL_DEVICES; do
        /usr/lib/sqm/run.sh stop $dev
        /usr/lib/sqm/run.sh start $dev
    done
}

[ "$ACTION" = ifup ] && /etc/init.d/sqm enabled && restart_sqm

if [ "$ACTION" = ifdown ]; then
    for dev in $ALL_DEVICES; do
        /usr/lib/sqm/run.sh stop $dev
    done
fi

but still i have this when i restart the router

qdisc noqueue 0: dev veth0 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0

Can you link that please.

Sure, go to https://github.com/tohojo/sqm-scripts and follow the instructions in the README.md

Mmmh, possibly uci -q get network does not really know about veth interfaces? The fix was introduced to deal with users instantiating SQM on br-lan or participating interfaces.

I completely changed my setup to @dlakelan script on sqm... i guess now it wont be a problem as there will be no veth

1 Like

the scripts has a bug after 2 week at my home too unfortunatly...

how to resolve the problem i don't understand ? :roll_eyes: :hugs:

But maybe we are not trying the right approach for your issue here. I would think we might be faster if you install WinSCP (https://winscp.net/download/WinSCP-5.17.10-Portable.zip ), run it
point it to your router's IP address (likeky 192.168.0.1) login as root and navigate to
/etc/hotplug.d/iface seect 11-sqm, right-click and select edit. You should see:

#!/bin/sh

[ -n "$DEVICE" ] || exit 0

restart_sqm() {
    /usr/lib/sqm/run.sh stop ${DEVICE}
    /usr/lib/sqm/run.sh start ${DEVICE}
}

[ "$ACTION" = ifup ] && /etc/init.d/sqm enabled && restart_sqm

[ "$ACTION" = ifdown ] && /usr/lib/sqm/run.sh stop ${DEVICE}

change this to read:

[ -n "$DEVICE" ] || exit 0

ALL_DEVICES=$(echo $DEVICE $(uci -q get network.$INTERFACE.ifname) | tr ' ' '\n' | sort -u)

restart_sqm() {
    for dev in $ALL_DEVICES; do
        /usr/lib/sqm/run.sh stop $dev
        /usr/lib/sqm/run.sh start $dev
    done
}

[ "$ACTION" = ifup ] && /etc/init.d/sqm enabled && restart_sqm

if [ "$ACTION" = ifdown ]; then
    for dev in $ALL_DEVICES; do
        /usr/lib/sqm/run.sh stop $dev
    done
fi
1 Like

yes thanks for the response Ike

just i have a hap ac2 and my wlan is poor on dslreports not A+ A+A+

to the lan i have A+A+A+ its normal you think ? :confused:

32 mega again 70 fai i have put 62000 in sqm for 85%

Capture d’écran 2021-03-03 à 23.54.00

Wlan i assume is wifi and if so it makes sense to not get A+... so if you get A+ connected to the router with an ethernet which i assume is what you mean by lab then everything’s fine if you’re getting A+.

Basically stick with what works and don’t stress yourself out.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.