SQM doesn't work on boot, and randomly stops working

Router: TP-Link Archer C60 v3
Architecture: Qualcomm Atheros QCA956X ver 1 rev 0
Firmware: OpenWrt 19.07.7 r11306-c4a6851c72 / LuCI openwrt-19.07 branch git-21.044.30835-34e0d65

I have configured two SSIDs on the default 2.4GHz radio device. I have configured SQM for both. The SQM configs work, and I've verified them.

However, after the router is booted up (or rebooted), SQM doesn't work. I have to go into Startup and restart the sqm service for it to start working. Are there any specific logs I can attach here? The SQM start and stop logs don't show anything specific to me.

Also, it stops working after a while (randomly). For example, I powered up the router in morning, then manually restarted the sqm service. It was working fine. In the afternoon, on a whim, I ran a speed test from my mobile while being connected to one of the wireless networks, and found out SQM wasn't working. I had to restart the service again.

Why is this happening? I have "sqm-scripts" and "luci-app-sqm" installed.

Thank you

You need to apply it to the WAN interface - e.g. pppoe-wan

I see. Could you help me understand one thing please?

The two SQM instances configured restrict ingress and egress differently for both. As an example, one allows 5Mpbs ingress and egress, the other 10Mpbs ingress and egress. If I were to apply SQM directly to the wan interface, how would I manage this?

probably resource related or a flapping link (or something custom that faults on reload)

Any particular log files I can look at? The ones I've looked at haven't told me anything helpful to diagnose this further.

enable verbose debugging in the config/sqm and check logread

you may see messages similar to;

Sat Jul 24 23:35:41 2021 user.notice SQM: WARNING: Unable to get run lock - already held by 11693
Sat Jul 24 23:35:42 2021 user.notice SQM: ERROR: Giving up on getting lock after 10 attempts

you can also place your own logger statements in

/etc/hotplug.d/iface/11-sqm

Maybe replace the contents of /etc/hotplug.d/iface/11-sqm
with the most recent version: https://github.com/tohojo/sqm-scripts/blob/master/platform/openwrt/sqm-hotplug?

the issue looks like a hotplug failure, so the hotplug script seems like the best approach ot tackle the problem.

2 Likes

Thanks very much! This has solved the problem. And, reading the commit message for that fix, I can say that I have the SQM instances applied to the component interfaces instead of the wan/bridge one.

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