-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Network interface keeps restarting after connected PC is shut down #145
Comments
So setting MTU to default 1500 in NAS only, reduces this issue to only 1 link down/up after pc is shut down and several of them after turning pc on until login screen. Changing MTU in pc has no effect. |
If I detach the LAN adapter on the PC side from the USB, will the problem no longer occur? If so, you may try changing the power management settings of the LAN adapter on the PC side from Device Manager and the power supply settings of the USB port from BIOS settings. |
Yes if i disconnect the cable on PC side, this spam stops. I tried disabling all settings in LAN adapter driver in device manager that sounded like related to power management but nothing changed. There are many more, no idea what else to change. When PC is shut down, the LED on 2.5G port on the back is still blinking, motherboard never shuts down the adapter. But like i said, setting MTU to 1500 at least reduce this spam, so it is somehow related to MTU setting. |
Could you try to disable auto-negotiation by this command?: |
It doesn't work with speed 2500 for some reason, command accepts only speed 1000. Seems like it doesn't matter, eth2 link speed stayed at 2500. But it looks like it fixed this issue. Even with 9000 MTU there is only one "Link down" event in log after PC shutdown. |
This issue seems auto-negotiation issue caused by the PC side. Disabling auto-negotiation on the PC side may also fix the issue. The problem seems to be solved, so this issue is closed. |
I have tried the command ethtool -s eth2 autoneg off,but it could only work at speed 1000. If I use the command ethanol -s eth2 speed 1000 duplex full autoneg off first, then the autoneg is off, but the speed only at 1000 and I could not use the command ethtool -s eth2 speed 2500 duplex full to set the speed back to 2500. how could you set the speed back to 2500? |
I just used speed 1000 and it stayed at 2500, but i am permanently connected to my PC so the link speed is already negotiated or something and won't change. Also if you get it to work, you need to schedule a task to run that command automatically after every reboot. |
After upgrading to DSM 7.1 and 2.16.3-2 this broke again. ethtool doesn't support 2500 as speed parameter so there is no way to disable auto-negotiation anymore and interface keeps spamming those Link DOWN / Link UP events again. Disabling auto-negotiation on PC side only doesn't fix this issue. Any ideas? |
The documentation says this command disables autonegotiation, does it work in your environment?
|
with that command |
It seems like auto-negotiation setting just isn't available while using 2.5Gbit mode. See https://github.com/bb-qq/r8152/blob/master/r8152.c#L9121 Do you think you could add support for it? |
Realtek says that:
So I think auto-negotiation should be off internally. Is it possible to know the link speed on the peer device side? |
Those commands aren't doing anything. On PC i disabled auto-negotiation and set 2.5Gbit manually. But looking at ethtool output these lines are interesting:
If i understand correctly Link partner is my PC, and for some reason it is not advertising 2500 but it is advertising auto-negotiation as enabled even though it's set to 2500 manually. Could it be the cause for this issue? |
@bb-qq so ignore everything above, i found the cause of this issue. There is a setting in the windows realtek driver called "WOL & Shutdown Link Speed". Choosing "Not speed down" fixes this, no more Link UP/DOWN spam in logs. |
Description of the problem
Like i wrote here #135 (comment) this setup is working and stable during normal use. When i shut down PC connected to NAS with that adapter, network interface keeps restarting generating spam like this in the log:
Thousands of log entries during night. Tried using both DHCP and static IPs for this interface, several NAS restarts,.. can't fix it.
Only thing that stops this spam is disconnect and reconnect USB adaper or network cable while PC is still shut down.
Motherboard doesn't power off the NIC, LEDs are still blinking while this is happening. Didn't find any related settings in BIOS.
This problem persists after PC is powered on again until Windows loads into login screen.
When i manually disable the NIC on PC or disconnect the cable, NAS correctly just says Disconnected in the LAN 3 interface.
There is nothing in /var/log/packages/r8152.log while this is happening.
Description of your products
Description of your environment
Output of
dmesg
command (pasting only segment between consecutive link UP and DOWN)Output of
lsusb
commandOutput of
ifconfig -a
commandThe text was updated successfully, but these errors were encountered: