fixing wifi bufferbloat: CAKE qdisc on fedora 44
the problem nobody talks about
you download a file and suddenly your voip call freezes. Your partner can’t hear you. Downloads aren’t actually slow, but everything feels laggy. you reboot. it works for a bit. then it happens again.
that’s bufferbloat. your modem/router has massive buffers. packets queue up forever. lag spikes hit 150ms. it’s miserable. i had this exact problem. 60Mbps connection that felt like 10Mbps because of latency hell.
the fix: CAKE qdisc. one installer. done.
what CAKE actually does
CAKE is a linux traffic queue manager. fancy name for “traffic cop.”
- without it: packets pile up in a giant queue. first come, first served. your video call waits behind a torrent. everything lags.
- With CAKE: three priority buckets. bulk traffic (torrents, backups) goes to the back. voice/gaming gets priority. everything flows smoothly.
- result: you get full speed AND low latency. simultaneously. the way it should be.
my setup
- fedora 44 kde, GTX 1650 (matters for driver tuning)
- optus VDSL 60Mbps down / 22.6Mbps up
- wlp3s0 wifi (intel driver)
- systemd everything
- multiple suspend/resume cycles daily
the 60Mbps is hardcoded into my modem. that’s the actual limit. no point pretending i have 100Mbps.

real-world results
| what | before | after | difference |
|---|---|---|---|
| download speed | 17Mbps (hijacked) | 60Mbps (full) | actually works now |
| latency during traffic | 150ms+ (stuttering calls) | 25-30ms (smooth) | night and day |
| packet drops | constant | zero | stopped losing data |
| video calls while downloading | choppy mess | crystal clear | actually usable |
| setup hassle | manual every reboot | one install | set it and forget |
the nightmare: why my CAKE kept reverting to 17Mbps
installed CAKE. it worked. 60Mbps. beautiful. then i suspend the desktop:
- wake up. run check-cake. 17Mbps.
- what the fuck.
- spend 3 hours debugging. is the sleep hook broken? is systemd broken? rebuild the hook. nothing.
- install it again. 60Mbps. two hours later. 17Mbps again.
finally found it. old NetworkManager dispatcher script:
/etc/NetworkManager/dispatcher.d/99-cake-wlp3s0
this hidden script was running every time wifi connected:
/usr/sbin/tc qdisc replace dev wlp3s0 root cake bandwidth 17mbit
forcing 17Mbps. silently. no logs. no errors. just hijacking everything. from a previous experiment. forgotten. haunting me.
lesson learned: old configs will destroy your new setup. the installer now cleans these up automatically.
the installer (finally works)
instead of multiple scripts and manual steps, just one installer with a menu.
sudo bash cake-installer.sh
shows a menu. you pick what you want.
option 1: install
- finds your interface automatically (wlp3s0, eth0, whatever)
- detects if it’s wifi or ethernet (adjusts RTT and overhead)
- asks for your actual modem speed (60 in my case)
- creates the setup script with your bandwidth
- creates systemd boot service (applies at startup)
- creates systemd-sleep hook (restores after suspend)
- cleans up old hijacker scripts (the 17Mbps problem)
- applies CAKE immediately
- adds check-cake function to your bashrc
option 2: uninstall
removes everything cleanly. back to default kernel qdisc.
option 3: revert to default
removes CAKE from your interfaces. keeps files. safe way to test.
done. no confusion. just works.
after install
source ~/.bashrc
check-cake
you see:
CAKE qdisc status (wlp3s0 - wifi):
bandwidth 60Mbit
drops 0
av_delay 30us
...

test suspend/resume
systemctl suspend
# wake up, wait 5 seconds
check-cake
should still show 60Mbps. the sleep hook restores CAKE automatically. mine has been running for 19+ hours solid. suspended multiple times. still 60Mbps every time.
verify with real numbers
ping test:
ping 8.8.8.8 -c 100
my results:
27 packets: 0% loss
avg 51.4ms
stddev 0.88ms
that 0.88ms deviation is tight. latency is consistent. no random spikes.
speedtest:
speedtest-cli
my results:
download: 52.61 Mbps
upload: 18.12 Mbps
ping: 52.85ms
that’s 88% of my modem’s theoretical 60Mbps. normal. ISP overhead, wifi conditions, all that stuff.
the point:
- consistent, no drops, low latency. bufferbloat gone.
CAKE + BBR + ECN + FQ (the full setup)
- CAKE at interface level (packet scheduling)
- BBR at socket level (congestion control, replaces the default cubic)
- ECN (gentle congestion signals instead of packet drops)
- FQ (fair queuing at socket level)
together they eliminate bufferbloat completely.
check what you have:
sysctl net.ipv4.tcp_congestion_control
sysctl net.ipv4.tcp_ecn
sysctl net.core.default_qdisc
if you need to enable BBR:
sudo sysctl -w net.ipv4.tcp_congestion_control=bbr
sudo sysctl -w net.ipv4.tcp_ecn=1
sudo sysctl -w net.core.default_qdisc=fq
# make permanent
sudo tee /etc/sysctl.d/99-cake-tuning.conf > /dev/null << EOF
net.ipv4.tcp_congestion_control = bbr
net.ipv4.tcp_ecn = 1
net.core.default_qdisc = fq
EOF
sudo sysctl -p /etc/sysctl.d/99-cake-tuning.conf
the check-cake function (added to bashrc automatically)
check-cake

shows:
- active interface and type (wifi/ethernet)
- CAKE bandwidth and real-time stats
- packet drops and latency metrics
- systemd service status
one command tells you everything is working.
why you might need to adjust
the installer assumes 60Mbps because that’s what my modem does. if your modem supports 100Mbps or 50Mbps or 1Gbps, just change it:
sudo sed -i 's/bandwidth 60Mbit/bandwidth 100Mbit/' /usr/local/bin/cake-setup.sh
sudo /usr/local/bin/cake-setup.sh
check-cake
CAKE now runs at your actual speed. no guessing.
if something breaks
the installer has three options. if you mess something up, just uninstall and reinstall.
sudo bash cake-installer.sh
# select 2 (uninstall)
# then run again and select 1 (install)
clean installation. no leftover configs. no hijacker scripts.
the real lesson
bufferbloat is real. most people live with it without knowing what it is. your modem has 100ms of buffer. packets queue forever. lag happens. CAKE fixes it by managing that queue properly. packets still flow at full speed, but they don’t pile up. the combo (CAKE + BBR + ECN + FQ) is the gold standard. been tested for years. works.
summary
install once:
sudo bash cake-installer.sh
verify:
check-cake
ping 8.8.8.8 -c 100
speedtest-cli
done. your connection is optimized. 60Mbps maintained. latency consistent. no bufferbloat. works on suspend/resume. works at boot. set it and forget it.
that’s it.
tolga erok | august 2026
Download 👇

Leave a Reply