Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Software] eth0 not always found

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
franke
Posts: 14
Joined: 2023-02-19 10:30

[Software] eth0 not always found

#1 Post by franke »

I have a strange isssue with an old laptop.

Every second boot the ethernet device is not recognized/found.

Output of lspci when et0 is recognized:

Code: Select all

00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4)
00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b4)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation HM65 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port Mobile SATA AHCI Controller (rev 04)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation GT218M [GeForce 315M] (rev a2)
01:00.1 Audio device: NVIDIA Corporation High Definition Audio Controller (rev a1)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet controller (rev 05)
03:00.0 Network controller: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
and when eth0 is not there, the line
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet controller (rev 05)
is simply missing.

How can I troubleshoot the issue?
I'm currently using the wlan card, but would prefer to use the ethernet, which works perfectly when it is recognized from the system.

I could find https://bugs.debian.org/cgi-bin/bugrepo ... bug=956868 but it does not explain why I am experiencing issues every second boot.

I've tried comparing the output of dmesg; when ethernet is found

Code: Select all

[    4.378933] r8169 0000:02:00.0 eth0: RTL8105e, b8:70:f4:ca:2f:ee, XID 40a, IRQ 25
[    4.380818] r8169 0000:02:00.0 enp2s0: renamed from eth0
....
[   30.290696] r8169 0000:02:00.0: firmware: direct-loading firmware rtl_nic/rtl8105e-1.fw
[   30.291165] RTL8208 Fast Ethernet r8169-0-200:00: attached PHY driver (mii_bus:phy_addr=r8169-0-200:00, irq=MAC)
appears in the log, if the card is not found, I cannot find "RTL8105e" anywhere.

I do not think it is a hardware bug; if the card is found it works without issues the whole time, also when running the debian installer from usb the card has always been detected (tried 2 or 3 times)

What could I do for finding the root cause?

lindi
Debian Developer
Debian Developer
Posts: 412
Joined: 2022-07-12 14:10
Has thanked: 1 time
Been thanked: 77 times

Re: [Software] eth0 not always found

#2 Post by lindi »

What laptop model is this?

User avatar
kent_dorfman766
Posts: 535
Joined: 2022-12-16 06:34
Location: socialist states of america
Has thanked: 57 times
Been thanked: 70 times

Re: [Software] eth0 not always found

#3 Post by kent_dorfman766 »

Guessing the NIC is integrated into the mobo. for power savings laptops sometimes have switches to indicate whether a component should be powered or not. Guessing that if it is a mechanical switch then it may be going bad. If a solid state latch then I would suspect the hardware itself is going bad, such as maybe the transceiver if flaking and doesn't present if it doesn't pass internal post check.

franke
Posts: 14
Joined: 2023-02-19 10:30

Re: [Software] eth0 not always found

#4 Post by franke »

@lindi

It's a toshiba satellite c660

@kent_dorfman766

I've also thaugt at the beginning that it could be a hardware issue, but it does not make much sense that at every second reboot it works without issues, or very time I run the installer from the usb drive.

Is there any way I could try to detect the hardware again from a fully booted debian system?

