* [gentoo-user] Realtek r8169 realtek.ko not loaded.
@ 2020-05-17 8:07 Alexander Puchmayr
2020-05-17 8:24 ` William Kenworthy
2020-05-17 11:09 ` Victor Ivanov
0 siblings, 2 replies; 7+ messages in thread
From: Alexander Puchmayr @ 2020-05-17 8:07 UTC (permalink / raw
To: gentoo-user
Hi there
I just upgraded an older notebook with r8169 network chip to new kernel 5.4
(sys-kernel/gentoo-sources-5.4.28) with genkernel.
After booting the new kernel the network adapter was not initialized, no
network interface eth0.
Dmesg says
[ 6.390973] r8169 0000:08:00.0: realtek.ko not loaded, maybe it needs to be
added to initramfs?
[ 6.392864] r8169: probe of 0000:08:00.0 failed with error -2
After searching with google I found a thread in the kernel mailing list
https://bugzilla.kernel.org/show_bug.cgi?id=204343
The cause is a soft depencency to module realtek.ko, which needs to be loaded
first.
Doing this manually, i.e. rmmod r8169 && modprobe realtek && modprobe r8169
works fine; network interface eth0 gets configured and is operating.
Since the kernel loads the network module before systemd is running, it has to
be configured in initrd somehow.
So, the final question is, how to get that into initrd with genkernel?
I need to add something like this
cat /etc/modprobe.d/realtek
Softdep r8169 pre: realtek
How do I get this into initrd with genkernel-next?
Thanks in advance
Alex
PS
Profile:
default/linux/amd64/17.0/desktop/plasma/systemd
Relevant packages:
sys-apps/gentoo-systemd-integration-7
sys-apps/kmod-26-r5
sys-apps/systemd-244.3
sys-kernel/genkernel-next-69
sys-kernel/gentoo-sources-5.4.28
Lspci
08:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411
PCI Express Gigabit Ethernet Controller (rev 03)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Realtek r8169 realtek.ko not loaded.
2020-05-17 8:07 [gentoo-user] Realtek r8169 realtek.ko not loaded Alexander Puchmayr
@ 2020-05-17 8:24 ` William Kenworthy
2020-05-17 11:29 ` Alexander Puchmayr
2020-05-17 11:09 ` Victor Ivanov
1 sibling, 1 reply; 7+ messages in thread
From: William Kenworthy @ 2020-05-17 8:24 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1888 bytes --]
Easiest would be to put it in /etc/conf.d/modules and rebuild the
initrd. Genkernel picks it up from there. You could also ask genkernel
to add all built modules to the initrd via its config file.
BillK
On 17/5/20 4:07 pm, Alexander Puchmayr wrote:
> Hi there
>
> I just upgraded an older notebook with r8169 network chip to new kernel 5.4
> (sys-kernel/gentoo-sources-5.4.28) with genkernel.
> After booting the new kernel the network adapter was not initialized, no
> network interface eth0.
> Dmesg says
> [ 6.390973] r8169 0000:08:00.0: realtek.ko not loaded, maybe it needs to be
> added to initramfs?
> [ 6.392864] r8169: probe of 0000:08:00.0 failed with error -2
>
> After searching with google I found a thread in the kernel mailing list
> https://bugzilla.kernel.org/show_bug.cgi?id=204343
> The cause is a soft depencency to module realtek.ko, which needs to be loaded
> first.
>
> Doing this manually, i.e. rmmod r8169 && modprobe realtek && modprobe r8169
> works fine; network interface eth0 gets configured and is operating.
>
> Since the kernel loads the network module before systemd is running, it has to
> be configured in initrd somehow.
> So, the final question is, how to get that into initrd with genkernel?
> I need to add something like this
>
> cat /etc/modprobe.d/realtek
> Softdep r8169 pre: realtek
>
> How do I get this into initrd with genkernel-next?
>
> Thanks in advance
> Alex
>
> PS
> Profile:
> default/linux/amd64/17.0/desktop/plasma/systemd
>
> Relevant packages:
> sys-apps/gentoo-systemd-integration-7
> sys-apps/kmod-26-r5
> sys-apps/systemd-244.3
> sys-kernel/genkernel-next-69
> sys-kernel/gentoo-sources-5.4.28
>
> Lspci
> 08:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411
> PCI Express Gigabit Ethernet Controller (rev 03)
>
>
>
>
[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 2225 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Realtek r8169 realtek.ko not loaded.
2020-05-17 8:07 [gentoo-user] Realtek r8169 realtek.ko not loaded Alexander Puchmayr
2020-05-17 8:24 ` William Kenworthy
@ 2020-05-17 11:09 ` Victor Ivanov
2020-05-18 6:57 ` Alexander Puchmayr
1 sibling, 1 reply; 7+ messages in thread
From: Victor Ivanov @ 2020-05-17 11:09 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1.1: Type: text/plain, Size: 2956 bytes --]
Hi Alexander,
A while back I had the exact same issue with a remote machine that I am
managing. It has an Asus B45-M mobo with an r8169 chipset. Ever since
the 5.2.x kernel family - where it last used to work - it has been a pain.
Initially I added a manual "soft" dependency in "/etc/conf.d/modules" as
William has suggested to you with "realtek" appearing first in the list.
But this stopped working following an update to 5.4.x and is still the
case today with the 5.6.x family (I keep testing it once in a while).
I then decided to build both realtek and r8169 modules into the kernel:
REALTEK_PHY=y
CONFIG_R8169=y
It did require a bit of faff as the whole chain of dependencies from
REALTEK_PHY had to be built in as well, but I think that was about 5-6
kernel options in total.
Adding it to the ramdisk as William suggests might work too. In my case
I didn't bother trying this due to the fact that every failed attempted
required manual intervention by someone to get the machine booted with
working kernel.
I have a gut feeling that tells me adding it to the initrd probably
won't work. But if you're planning on trying it, please keep us posted.
I would be very interested in hearing your solution.
Regards,
V
On 17/05/2020 09:07, Alexander Puchmayr wrote:
> Hi there
>
> I just upgraded an older notebook with r8169 network chip to new kernel 5.4
> (sys-kernel/gentoo-sources-5.4.28) with genkernel.
> After booting the new kernel the network adapter was not initialized, no
> network interface eth0.
> Dmesg says
> [ 6.390973] r8169 0000:08:00.0: realtek.ko not loaded, maybe it needs to be
> added to initramfs?
> [ 6.392864] r8169: probe of 0000:08:00.0 failed with error -2
>
> After searching with google I found a thread in the kernel mailing list
> https://bugzilla.kernel.org/show_bug.cgi?id=204343
> The cause is a soft depencency to module realtek.ko, which needs to be loaded
> first.
>
> Doing this manually, i.e. rmmod r8169 && modprobe realtek && modprobe r8169
> works fine; network interface eth0 gets configured and is operating.
>
> Since the kernel loads the network module before systemd is running, it has to
> be configured in initrd somehow.
> So, the final question is, how to get that into initrd with genkernel?
> I need to add something like this
>
> cat /etc/modprobe.d/realtek
> Softdep r8169 pre: realtek
>
> How do I get this into initrd with genkernel-next?
>
> Thanks in advance
> Alex
>
> PS
> Profile:
> default/linux/amd64/17.0/desktop/plasma/systemd
>
> Relevant packages:
> sys-apps/gentoo-systemd-integration-7
> sys-apps/kmod-26-r5
> sys-apps/systemd-244.3
> sys-kernel/genkernel-next-69
> sys-kernel/gentoo-sources-5.4.28
>
> Lspci
> 08:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411
> PCI Express Gigabit Ethernet Controller (rev 03)
>
>
>
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Realtek r8169 realtek.ko not loaded.
2020-05-17 8:24 ` William Kenworthy
@ 2020-05-17 11:29 ` Alexander Puchmayr
2020-05-17 12:52 ` William Kenworthy
0 siblings, 1 reply; 7+ messages in thread
From: Alexander Puchmayr @ 2020-05-17 11:29 UTC (permalink / raw
To: gentoo-user
Am Sonntag, 17. Mai 2020, 10:24:00 CEST schrieb William Kenworthy:
> Easiest would be to put it in /etc/conf.d/modules and rebuild the
> initrd. Genkernel picks it up from there. You could also ask genkernel
> to add all built modules to the initrd via its config file.
>
Whats the format of that file?
Alex
> BillK
>
> On 17/5/20 4:07 pm, Alexander Puchmayr wrote:
> > Hi there
> >
> > I just upgraded an older notebook with r8169 network chip to new kernel
> > 5.4
> > (sys-kernel/gentoo-sources-5.4.28) with genkernel.
> > After booting the new kernel the network adapter was not initialized, no
> > network interface eth0.
> > Dmesg says
> > [ 6.390973] r8169 0000:08:00.0: realtek.ko not loaded, maybe it needs
> > to be added to initramfs?
> > [ 6.392864] r8169: probe of 0000:08:00.0 failed with error -2
> >
> > After searching with google I found a thread in the kernel mailing list
> > https://bugzilla.kernel.org/show_bug.cgi?id=204343
> > The cause is a soft depencency to module realtek.ko, which needs to be
> > loaded first.
> >
> > Doing this manually, i.e. rmmod r8169 && modprobe realtek && modprobe
> > r8169
> > works fine; network interface eth0 gets configured and is operating.
> >
> > Since the kernel loads the network module before systemd is running, it
> > has to be configured in initrd somehow.
> > So, the final question is, how to get that into initrd with genkernel?
> > I need to add something like this
> >
> > cat /etc/modprobe.d/realtek
> > Softdep r8169 pre: realtek
> >
> > How do I get this into initrd with genkernel-next?
> >
> > Thanks in advance
> >
> > Alex
> >
> > PS
> > Profile:
> > default/linux/amd64/17.0/desktop/plasma/systemd
> >
> > Relevant packages:
> > sys-apps/gentoo-systemd-integration-7
> > sys-apps/kmod-26-r5
> > sys-apps/systemd-244.3
> > sys-kernel/genkernel-next-69
> > sys-kernel/gentoo-sources-5.4.28
> >
> > Lspci
> > 08:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
> > RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 03)
--
Dipl. Ing. Alexander Puchmayr
Grundbachstraße 36
4060 Leonding, Österreich
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Realtek r8169 realtek.ko not loaded.
2020-05-17 11:29 ` Alexander Puchmayr
@ 2020-05-17 12:52 ` William Kenworthy
2020-05-18 6:47 ` Alexander Puchmayr
0 siblings, 1 reply; 7+ messages in thread
From: William Kenworthy @ 2020-05-17 12:52 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 3467 bytes --]
Here is one of mine: its part of openrc - if you don't have it you
might be using systemd which should have something similar.
moriah ~ # cat /etc/conf.d/modules
# Linux users can define a list of modules for a specific kernel version,
# a released kernel version, a main kernel version or all kernel versions.
# The most specific versioned variable will take precedence.
# FreeBSD users can only use the modules="foo bar" setting.
#modules_2_6_23_gentoo_r5="ieee1394 ohci1394"
#modules_2_6_23="tun ieee1394"
#modules_2_6="tun"
#modules_2="ipv6"
#modules="ohci1394"
# Linux users can give modules a different name when they load - the new
name
# will also be used to pick arguments below.
# This is not supported on FreeBSD.
#modules="dummy:dummy1"
# Linux users can give the modules some arguments if needed, per version
# if necessary.
# Again, the most specific versioned variable will take precedence.
# This is not supported on FreeBSD.
#module_ieee1394_args="debug"
#module_ieee1394_args_2_6_23_gentoo_r5="debug2"
#module_ieee1394_args_2_6_23="debug3"
#module_ieee1394_args_2_6="debug4"
#module_ieee1394_args_2="debug5"
# You should consult your kernel documentation and configuration
# for a list of modules and their options.
modules="forcedeth nouveau"
On 17/5/20 7:29 pm, Alexander Puchmayr wrote:
> Am Sonntag, 17. Mai 2020, 10:24:00 CEST schrieb William Kenworthy:
>> Easiest would be to put it in /etc/conf.d/modules and rebuild the
>> initrd. Genkernel picks it up from there. You could also ask genkernel
>> to add all built modules to the initrd via its config file.
>>
> Whats the format of that file?
>
> Alex
>
>
>
>> BillK
>>
>> On 17/5/20 4:07 pm, Alexander Puchmayr wrote:
>>> Hi there
>>>
>>> I just upgraded an older notebook with r8169 network chip to new kernel
>>> 5.4
>>> (sys-kernel/gentoo-sources-5.4.28) with genkernel.
>>> After booting the new kernel the network adapter was not initialized, no
>>> network interface eth0.
>>> Dmesg says
>>> [ 6.390973] r8169 0000:08:00.0: realtek.ko not loaded, maybe it needs
>>> to be added to initramfs?
>>> [ 6.392864] r8169: probe of 0000:08:00.0 failed with error -2
>>>
>>> After searching with google I found a thread in the kernel mailing list
>>> https://bugzilla.kernel.org/show_bug.cgi?id=204343
>>> The cause is a soft depencency to module realtek.ko, which needs to be
>>> loaded first.
>>>
>>> Doing this manually, i.e. rmmod r8169 && modprobe realtek && modprobe
>>> r8169
>>> works fine; network interface eth0 gets configured and is operating.
>>>
>>> Since the kernel loads the network module before systemd is running, it
>>> has to be configured in initrd somehow.
>>> So, the final question is, how to get that into initrd with genkernel?
>>> I need to add something like this
>>>
>>> cat /etc/modprobe.d/realtek
>>> Softdep r8169 pre: realtek
>>>
>>> How do I get this into initrd with genkernel-next?
>>>
>>> Thanks in advance
>>>
>>> Alex
>>>
>>> PS
>>> Profile:
>>> default/linux/amd64/17.0/desktop/plasma/systemd
>>>
>>> Relevant packages:
>>> sys-apps/gentoo-systemd-integration-7
>>> sys-apps/kmod-26-r5
>>> sys-apps/systemd-244.3
>>> sys-kernel/genkernel-next-69
>>> sys-kernel/gentoo-sources-5.4.28
>>>
>>> Lspci
>>> 08:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
>>> RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 03)
>
[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 2225 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Realtek r8169 realtek.ko not loaded.
2020-05-17 12:52 ` William Kenworthy
@ 2020-05-18 6:47 ` Alexander Puchmayr
0 siblings, 0 replies; 7+ messages in thread
From: Alexander Puchmayr @ 2020-05-18 6:47 UTC (permalink / raw
To: gentoo-user
Am Sonntag, 17. Mai 2020, 14:52:32 CEST schrieb William Kenworthy:
Thanks for the example, but it does not work.
I added
Modules="realtek"
The called genkernel initramfs, and rebooted.
The module realtek gets loaded, but obviously too late, I get the same error
message in dmesg and not eth0.
However, I extracted the produced initrd to tmp and made a "grep -r realtek"
on this directory. After removing the audio-realtek related lines, this has
has been found:
...
/lib/modules/5.4.28-gentoo/modules.dep:kernel/drivers/net/ethernet/realtek/
r8169.ko: kernel/drivers/net/phy/libphy.ko
...
./lib/modules/5.4.28-gentoo/modules.softdep:softdep r8169 pre: realtek
./lib/modules/5.4.28-gentoo/modules.order:kernel/drivers/net/phy/realtek.ko
...
There's a softdep-line for r8169 in
./lib/modules/5.4.28-gentoo/modules.softdep inside the initrd, but it seems to
be ignored.
This lead me to initrd:/sbin/modprobe, which is a link to busybox. And the
busybox binary embedded here is v1.20, released in 2012 (!). However,
consulting google yielded that busybox's modprobe implementation does not
support softdeps, even newer versions:
https://www.element14.com/community/message/234094
https://forums.slimdevices.com/showthread.php?107329-Cirrus-Logic-Audio-Card-and-Wolfson-support-in-PCP-3-20
It seems as if I get stuck here, pre-loading required modules won't work as
long this is not supported by busybox, which is a topic that the devs of
busybox and genkernel have to solve.
I will have to switch to Victor's method of building the driver directly into
the kernel and not as module.
Thanks
Alex
> Linux users can define a list of modules for a specific kernel version,
> # a released kernel version, a main kernel version or all kernel versions.
> # The most specific versioned variable will take precedence.
> # FreeBSD users can only use the modules="foo bar" setting.
> #modules_2_6_23_gentoo_r5="ieee1394 ohci1394"
> #modules_2_6_23="tun ieee1394"
> #modules_2_6="tun"
> #modules_2="ipv6"
> #modules="ohci1394"
>
> # Linux users can give modules a different name when they load - the new
> name
> # will also be used to pick arguments below.
> # This is not supported on FreeBSD.
> #modules="dummy:dummy1"
>
> # Linux users can give the modules some arguments if needed, per version
> # if necessary.
> # Again, the most specific versioned variable will take precedence.
> # This is not supported on FreeBSD.
> #module_ieee1394_args="debug"
> #module_ieee1394_args_2_6_23_gentoo_r5="debug2"
> #module_ieee1394_args_2_6_23="debug3"
> #module_ieee1394_args_2_6="debug4"
> #module_ieee1394_args_2="debug5"
>
> # You should consult your kernel documentation and configuration
> # for a list of modules and their options.
>
> modules="forcedeth nouveau"
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Realtek r8169 realtek.ko not loaded.
2020-05-17 11:09 ` Victor Ivanov
@ 2020-05-18 6:57 ` Alexander Puchmayr
0 siblings, 0 replies; 7+ messages in thread
From: Alexander Puchmayr @ 2020-05-18 6:57 UTC (permalink / raw
To: gentoo-user
Am Sonntag, 17. Mai 2020, 13:09:44 CEST schrieb Victor Ivanov:
> Hi Alexander,
>
> A while back I had the exact same issue with a remote machine that I am
> managing. It has an Asus B45-M mobo with an r8169 chipset. Ever since
> the 5.2.x kernel family - where it last used to work - it has been a pain.
>
> Initially I added a manual "soft" dependency in "/etc/conf.d/modules" as
> William has suggested to you with "realtek" appearing first in the list.
> But this stopped working following an update to 5.4.x and is still the
> case today with the 5.6.x family (I keep testing it once in a while).
>
> I then decided to build both realtek and r8169 modules into the kernel:
>
> REALTEK_PHY=y
> CONFIG_R8169=y
>
This worked, and as I found out in an answer for William's mail, it seems to
be a problem with genkernel's way to create initrds with embedded busybox. It
seems as if busybox does not support softdeps.
Regards
Alex
> It did require a bit of faff as the whole chain of dependencies from
> REALTEK_PHY had to be built in as well, but I think that was about 5-6
> kernel options in total.
>
> Adding it to the ramdisk as William suggests might work too. In my case
> I didn't bother trying this due to the fact that every failed attempted
> required manual intervention by someone to get the machine booted with
> working kernel.
>
> I have a gut feeling that tells me adding it to the initrd probably
> won't work. But if you're planning on trying it, please keep us posted.
> I would be very interested in hearing your solution.
>
> Regards,
> V
>
> On 17/05/2020 09:07, Alexander Puchmayr wrote:
> > Hi there
> >
> > I just upgraded an older notebook with r8169 network chip to new kernel
> > 5.4
> > (sys-kernel/gentoo-sources-5.4.28) with genkernel.
> > After booting the new kernel the network adapter was not initialized, no
> > network interface eth0.
> > Dmesg says
> > [ 6.390973] r8169 0000:08:00.0: realtek.ko not loaded, maybe it needs
> > to be added to initramfs?
> > [ 6.392864] r8169: probe of 0000:08:00.0 failed with error -2
> >
> > After searching with google I found a thread in the kernel mailing list
> > https://bugzilla.kernel.org/show_bug.cgi?id=204343
> > The cause is a soft depencency to module realtek.ko, which needs to be
> > loaded first.
> >
> > Doing this manually, i.e. rmmod r8169 && modprobe realtek && modprobe
> > r8169
> > works fine; network interface eth0 gets configured and is operating.
> >
> > Since the kernel loads the network module before systemd is running, it
> > has to be configured in initrd somehow.
> > So, the final question is, how to get that into initrd with genkernel?
> > I need to add something like this
> >
> > cat /etc/modprobe.d/realtek
> > Softdep r8169 pre: realtek
> >
> > How do I get this into initrd with genkernel-next?
> >
> > Thanks in advance
> >
> > Alex
> >
> > PS
> > Profile:
> > default/linux/amd64/17.0/desktop/plasma/systemd
> >
> > Relevant packages:
> > sys-apps/gentoo-systemd-integration-7
> > sys-apps/kmod-26-r5
> > sys-apps/systemd-244.3
> > sys-kernel/genkernel-next-69
> > sys-kernel/gentoo-sources-5.4.28
> >
> > Lspci
> > 08:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
> > RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 03)
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-05-18 6:58 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-17 8:07 [gentoo-user] Realtek r8169 realtek.ko not loaded Alexander Puchmayr
2020-05-17 8:24 ` William Kenworthy
2020-05-17 11:29 ` Alexander Puchmayr
2020-05-17 12:52 ` William Kenworthy
2020-05-18 6:47 ` Alexander Puchmayr
2020-05-17 11:09 ` Victor Ivanov
2020-05-18 6:57 ` Alexander Puchmayr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox