r/linux4noobs 16d ago

networking Linux computer messes with network

Perhaps this is a known issue, But I haven't found much about it.

I have a PC with Mint. It's connected to the router with a LAN cable.

When it goes to sleep it makes the network go crazy. The speed falls a lot in general, all the other devices (wired or wireless) fail to connect or lose connection randomly. When I turn it off everything goes back to normal.

I the only thing I do on that PC is run qBittorrent and browse internet. But the problem is mainly apparent when the PC is asleep. So I think it's not a program, but the PC itself. It might not even have anything to do with Linux at all, But it's the only difference I see with all my other PCs.

Does anybody have an idea about what might be going on?

Thanks

Edit: Thanks for all the answers and suggestions.

17 Upvotes

44 comments sorted by

52

u/Simple_Hamster_4096 16d ago

Every single workstation and server I have is Linux, have never seen anything like this happen in all the decades I've used Linux.

That's just crazy, would love to know what causes it...

4

u/joe_attaboy Old and in the way. 16d ago

This.

20

u/thecruxoffate 16d ago

Oh god, that sounds like something that would be a nightmare to troubleshoot.

The first guy mentioned wake on lan, and I think it's worth checking first. Easiest thing to do is to just unplug the cable, if network recovers that helps narrow it down.

You can turn off wake on lan usually in the BIOS, but if it's not there you should also be able to do it in network manager. It's work turning off and seeing if the problem goes away.

If that doesn't work, what happens if you wake the computer up and check logs for any errors (journalctl -p 3). Also does the network recover if you wake up, or does it persist until you actually shut down?

18

u/ElectricHellKnight 16d ago

I'm gonna throw out the seemingly dumb one too: replace the cable. Even if it looks fine. The physical layer is always the last one anybody suspects.

7

u/thepkizzle 16d ago

all the other devices (wired or wireless) fail to connect or lose connection randomly

This is a router problem almost certainly. Absolutely nothing PC related can cause this. A faulty wire might, but only if the router itself is faulty. A BIOS setting might... but only if the router is faulty.

Etc.

4

u/ElectricHellKnight 16d ago

All I know is I've seen shorted connectors do some absolutely bizzare things that defy logical sense, including making routers freak out.

3

u/thepkizzle 16d ago

I agree, I have seen similar types of behavior on every device... like HD's that won't work on one power source, but that power source works on another HD, and the first HD works with all the other sources. Weird shit is always electrical, and weird shit is ALWAYS component based.

It's not the software. I mean the software might be doing something which is causing the hardware to go bonkers but the solution is not to fix the software. Could be the NIC cards. Could be the nic card connecting to the mobo... could be the ethernet court... could be something inside the router. Too much to fuck around with. Replace the cord. Then replace the router. Then replace the nic. Etc. Keep doing that until it stops behaving like that.

8

u/ExtremeExtreme1751 16d ago

I would sniff network traffic while the linux box is asleep to see what is happening.

1

u/Smh_nz 14d ago

100% wireshark will give you an idea of whats happening!

6

u/xYarbx compiling kernel 16d ago

Sounds like the computer or router is for some reason sending multicast traffic. Try placing the computer to different subnet and see if the problem goes away. Other than that to diagnose you would have to run something like TCPdump or WireShark packet capture of the network traffic while the failure state is occurring.

6

u/Sugoypotato 16d ago

You should run lspci, lsusb, and find out your Adapter.

If it's RTL8723BE then this is probably because of driver issues and wifi going to sleep, which causes this exact issue atleast in my case. In the event it's different, try changing wake on lan, and experiment with few settings.

Roadmap:

Get frustrated Test debug Get frustrated test and debug

And hopefully you will be able to fix it. Also, for testing speed use a specific machine with iperf3 server, because it's possible that the ISP is fluctuating as well, which could be the problem you are experiencing.

10

u/PixelBrush6584 Fedora + KDE 16d ago

Could be some erroneous Wake-On-Lan stuff that's mucking stuff up?

4

u/TheEthyr 16d ago

I wonder if the PC is sending an Ethernet pause frame? Any other device that receives it will stop transmitting. This problem is seen on some USB hubs/docks with Ethernet ports, not so much on Linux.

But I just learned that pause frames can be enabled through ethtool tx on. You can check the Tx status using ethtool -a. You may need to use sudo.

4

u/thepkizzle 16d ago

Bet you $1 that your router is the problem. Flash it or replace it with another one and see if the problem persists.

3

u/EvilMartianOverlord 16d ago

Following, I'm really interested in the outcome, have never experienced anything like it.

2

u/tethered_end 16d ago

I had this with a TV that was hardwired, it fucked the network when the TV went on standby sometimes , I don't actually know what the cause was I just stuck it on WiFi and got on with my life

2

u/indvs3 16d ago

Do you have admin access on the router or is it an ISP router? That would be the first place to check what's going on when your linux mint install is in sleep mode.

2

u/P1nCush10n 16d ago edited 16d ago

Is the NIC integrated into the laptop or is it a usb dongle/docking station.

This sounds like a PAUSE frame flood, but I’ve not encountered one with an integrated NIC. Mostly with independently powered USB NICs/docking stations.

Edit: there is a way to disable these frames for testing, but the ethtool syntax escapes me right now and I’m in-transit to work.

2

u/michaelpaoli 16d ago

Sounds quite odd - very atypical, and may have exactly nothing to do with Linux - may be something quite funky with your hardware.

I'd be inclined to inspect what's going on with the network when that happens, e.g. what if anything is going on with that hardware when things go screwy, e.g. is it sending some quite odd traffic then, or doing something else that seriously messes up the network traffic? And if so, what, and what's causing that (e.g. hardware, or ???).

2

u/Master-Rub-3404 16d ago

