I have this bizarre problem with my PC. Linux networking stops working after I play a game on Windows.
Situation
I have dual boot, Windows 10 for gaming and Manjaro linux for day-to-day use. I'm using a cable connection to my router, so it is fast and stable. I bought a new game recently, and my typical PC use looks like this:
- I turn on my PC and boot into linux for a few hours of work
- I reboot into windows, and I'm playing this game for like an hour or so
- I reboot into linux again
After I switch back to linux and I try to use the internet, it stops after downloading a few hundred KB of data (maybe around 1 MB, hard to say exactly).
Trying to debug and fix
When it first happened, I thought it was some router issue or ISP problem. But no, other devices in my home network worked fine so not ISP. Cable itself and router are fine too because the internet works all the time on Linux after first boot and also on Windows when gaming. Other things I tried:
- Disconnect and connect using network applet ❌
- Restart networking service
sudo systemctl restart NetworkManager.service❌ - Unplug and plug network cable again ❌
- Reboot into linux again ❌
- Reboot into windows (internet works) and reboot into linux ❌
- Turn off PC, wait a few seconds, and then start it into linux ❌
- Turn off PC, cut off electricity, wait like 30s, switch electricity back, boot PC into linux ✅
The only way to make the internet work again is to cut off electricity, and then boot into linux.
That looks like it is a hardware problem, but on the other hand, the internet works fine on Windows even just after playing game. I was also thinking that maybe something was overheating, but again, even after turning off my PC for a few hours (without cutting off electricity), it is still not working on Linux.
I can't figure out what is going on. Do you have any idea what could be the cause?
Debug info
$ uname -a
Linux piotrek-pc 6.5.13-1-MANJARO #1 SMP PREEMPT_DYNAMIC Tue Nov 28 20:33:05 UTC 2023 x86_64 GNU/Linux
----
$ journalctl -p 3 -b0
gru 05 23:29:12 piotrek-pc colord-sane[1041]: io/hpmud/pp.c 627: unable to read device-id ret=-1
----
$ ping google.com
ping: google.com: Temporary failure in name resolution
----
$ sudo systemctl status NetworkManager.service
[sudo] password for piotrek:
● NetworkManager.service - Network Manager
Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; preset: disabled)
Active: active (running) since Tue 2023-12-05 23:29:11 CET; 1h 3min ago
Docs: man:NetworkManager(8)
Main PID: 943 (NetworkManager)
Tasks: 4 (limit: 19101)
Memory: 20.1M
CPU: 233ms
CGroup: /system.slice/NetworkManager.service
└─943 /usr/bin/NetworkManager --no-daemon
gru 05 23:29:14 piotrek-pc NetworkManager[943]: <info> [1701815354.5796] device (vethb5f8884): carrier: link connected
gru 05 23:29:14 piotrek-pc NetworkManager[943]: <info> [1701815354.5798] device (docker0): carrier: link connected
gru 05 23:29:14 piotrek-pc NetworkManager[943]: <info> [1701815354.5799] device (enp30s0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
gru 05 23:29:14 piotrek-pc NetworkManager[943]: <info> [1701815354.5809] device (enp30s0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
gru 05 23:29:14 piotrek-pc NetworkManager[943]: <info> [1701815354.5810] device (enp30s0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
gru 05 23:29:14 piotrek-pc NetworkManager[943]: <info> [1701815354.5812] manager: NetworkManager state is now CONNECTED_SITE
gru 05 23:29:14 piotrek-pc NetworkManager[943]: <info> [1701815354.5814] device (enp30s0): Activation: successful, device activated.
gru 05 23:29:14 piotrek-pc NetworkManager[943]: <info> [1701815354.5818] manager: startup complete
gru 05 23:29:14 piotrek-pc NetworkManager[943]: <info> [1701815354.6467] manager: NetworkManager state is now CONNECTED_GLOBAL
gru 05 23:29:16 piotrek-pc NetworkManager[943]: <info> [1701815356.0664] agent-manager: agent[f36462a8b096765f,:1.35/org.kde.plasma.networkmanagement/1000]: agent registered
----
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: enp30s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 30:9c:23:86:19:ee brd ff:ff:ff:ff:ff:ff
inet 192.168.1.5/24 brd 192.168.1.255 scope global dynamic noprefixroute enp30s0
valid_lft 86140sec preferred_lft 86140sec
inet6 fe80::6bad:f8d:8529:725d/64 scope link noprefixroute
valid_lft forever preferred_lft forever
----
$ journalctl -p 3 -b0 -o short-iso
2023-12-06T17:52:47+0100 piotrek-pc colord-sane[1034]: io/hpmud/pp.c 627: unable to read device-id ret=-1
----
$ sudo dmesg -T --level=emerg,alert,crit,err,warn --time-format iso
2023-12-06T17:52:36,153817+01:00 ACPI BIOS Warning (bug): Optional FADT field Pm2ControlBlock has valid Length but zero Address: 0x0000000000000000/0x1 (20230331/tbfadt-615)
2023-12-06T17:52:36,153947+01:00 Speculative Return Stack Overflow: IBPB-extending microcode not applied!
2023-12-06T17:52:36,153947+01:00 Speculative Return Stack Overflow: WARNING: See https://kernel.org/doc/html/latest/admin-guide/hw-vuln/srso.html for mitigation options.
2023-12-06T17:52:36,328872+01:00 mtrr: your CPUs had inconsistent variable MTRR settings
2023-12-06T17:52:36,467031+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
2023-12-06T17:52:36,467146+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
2023-12-06T17:52:36,467245+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
2023-12-06T17:52:36,467425+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
2023-12-06T17:52:36,467588+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
2023-12-06T17:52:36,467754+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
2023-12-06T17:52:36,467910+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
2023-12-06T17:52:36,468064+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
2023-12-06T17:52:36,468211+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
2023-12-06T17:52:36,468367+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
2023-12-06T17:52:36,468547+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
2023-12-06T17:52:36,468705+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
2023-12-06T17:52:36,468859+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
2023-12-06T17:52:36,468979+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
2023-12-06T17:52:36,469114+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
2023-12-06T17:52:36,469249+01:00 [Firmware Bug]: ACPI MWAIT C-state 0x0 not supported by HW (0x0)
2023-12-06T17:52:36,480090+01:00 amd_pstate: the _CPC object is not present in SBIOS or ACPI disabled
2023-12-06T17:52:41,636165+01:00 vboxdrv: loading out-of-tree module taints kernel.
2023-12-06T17:52:41,679047+01:00 VBoxNetAdp: Successfully started.
2023-12-06T17:52:41,680999+01:00 VBoxNetFlt: Successfully started.
2023-12-06T17:52:42,529751+01:00 r8168 Copyright (C) 2023 Realtek NIC software team <[email protected]>
This program comes with ABSOLUTELY NO WARRANTY; for details, please see <http://www.gnu.org/licenses/>.
This is free software, and you are welcome to redistribute it under certain conditions; see <http://www.gnu.org/licenses/>.
2023-12-06T17:52:49,704231+01:00 ksplashqml[1546]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set
----
$ sudo lspci -v -d ::0200
1e:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
Subsystem: Micro-Star International Co., Ltd. [MSI] RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
Flags: bus master, fast devsel, latency 0, IRQ 33, IOMMU group 12
I/O ports at f000 [size=256]
Memory at fe604000 (64-bit, non-prefetchable) [size=4K]
Memory at fe600000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Endpoint, MSI 01
Capabilities: [b0] MSI-X: Enable+ Count=4 Masked-
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [160] Device Serial Number 01-00-00-00-68-4c-e0-00
Capabilities: [170] Latency Tolerance Reporting
Capabilities: [178] L1 PM Substates
Kernel driver in use: r8168
Kernel modules: r8169, r8168
// EDIT
I did some testing and seems like gaming has nothing to do with this. It is Windows 10 that breaks networking somehow after reboot. I noticed that my router see my PC even after shutdown so probably network card is still working. After I cut off electricity and wait like 30s my router connection led is not active any more and then networking is working on Linux again.
Is there any way to disable network card right after shutdown? I tried to search in BIOS but could not find option.
ping 8.8.8.8successfully while in the broken state?journalctl