Ethernet Card Not Detected in Linux

My special interest is computers. Let's talk geek here.
Post Reply
User avatar
Kellemora
Guardian Angel
Guardian Angel
Posts: 7494
Joined: 16 Feb 2015, 17:54

Ethernet Card Not Detected in Linux

Post by Kellemora »

Hi Yogi

I have a real poser this time.
A friend gave me his Dell Optiplex 755, it's not a full-size desktop. I think they call it Small Form Factor? About half the size of a normal cabinet.

I partitioned the drive and have the original program WindowsXPPro, and added Debian, Linux Mint, and Ubuntu, each on their own partition.

The Ethernet Card works just fine using Windows. It's an Intel 82566DM-2 on-board.
It does not work with any Linux distro, not even the older ones I've tried.
The proper drivers e1000e are loaded with each OS.

lspci shows the controller OK.
ethtool eth0 shows No Such Device, however
ethtool enp0s25 shows it and how all the default settings are set.
Got that enp0s25 using ifconfig, which showed it instead of eth0
The last line of ethtool enp0s25 shows Link detected: no

Other details:
While the computer boots up, the Ethernet Card shows a green light.
If I boot into Windows, the green light goes out after post boot, and while Windows is loading then changes to orange, also the light on my Ethernet Switch is on, as it should be.
However, if I boot into any of the Linux Distro's, the green light goes out after post boot, but never comes on after Linux is loaded, and there is no light on the Ethernet Switch, showing the card is not on.

I keep getting the Ethernet Disconnected Warning every 30 seconds, and it tries to connect.

I've tried numerous things I found on-line to try, including creating a new connection in the network manager for the enp0s25.
Heck, I tried so many things over the past couple of days, it would fill a page.

Just curious if you've ever hit a problem like this, and found a solution?
Those folks on-line who finally got theirs working did so by buying an external USB ethernet dongle, or they wrote some new program to force the link or changed enp0s25 to eth0. I tried that and it didn't work for me.

It's no biggie, this is a small computer with only 2 gigs of memory. I was going to use it for when I was doing my writing, but would need the internet working to do that. It does not have UEFI, and I've tried a few bio's settings that have to do with the ethernet card settings. None of them made a difference either.

I can't post what I get from the codes used without a connection to nab them, hi hi.

Thanks!
User avatar
yogi
Posts: 9978
Joined: 14 Feb 2015, 21:49

Re: Ethernet Card Not Detected in Linux

Post by yogi »

Good Grief Charley Brown :xclaim: You come up with some of the most interesting problems I've ever heard of.

As I understand it, and I don't understand a whole lot, Windows has it's own convention for naming network interfaces. In essence, just about any interface with the right drivers will work in Windows due to the way they name things. Linux, just to be different, or something, expects the first Ethernet interface to be eth0. Apparently that's hard coded somewhere; probably in a kernel module. The solution is to change the code that looks for the interface card so that the card name is a variable instead of the fixed value 'eth0', all of which assumes you already have a script to detect the name of the card and can pass it to the variable. This all kind of makes sense in a general way, but my first question was, "why was the card named enp0s25 in the first place?" Linux knows of no such card name - it's looking for eth0. I found a forum asking the same question, but they never gave the answer as to why the name changes. (I blame it on Dell, but that's another story) They do go into a lot of detail on how you can rewrite some scripts to make Linux happy. It's probably easy if you know what they are talking about. I only have a vague idea.

https://askubuntu.com/questions/704361/ ... ad-of-eth0
User avatar
Kellemora
Guardian Angel
Guardian Angel
Posts: 7494
Joined: 16 Feb 2015, 17:54

Re: Ethernet Card Not Detected in Linux

Post by Kellemora »

One of the problems with all the new Distro's, regardless of who they are, you do not have the option to name a new network as we had before. The same is true for Windows10 computers.
The OS is supposed to automatically create a Link to whatever network name is being used.
The same OS does this on my other old computers with no problem.
Except on other Dell branded computers that landed in my office pile of dead computers, hi hi.

It used to be, when you opened your "Wired Connection" it would show eth0 or eth1 or ethx, etc. and you could add a new connection using the new enp0s25 or whatever your card showed, and it would work. Those options are no longer shown in the most recent OS releases.

The more I hunt on-line about this, the more I'm finding it is not the OS causing the problem, but something to do with Dell motherboards. If you can get a new bios upgrade and flash the bios, it is supposed to start working right again.
But then I read it has to be done using Linux, not Windows, because the bios are keyed to the OS somehow.
Don't know if that is true. A lot of people say a lot of things on-line that are not even close to accurate.
User avatar
yogi
Posts: 9978
Joined: 14 Feb 2015, 21:49

Re: Ethernet Card Not Detected in Linux

Post by yogi »

So ... you're saying you don't have these settings?

Image

This was lifted out of Ubuntu 16.04 in a virtual machine. Apparently I can name the network anything I want. Naming the interface card, however, is another problem. BIOS is where the hardware is identified and I don't think the old code is tied to any operating system. UEFI might be if configured to do so.

Apparently you can indeed change names of your Windows 10 network, if you know how to do it. I've never had a need for such tweaking. A simple search in Cortana will get you all kinds of instructions.

Image
User avatar
Kellemora
Guardian Angel
Guardian Angel
Posts: 7494
Joined: 16 Feb 2015, 17:54

Re: Ethernet Card Not Detected in Linux

Post by Kellemora »

Hi Yogi

I did finally get it working, sorta, at least now it is recognized and the NIC card turned on at boot-up.

lspci, ifconfig, lshw, and ethtool all showed the card was installed, and gave it's parameters.
A test of the 82566DM-2 nic card showed it was functional at 10/100/1000
The proper e1000e driver is installed and functioning properly.

All of the test procedures showed the card as enp0s25 instead of eth0 which is fine, because this is where the OS is looking for it.

In terminal, if I typed "sudo ethtool -s enp0s25 speed 10 duplex full" the card would turn on and connect to the internet.
If I typed speed 100 or speed 1000 it would shut back off again.
If I added "autoneg off" the card failed to work again also.

I became ROOT and went into /etc/rc.local and added the line "ethtool -s enp0s25 speed 10 duplex full" and now the card comes on at boot-up, but at the 10 mbps speed.

Ironically, I unplugged the cable and plugged it back in, and it jumped to 100 mbps, and while it was at this speed, I ran all the system updates and upgrades. I've never got it to jump back up to 100 mbps again.

Now, if I boot into Windows10, the card works just fine, and at 1000 mbps.

I could only get it working on Linux Mint not on Debian. No biggie, I'm getting to like Linux Mint, and it's OK for what I plan on using that old computer for.

Even at 10 mbps, and only 2 gigs of memory, it is 100 times faster than my wife's nearly identical computer with Win10 and 8 gigs of memory.

So, I've solved the problem, sorta, and have ordered a USB 2.0 100 mbps adapter. There or no USB 3.0 ports on this old computer so maybe the 1000 mbps adapter might not work, and it cost more, hi hi.

I have another computer with a bad NIC and it will only connect at 100 mbps, but Debian did not give an easy way to change it. Now that I learned I can add a line to the /etc/rc.local file, I will try messing with that computer next.

YES, my LAN has it's own name, not Workgroup, and I can change it easily in all the Linux OSs I've used.
That doesn't mean networking always works with Debian though, but does on Ubuntu or Linux Mint no problem, hi hi.
Post Reply