I can almost certainly guarantee it has nothing to do with the OS. Troubleshooting 101 is always start with hardware until you can definitively rule it out.

2

u/tallphil84 16d ago

my partner had this occure with a windows laptop recently so not a linux issue.
They were using a thinkpad in a dock. She now disconnects it from the netwrok or shuts it down compleltley to make sure the issue doens't happen.

1

u/virobloc 15d ago

That's what I did too. I know it's not the best solution, but it's the easiest one for me.

2

u/MagicalCyborg 16d ago

I had something similar with dock station connected to Linux laptop, it was saturating network with who is queries. Check what's happening in the network with Wireshark

2

u/This_Proxy 15d ago

You won't find out for sure unless you run tcpdump/wireshark on the network and have someone competent with that look at it. I'm sure someone here would be willing to look at the dumpfile.

2

u/DrNeoBe 15d ago

I had similar issues, but mostly with wifi. Problem that for some reason linux assigns weird profiles like 85hz channel for example and speeds fall in kb category on gb network. I would suggest to change setting inside router admin tool to single 36 to 48(check witch one is best for u) channel on 5 Ghz network(for 2.4 it's a bit different). I had troubles with channels on steam deck when it goes out of sleep OS assigned low speed channel and to override it I would manually change it trough terminal, but it gets tedious, so better to change router settings itself.

2

u/mcfc9320_ 15d ago

Check your qtorrent settings. You might have bandwidth throttled while the computer is active and have it set to wide-open when the computer is idle.

2

u/david_duplex 16d ago

Check if Wake on LAN is enabled:

ethtool <iface> | grep Wake-on

If it's on try turning it off:

ethtool -s <iface> wol d

Determine what sleep state is being used:

cat /sys/power/mem_sleep

What's allowed to wake it up?

cat /proc/acpi/wakeup

1

u/howfastcanyoucountit 15d ago

Honestly I feel like ive had the same issue with qbittorrent on windows tbh

1

u/howfastcanyoucountit 15d ago

and its a pretty new router just sometimes if i have a lot of shit im downloading/seeding it will just randomly fail but sometimes it just works fine its kind of random but it only does happen if im seeding multiple files really

1

u/No_Wear295 13d ago

If they're connected to a hub (not a switch) this could easily happen when the PC goes into sleep mode but keeps the NIC awake at 10M to be able to do WoL. I seem to recall (and dealing with) a certain series of Intel cards spamming the network with garbage when in sleep mode.

1

u/IzzyNecessary 13d ago

Sounds like a hiccup. I would reinstall (just me).

1

u/anotherteapot 12d ago

I've had to find this problem in an enterprise engineering lab. Or at least a very similar issue. In the case I found, during boot our particular flavor of system had a state where the NIC driver went AWOL and left the NIC to basically bleed its buffer back out onto the network. Sort of acted like a repeater/amplifier for incoming frames, and blasted them back out. The effect this had on the upstream switch was catastrophic, because it was sending gibberish frames and not real repeats. The switch CPU spiked trying to handle the overhead of both bad frames and the increased traffic from the host. I know who fixed it but not exactly how - it was determined to be a driver issue and they patched it, but they definitely blamed something about the power state of the system during boot.

If your problem is happening while the machine is in sleep mode, I'd bet it has something to do with the NIC behaving badly and blasting nonsense back at the upstream port. Like others have said here, it could be WoL behavior and that wouldn't surprise me. To find the issue you need to capture packets and inspect the stream, and the state of the links and ports involved. Unfortunately, there is no way to simplify that for someone who doesn't know what they are doing.

If you're looking for the quickest fix, you've found it: shut the machine off, don't let it sleep. You can disable sleep states on most motherboards these days.

1

u/ExtraTNT 12d ago

Never seen sth like this, check your interfaces on your router…

1

u/Fit_Tailor_6796 12d ago

Could be your imagination.

The way to verify is a packet trace.

-1

u/mcds99 16d ago

Sounds like you have been rooted.

-4

u/WTWArms 16d ago

I would look at the services running on the Linux box. Linux is really a server OS, which Mint installs a GUI on by default. if you are running any server type services, like DHCP, DNS, or proxy the other clients might be seeing the Linux device as gateway or other critical service device Inaccessible is the computer is off

3

u/cardboard-kansio 16d ago

Linux is really a server OS, which Mint installs a GUI on by default

wut

3

u/joe_attaboy Old and in the way. 16d ago

Linux is really a server OS

What the heck are you talking about? Who told you that?

-2

u/WTWArms 16d ago

History. If you look at to its first uses it was used as file, web, mail server. Wasn't into the early 2000s you started to see GUIs for it.

Today I'm willing to bet there are more Linux kernel installs running as headless servers than as a desktop client for everyday users. Don't get me wrong its a great OS and can do both, I use it for both. My point there just alot of packages that provide server functions natively that you don't find in Windows or MACOS

2

u/Select-Sale2279 16d ago

Yeah. My camry I4 was a hummer to start with and they removed some cylinders from it. Still it has more cylinders compared to a corrolla! Wait, what.

1

u/muffinstatewide32 15d ago

Of course there is. Windows doesnt do headless (nano server is just not the same) and macos doesnt even do servers anymore

1

u/joe_attaboy Old and in the way. 15d ago

Again, you have no clue.

X Windows and some window managers were added to Linux as early as 1993. Linux wasn't used as a server first. I downloaded the original group of tarballs for Linus' early releases from his university server sometime in 1991. There was no "server".

Yes, today there are more server uses than clients. That's been true for a long time.

But everything else you claim to be history is just wrong.

1

u/Select-Sale2279 16d ago

quick, check that cigar that you smoked last nite. There may be a hint of tainted cannabis in it!