Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel panic with Realtek r8169 and 5.3+ (SOLVED - Info
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3423

PostPosted: Thu Dec 05, 2019 1:08 am    Post subject: Kernel panic with Realtek r8169 and 5.3+ (SOLVED - Info Reply with quote

This is solved, or at least a workaround, but I'm putting it here for information, in case it helps anyone.

My main system refused to boot kernel 5.3+, issuing a panic when it went to start the ethernet device. (Realtek that uses the r8169.ko kernel driver) To make a long story short, I found this: https://bugzilla.kernel.org/show_bug.cgi?id=204343 While this isn't really a fix, the workaround is to make sure the Realtek PHY driver (realtek.ko) is loaded before trying to start the ethernet device. In my case, I added it to "/etc/conf.d/modules".

I'm happily running 5.4.1 now.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3546
Location: Illinois, USA

PostPosted: Thu Dec 05, 2019 3:32 am    Post subject: Reply with quote

I've never had a problem.
Code:
tony@MSI ~ $ zgrep REALTEK /proc/config.gz
CONFIG_NET_VENDOR_REALTEK=y
CONFIG_REALTEK_PHY=m
# CONFIG_WLAN_VENDOR_REALTEK is not set
CONFIG_SND_HDA_CODEC_REALTEK=m
# CONFIG_USB_STORAGE_REALTEK is not set
tony@MSI ~ $ zgrep R8169 /proc/config.gz
CONFIG_R8169=m
tony@MSI ~ $ uname -a
Linux MSI 5.3.14-gentoo-r1 #1 SMP Sun Dec 1 09:59:00 CST 2019 x86_64 AMD Ryzen 7 2700X Eight-Core Processor AuthenticAMD GNU/Linux

I think the difference is that I'm running gentoo-sources, not vanilla-sources.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3423

PostPosted: Thu Dec 05, 2019 10:22 am    Post subject: Reply with quote

Tony0945 wrote:
I've never had a problem.
Code:
tony@MSI ~ $ zgrep REALTEK /proc/config.gz
CONFIG_NET_VENDOR_REALTEK=y
CONFIG_REALTEK_PHY=m
# CONFIG_WLAN_VENDOR_REALTEK is not set
CONFIG_SND_HDA_CODEC_REALTEK=m
# CONFIG_USB_STORAGE_REALTEK is not set
tony@MSI ~ $ zgrep R8169 /proc/config.gz
CONFIG_R8169=m
tony@MSI ~ $ uname -a
Linux MSI 5.3.14-gentoo-r1 #1 SMP Sun Dec 1 09:59:00 CST 2019 x86_64 AMD Ryzen 7 2700X Eight-Core Processor AuthenticAMD GNU/Linux

I think the difference is that I'm running gentoo-sources, not vanilla-sources.


I'm running gentoo-sources, too. Neither 5.3.x nor 5.4.x booted for me until I manually loaded the Realtek PHY module. On the kernel bug report there was mention of needing kmod 26, but I've had that all along, too.
Code:
 $ zgrep REALTEK /proc/config.gz
CONFIG_NET_VENDOR_REALTEK=y
CONFIG_REALTEK_PHY=m
CONFIG_SND_HDA_CODEC_REALTEK=m
CONFIG_USB_STORAGE_REALTEK=m
CONFIG_REALTEK_AUTOPM=y
 $ zgrep R8169 /proc/config.gz
CONFIG_R8169=m

_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3546
Location: Illinois, USA

PostPosted: Thu Dec 05, 2019 3:33 pm    Post subject: Reply with quote

depontius wrote:
I'm running gentoo-sources, too. Neither 5.3.x nor 5.4.x booted for me until I manually loaded the Realtek PHY module.

systemd, openrc or other? if openrc. which version?
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4402
Location: Dallas area

PostPosted: Thu Dec 05, 2019 5:38 pm    Post subject: Reply with quote

I have CONFIG_REALTEK_PHY=y with CONFIG_R8169=m but I'm only running 5.0.13, never had any problems though
_________________
Asus m5a99fx, FX 8320 - nouveau, oss4, rx550 for qemu passthrough
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
5.0.13 zen kernel, profile 17.1 (no-pie & modified) amd64-no-multilib
gcc 8.2.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3546
Location: Illinois, USA

PostPosted: Thu Dec 05, 2019 7:32 pm    Post subject: Reply with quote

Anon-E-moose wrote:
I have CONFIG_REALTEK_PHY=y with CONFIG_R8169=m but I'm only running 5.0.13, never had any problems though

I believe you are running old OpenRC as am I. I specify in /etc/init.d/modules which modules to load.
I'm guessing that later OpenRC that loads all modules first loads them in the wrong order. Of course if you have =y instead of =m on PHY, it doesn't matter.
Or is my theory all wet? I don't consciously load PHY at all. I surmise that R8169 loads it.
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4402
Location: Dallas area

PostPosted: Thu Dec 05, 2019 7:54 pm    Post subject: Reply with quote

CONFIG_REALTEK_PHY=y builds it in, not a module.

But if it's a modules R8169 should load it, if not, then I would consider that a bug.

lsmod should show (if it's loaded and who caused it to be loaded)

Edit to add: I specifically made PHY be built in, it does get triggered if r8169 is selected, but it probably creates it as a module (or mirrors r8169 selection)

Code:
config R8169
    tristate "Realtek 8169 gigabit ethernet support"
    depends on PCI
    select FW_LOADER
    select CRC32
    select PHYLIB
    select REALTEK_PHY

_________________
Asus m5a99fx, FX 8320 - nouveau, oss4, rx550 for qemu passthrough
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
5.0.13 zen kernel, profile 17.1 (no-pie & modified) amd64-no-multilib
gcc 8.2.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3423

PostPosted: Fri Dec 06, 2019 1:06 am    Post subject: Reply with quote

I'm running current OpenRC.

I have always been building REALTEK_PHY, LIBPHY, and R8169 as modules, it just began failing as of 5.13.x, as someone else mentioned in the kernel bugzilla. According to another posting, the realtek phy module should be getting autoloaded by r8169, but it's not. Someone blamed in on kmod < 26, but I have kmod 26 and it's still a problem for me - until putting it in /etc/conf.d/modules.

The other trick about /etc/conf.d/modules is that it gets done in the boot runlevel - well before net.eth0, where it's really needed. This presumes some other mechanism isn't trying to load everything it can, and loads them in the wrong order.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4402
Location: Dallas area

PostPosted: Fri Dec 06, 2019 10:16 am    Post subject: Reply with quote

depontius wrote:
I'm running current OpenRC.
...
This presumes some other mechanism isn't trying to load everything it can, and loads them in the wrong order.


Perhaps the current version of openrc is the culprit or openrc in conjunction with something in the newer kernels *shrugs*
_________________
Asus m5a99fx, FX 8320 - nouveau, oss4, rx550 for qemu passthrough
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
5.0.13 zen kernel, profile 17.1 (no-pie & modified) amd64-no-multilib
gcc 8.2.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3546
Location: Illinois, USA

PostPosted: Fri Dec 06, 2019 1:53 pm    Post subject: Reply with quote

Way old OpenRC here: 0.11
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum