0

I'm on Ubuntu 18.04.3 (Linux 5.0.0-32-generic) and I'm having a kernel crash with my Realtek PCIE Gigabit Ethernet Controller. At first, I was using free r8169 driver but as it kept crashing I switched to the latest r8168-dkms driver (8.047.04-1), which seems not to change anything. First I thought it was a hardware problem, and as I have 2 strictly identical PCs I switched hard drives, but the problem is the same on both.

The problem is always the same: I can randomly use my PC for a few minutes or hours, and then the network disconnects and all the input methods are stuck, while the applications seem to keep on running. The only way is then to hard-reboot.

Each time, I have the exact same kernel panic, here is the log:

nov. 05 14:54:37 hv-desktop-0 gnome-software[2531]: failed to rescan: No valid root node specified
nov. 05 14:54:39 hv-desktop-0 kernel: pci_raw_set_power_state: 25 callbacks suppressed
nov. 05 14:54:39 hv-desktop-0 kernel: pcieport 0000:02:06.0: Refused to change power state, currently in D3
nov. 05 14:54:39 hv-desktop-0 kernel: pcieport 0000:02:05.0: Refused to change power state, currently in D3
nov. 05 14:54:39 hv-desktop-0 kernel: pcieport 0000:02:04.0: Refused to change power state, currently in D3
nov. 05 14:54:39 hv-desktop-0 kernel: pcieport 0000:02:00.0: Refused to change power state, currently in D3
nov. 05 14:54:40 hv-desktop-0 sudo[3603]: pam_unix(sudo:session): session closed for user root
nov. 05 14:54:42 hv-desktop-0 gnome-software[2531]: Only 0 apps for recent list, hiding
nov. 05 14:54:43 hv-desktop-0 PackageKit[1162]: search-file transaction /643_cabbdbdd from uid 1000 finished with success after 549ms
nov. 05 14:54:43 hv-desktop-0 gnome-software[2531]: Failed to find one package for NoMachine-status-xfce.desktop, /usr/share/applications/NoMachine-status-xfce.desktop, [0]
nov. 05 14:54:43 hv-desktop-0 kernel: enp7s0: cmd = 0xff, should be 0x07 
                                             .
nov. 05 14:54:43 hv-desktop-0 kernel: enp7s0: io_base_l = 0xffff, should be 0xf001 
                                             .
nov. 05 14:54:43 hv-desktop-0 kernel: enp7s0: mem_base_l = 0xffff, should be 0x4004 
                                             .
nov. 05 14:54:43 hv-desktop-0 kernel: enp7s0: mem_base_h = 0xffff, should be 0xfcd0 
                                             .
nov. 05 14:54:43 hv-desktop-0 kernel: enp7s0: resv_0x1c_l = 0xffff, should be 0x0000 
                                             .
nov. 05 14:54:43 hv-desktop-0 kernel: enp7s0: resv_0x1c_h = 0xffff, should be 0x0000 
                                             .
nov. 05 14:54:43 hv-desktop-0 kernel: enp7s0: resv_0x20_l = 0xffff, should be 0x0004 
                                             .
nov. 05 14:54:43 hv-desktop-0 kernel: enp7s0: resv_0x20_h = 0xffff, should be 0xfcd0 
                                             .
nov. 05 14:54:43 hv-desktop-0 kernel: enp7s0: resv_0x24_l = 0xffff, should be 0x0000 
                                             .
nov. 05 14:54:43 hv-desktop-0 kernel: enp7s0: resv_0x24_h = 0xffff, should be 0x0000 
                                             .
nov. 05 14:54:43 hv-desktop-0 kernel: enp7s0: ilr = 0xff, should be 0x05 
                                             .
nov. 05 14:54:43 hv-desktop-0 kernel: enp7s0: resv_0x2c_l = 0xffff, should be 0x1043 
                                             .
nov. 05 14:54:43 hv-desktop-0 kernel: enp7s0: resv_0x2c_h = 0xffff, should be 0x8677 
                                             .
nov. 05 14:54:43 hv-desktop-0 kernel: enp7s0: pci_sn_l = 0xffffffff, should be 0x684ce000 
                                             .
nov. 05 14:54:43 hv-desktop-0 kernel: enp7s0: pci_sn_h = 0xffffffff, should be 0x01000000 
                                             .
nov. 05 14:54:43 hv-desktop-0 kernel: enp7s0: esd_flag = 0x7fff
                                             .
nov. 05 14:54:43 hv-desktop-0 kernel: WARNING: CPU: 0 PID: 3459 at /var/lib/dkms/r8168/8.047.04/build/r8168_n.c:6824 rtl8168_wait_phy_ups_resume+0x6a/0x80 [r8168]
nov. 05 14:54:43 hv-desktop-0 kernel: Modules linked in: nls_iso8859_1 edac_mce_amd ccp kvm snd_hda_codec_realtek irqbypass snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi snd_hda_intel snd_hda_codec snd_hda_core joydev snd_hwdep amdgpu input_leds snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq snd_seq_device snd_timer crct10dif_pclmul snd crc32_pclmul soundcore ghash_clmulni_intel chash amd_iommu_v2 gpu_sched ttm drm_kms_helper drm aesni_intel aes_x86_64 i2c_algo_bit fb_sys_fops crypto_simd eeepc_wmi syscopyarea cryptd asus_wmi sysfillrect sparse_keymap sysimgblt glue_helper wmi_bmof k10temp mac_hid sch_fq_codel lm78 hwmon_vid parport_pc ppdev lp parport ip_tables x_tables autofs4 hid_generic usbhid hid r8168(OE) i2c_piix4 ahci libahci wmi gpio_amdpt video gpio_generic
nov. 05 14:54:43 hv-desktop-0 kernel: CPU: 0 PID: 3459 Comm: Web Content Tainted: G           OE     5.0.0-32-generic #34~18.04.2-Ubuntu
nov. 05 14:54:43 hv-desktop-0 kernel: Hardware name: System manufacturer System Product Name/PRIME B450M-A, BIOS 1804 07/29/2019
nov. 05 14:54:43 hv-desktop-0 kernel: RIP: 0010:rtl8168_wait_phy_ups_resume+0x6a/0x80 [r8168]
nov. 05 14:54:43 hv-desktop-0 kernel: Code: 75 d8 49 8b bd 40 09 00 00 be 20 a4 00 00 e8 dd fc ff ff 41 89 c4 41 83 e4 07 eb be 83 fb 64 74 09 5b 41 5c 41 5d 41 5e 5d c3 <0f> 0b 5b 41 5c 41 5d 41 5e 5d c3 90 66 2e 0f 1f 84 00 00 00 00 00
nov. 05 14:54:43 hv-desktop-0 kernel: RSP: 0000:ffffa0bf58403de8 EFLAGS: 00010046
nov. 05 14:54:43 hv-desktop-0 kernel: RAX: 000000a3afcaa426 RBX: 0000000000000064 RCX: 0000000000000002
nov. 05 14:54:43 hv-desktop-0 kernel: RDX: 000000000037e9a7 RSI: 000000a3af92ba7f RDI: 000000000037e681
nov. 05 14:54:43 hv-desktop-0 kernel: RBP: ffffa0bf58403e08 R08: 00000000ffffffff R09: 0000000000000000
nov. 05 14:54:43 hv-desktop-0 kernel: R10: 0000000000000002 R11: 000000000000000f R12: 0000000000000007
nov. 05 14:54:43 hv-desktop-0 kernel: R13: ffffa0bf4cba8000 R14: 0000000000000003 R15: ffffa0bf4cba8940
nov. 05 14:54:43 hv-desktop-0 kernel: FS:  00007f5681197780(0000) GS:ffffa0bf58400000(0000) knlGS:0000000000000000
nov. 05 14:54:43 hv-desktop-0 kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
nov. 05 14:54:43 hv-desktop-0 kernel: CR2: 00007f566282012d CR3: 00000000ce610000 CR4: 00000000003406f0
nov. 05 14:54:43 hv-desktop-0 kernel: Call Trace:
nov. 05 14:54:43 hv-desktop-0 kernel:  <IRQ>
nov. 05 14:54:43 hv-desktop-0 kernel:  rtl8168_powerup_pll+0xae/0x110 [r8168]
nov. 05 14:54:43 hv-desktop-0 kernel:  rtl8168_esd_timer+0x37c/0x650 [r8168]
nov. 05 14:54:43 hv-desktop-0 kernel:  ? rtl8168_open+0x4c0/0x4c0 [r8168]
nov. 05 14:54:43 hv-desktop-0 kernel:  call_timer_fn+0x30/0x130
nov. 05 14:54:43 hv-desktop-0 kernel:  run_timer_softirq+0x3ff/0x450
nov. 05 14:54:43 hv-desktop-0 kernel:  ? ktime_get+0x43/0xb0
nov. 05 14:54:43 hv-desktop-0 kernel:  ? lapic_next_event+0x20/0x30
nov. 05 14:54:43 hv-desktop-0 kernel:  __do_softirq+0xe4/0x2f3
nov. 05 14:54:43 hv-desktop-0 kernel:  irq_exit+0xc5/0xd0
nov. 05 14:54:43 hv-desktop-0 kernel:  smp_apic_timer_interrupt+0x79/0x140
nov. 05 14:54:43 hv-desktop-0 kernel:  apic_timer_interrupt+0xf/0x20
nov. 05 14:54:43 hv-desktop-0 kernel:  </IRQ>
nov. 05 14:54:43 hv-desktop-0 kernel: RIP: 0033:0x7f5678ba6648
nov. 05 14:54:43 hv-desktop-0 kernel: Code: 00 00 41 be 30 00 00 00 c7 44 24 4c 30 00 00 00 e9 0d fb ff ff 0f 1f 44 00 00 48 8b 54 24 08 48 8d 71 01 48 89 72 18 0f b6 29 <40> 80 fd 0b 74 3a 40 80 fd 0e 74 34 85 c0 0f 85 58 fe ff ff 83 6c
nov. 05 14:54:43 hv-desktop-0 kernel: RSP: 002b:00007ffce37b3670 EFLAGS: 00000216 ORIG_RAX: ffffffffffffff13
nov. 05 14:54:43 hv-desktop-0 kernel: RAX: 0000000000000000 RBX: 00007f5666882ee0 RCX: 00007f56634bf19e
nov. 05 14:54:43 hv-desktop-0 kernel: RDX: 00007f5666ad5820 RSI: 00007f56634bf19f RDI: 00007f56634bf1bc
nov. 05 14:54:43 hv-desktop-0 kernel: RBP: 00000000000000fb R08: 00007ffce37b37f0 R09: 00007f5678bf24d8
nov. 05 14:54:43 hv-desktop-0 kernel: R10: 00007f5666ad5800 R11: 00007f5666ad5820 R12: 0000000000000003
nov. 05 14:54:43 hv-desktop-0 kernel: R13: 0000000000000003 R14: 00007ffce37b5100 R15: 00007f5666ad4c00
nov. 05 14:54:43 hv-desktop-0 kernel: ---[ end trace 9390e7bc86428ea5 ]---
nov. 05 14:54:43 hv-desktop-0 kernel: r8168: enp7s0: link up

and here is the output of sudo lshw -C network

*-network                 
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:07:00.0
       logical name: enp7s0
       version: 15
       serial: 04:d9:f5:cd:b5:aa
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.047.04-NAPI duplex=full ip=192.168.10.115 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
       resources: irq:65 ioport:f000(size=256) memory:fcd04000-fcd04fff memory:fcd00000-fcd03fff

If anyone has any clue about how to solve that, thanks in advance for your help.

  • Hm, I'm having random crashes on that exact kernel version too but using r8169. It's been stable on older kernels. – KeksArmee Nov 10 '19 at 12:59
  • @KeksArmee Read my answer, I hope this can help you. TLDR; Update your BIOS. – Benjamin Barrois Nov 19 '19 at 10:19
  • Thanks for the reminder. Seems like kernel 5.3 also fixes it. – KeksArmee Nov 21 '19 at 11:30
0

Actually the problem was not related to the network driver but to a bug with PCI management. The following lines in the log were important:

nov. 05 14:54:39 hv-desktop-0 kernel: pci_raw_set_power_state: 25 callbacks suppressed
nov. 05 14:54:39 hv-desktop-0 kernel: pcieport 0000:02:06.0: Refused to change power state, currently in D3
nov. 05 14:54:39 hv-desktop-0 kernel: pcieport 0000:02:05.0: Refused to change power state, currently in D3
nov. 05 14:54:39 hv-desktop-0 kernel: pcieport 0000:02:04.0: Refused to change power state, currently in D3
nov. 05 14:54:39 hv-desktop-0 kernel: pcieport 0000:02:00.0: Refused to change power state, currently in D3

I simply solved it by updating the motherboard's BIOS (Asus PRIME B450M-A) which recent change logs explicitly talk about the resolution of a problem with Linux. Since then, zero crash.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.