The debian system is minimal (no gnome or kde, I've installed lightdm and openbox afterwards), so there should be no power-saving settings (no laptop-mode-tools).
Also the battery died a long time ago, so I've removed it.

Edit: forgot to mention, there is no physical switch

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 557
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 75 times
Been thanked: 85 times

Re: [Software] eth0 not always found

#5 Post by wizard10000 »

I have a couple of questions since I haven't seen this behavior in a bunch of years :)

Are you dual booting with Windows?

Does your NIC work if you cold boot the machine? Power off and boot directly into Linux.

Might be a longshot but I've seen Windows NIC drivers leave a network card in an unusable state if you tried to reboot into Linux but cold boots worked just fine.
we see things not as they are, but as we are.
-- anais nin

CwF
Global Moderator
Global Moderator
Posts: 2636
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: [Software] eth0 not always found

#6 Post by CwF »

Yes, confirm cold/warm boot variation Again and again and again. If a cold boot is 100% then slow down boot sequence wherever you can, check for a bios quick boot option. You mention a battery, not all AC inputs are able to hold power (minimum) at boot or high stress (boot). So coincidental low voltage during enumeration easily explains this.
While working I'd take note of the enumerated directories in /sys/. I'd also note modules in use. The theory here is almost all hardware can technically connect and disconnect. Somewhere in the chain of factors making this possible something often breaks, isn't implemented, or purposely restricted. So the long answer is very long. Loading/unloading modules in a terminal may show useful. Echoing into sys values to enable/disable, rescan, reset, can be done for most in the chain; the pci switches, usb ports, device end-point, etc. It does take some familiarity and you can blow things up.

User avatar
kent_dorfman766
Posts: 535
Joined: 2022-12-16 06:34
Location: socialist states of america
Has thanked: 57 times
Been thanked: 70 times

Re: [Software] eth0 not always found

#7 Post by kent_dorfman766 »

Is there any way I could try to detect the hardware again from a fully booted debian system?
If the driver is a module then remove it and re-add it. but it won't load if lspci isn't showing the device. lspci reads the pci bus slot enumerations so it it doesn't exist there then it's dark.

It is most likely an ACPI issue with the laptop.

franke
Posts: 14
Joined: 2023-02-19 10:30

Re: [Software] eth0 not always found

#8 Post by franke »

no dual boot, Debian is the only OS

With reboot the behavior is 100% reproducible, I'll test shutting it down and waiting a couple of minutes, even if I've observed the same behavior.

I'll recheck the BIOS, but disabling fast boot and similar things is one of the first things I do.

The module can AFAIK, not be simply removed and re-added.


Holding power should not be an issue, the laptop has always electricity/the plug is always in.

franke
Posts: 14
Joined: 2023-02-19 10:30

Re: [Software] eth0 not always found

#9 Post by franke »

So, unfortunately I did not see a pattern which helps to have the ethernet always available

Attached a dmesg where ethernet is recognized, and one where it is not, maybe there is something obvious I've missed....
Attachments
dmesg.zip
(36.54 KiB) Downloaded 16 times

CwF
Global Moderator
Global Moderator
Posts: 2636
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: [Software] eth0 not always found

#10 Post by CwF »

the /sys tree is a maze of cross-linked gobbledygook where all origination lead to all destinations, don't get lost.

/sys/class/net/eth0/ or /sys/class/net/enp2s0/ in your case is where you'll find the device properties enumerated when working, and this will not exist if not detected.

To attempt a virtual unplug/replug of the device we attempt to reset a parent device, the pci bus.
In your case '/sys/bus/pci/devices/0000:02:00.0/' will be present, and in this directory there will be files of interest 'rescan' and 'reset'.
With a root terminal you echo in a value;

Code: Select all

echo 1 > /sys/bus/pci/devices/0000:02:00.0/rescan
and you should hopefully cause that parent to find it's children.

rescan is nicer than a reset, and standard disclaimer - I didn't do it.

franke
Posts: 14
Joined: 2023-02-19 10:30

Re: [Software] eth0 not always found

#11 Post by franke »

I can confirm that /sys/class/net/enp2s0/ is not there, but I cannot do a rescan because /sys/bus/pci/devices/0000:02:00.0 is also missing when the ethernet adapter is not recognized :(


output of lsusb:

Bus 002 Device 004: ID 2548:1002 Pulse-Eight CEC Adapter
Bus 002 Device 003: ID 1058:10b8 Western Digital Technologies, Inc. Elements Portable (WDBU6Y, WDBUZG)
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 0bda:0138 Realtek Semiconductor Corp. RTS5138 Card Reader Controller
Bus 001 Device 003: ID 0cf3:3005 Qualcomm Atheros Communications AR3011 Bluetooth
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


output of ls /sys/bus/pci/devices/
0000:00:00.0 0000:00:16.0 0000:00:1b.0 0000:00:1c.1 0000:00:1f.0 0000:00:1f.3 0000:01:00.1
0000:00:01.0 0000:00:1a.0 0000:00:1c.0 0000:00:1d.0 0000:00:1f.2 0000:01:00.0 0000:03:00.0

franke
Posts: 14
Joined: 2023-02-19 10:30

Re: [Software] eth0 not always found

#12 Post by franke »

update: I have also tried echo 1 > /sys/bus/pci/rescan, but I am not sure if anything is happening (can see no new entry in dmesg), in all cases ethernet is still missing

CwF
Global Moderator
Global Moderator
Posts: 2636
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: [Software] eth0 not always found

#13 Post by CwF »

franke wrote: 2023-03-17 14:43 update: I have also tried echo 1 > /sys/bus/pci/rescan
Very good, you, not the computer!
That was the next step, so you understand perfectly.

From here on I don't have much to add but my confidence in you is high. Not so much for the computer itself.
I reviewed some notes and find some variation; for echo you could add quotes for "1" and also try "-", my notes are not clear on that. Note that I have never bricked anything with these techniques, but locks happen, reboots starts over...

I do suspect a power issue. A single blown cap could give this variation. Having the entire pci (check pci-e also) disappear is surely happening early at boot. I have never tested adding pci root ports to a running system, using a vm to test the OS response, and I have no bias on the idea other that cpu mapped (and anything amd) likely is impossible, south/north whatever chipset bridge mapped ports maybe possible. I assume you looked at the bios to notice if any variation concerning the net adapter, netboot options present or not, etc. I suspect nothing would show, but a whole bus gone is odd!

Since you follow, after all software probing is exhausted I would try with Voltage! You need some facility for this, but the idea is to watch voltage during boot looking for a sag, and also rigging up a slight surplus. Electronics have a range of tolerance much higher than expected for quality and lower on junk. So, it the input is 19.2v (?) a bad sag may be ~15 where things stop working but may tolerate much higher, ~25 for cheap, 30V+ for quality without a battery installed! I would add power at the dead battery connection. You only need the two connections (+/-) and not the extra temp sense connections - check the battery case for markings. Ideally any power at the input port and the battery port should come from the same supply, and both connected is is better than one or the other.

Software probing is generally safe. Hardware hacking is not. Higher voltage can support faulty hardware and it can also finish it off like an obligation to a wounded soldier. You may hear the problem whine, you may smell it.

If an alternate OS does not show consistent behavior other than what you get with Debian then the diagnosis is likely failing hardware.

Good Luck.

Aki
Global Moderator
Global Moderator
Posts: 2823
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 69 times
Been thanked: 385 times

Re: [Software] eth0 not always found

#14 Post by Aki »

Hello,
franke wrote: 2023-03-12 13:49 Every second boot the ethernet device is not recognized/found. Output of lspci when et0 is recognized:

Code: Select all

[..]
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet controller (rev 05)
[..]
@franke:Sorry for bothering you, but was you able to make the missing network card to reappear someway (for example, disconneting the power adapter for a certain time with battery unplugged) ? You reported that it happens since "Every second boot", almost implying that you can somehow return to the "first boot" condition.
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

franke
Posts: 14
Joined: 2023-02-19 10:30

Re: [Software] eth0 not always found

#15 Post by franke »

Sorry for he late reply.

I've retried changing settings in the bios, I've even activated wake-on-lan, but it does not seems to make the difference.

I've already opened the laptop once and nearly broke the keyboard, so I do not want to do it again.

I really hoped it would have been a software issue, but I do not believe that it makes much sense spending much more time over it.

@Aki, every second boot the card is not there, thus simply rebooting makes the card reappear.

1st boot: ethernet is there
2nd boot: no ethernet
3rd boot: ethernet is there
4th boot: no ethernet
and so on

Does not matter if it is a reboot, a fast boot (settings in the bios) or doing a complete shutdown and waiting some time and then boot.
The pattern is very consistent.

Aki
Global Moderator
Global Moderator
Posts: 2823
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 69 times
Been thanked: 385 times

Re: [Software] eth0 not always found

#16 Post by Aki »

franke wrote: 2023-03-23 21:25 @Aki, every second boot the card is not there, thus simply rebooting makes the card reappear.
1st boot: ethernet is there
2nd boot: no ethernet
3rd boot: ethernet is there
4th boot: no ethernet
and so on

Does not matter if it is a reboot, a fast boot (settings in the bios) or doing a complete shutdown and waiting some time and then boot.
The pattern is very consistent.
Quite strange this on/off behaviour.
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

franke
Posts: 14
Joined: 2023-02-19 10:30

Re: [Software] eth0 not always found

#17 Post by franke »

Which is why I am still not 100% convinced it is an hardware issue, but see currently no way forward (except using wifi instead of ethernet)

Post Reply