Link not detected / cable seems unplugged with jme - JMicron JMC250 Gigabit Ethernet Controller

Bug #880316 reported by Powderking on 2011-10-23
112
This bug affects 21 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Unassigned

Bug Description

I'm trying to install Ubuntu on a Shuttle XS35GTV2.

The installer can't set up the network connection.
I've tried Ubuntu 10.04 32 and 64 bit netinstall, minimal and server, Ubuntu 11.10 32 bit netinstall.
The Debian Squeeze 64 bit netinstall installer has no problem.
(I've now installed openELEC which has no problems too)

I was able to install Ubuntu 10.04 64 bit server but only without network connection. I then could load the jme module:
# modprobe jme
# depmod -a
without errors.

But I can't get eth0 running.

The output of lspci is:
02:00.5 Ethernet controller: JMicron Technology Corp. JMC250 PCI Express Gigabit Ethernet Controller (rev 03)
03:00.0 Network controller: Realtek Semiconductor C., Ltd Device 8176 (rev 01)

# lshw -C network
  *-network DISABLED
       description: Ethernet interface
       product: JMC250 PCI Express Gigabit Ethernet Controller
       vendor: JMicron Technology Corp.
       physical id: 0.5
       bus info: pci@0000:02:00.5
       logical name: eth0
       version: 03
       serial: 80:ee:73:1f:ef:df
       size: 10MB/s
       capacity: 1GB/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm pciexpress msix msi bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=off broadcast=yes driver=jme driverversion=1.0.5 duplex=half latency=0 link=no multicast=yes port=MII speed=10MB/s
       resources: irq:17 memory:feaf4000-feaf7fff ioport:dc00(size=128) ioport:d800(size=256)
  *-network UNCLAIMED
       description: Network controller
       product: Realtek Semiconductor Co., Ltd.
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:03:00.0
       version: 01
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list
       configuration: latency=0
       resources: ioport:e800(size=256) memory:febfc000-febfffff

I've posted my problem at the Ubuntu users mailing list:
http://www.linux-archive.org/ubuntu-user/588603-jme-module-missing-netboot-installation.html

Edit: Unfortunately I couldn't reassign it as it has nothing to do with gnome-nettools (see post #1).

Powderking (ramonhofer) wrote :

Colin Watson replied on the mailing list to my question:
http://www.linux-archive.org/ubuntu-user/588603-jme-module-missing-netboot-installation.html 10-21-2011, 10:30 AM

On Tue, Oct 18, 2011 at 02:49:36PM +0000, Ramon Hofer wrote:
> On Tue, 18 Oct 2011 13:30:22 +0100, Colin Watson wrote:
> > On Mon, Oct 17, 2011 at 02:31:59PM +0000, Ramon Hofer wrote:
> >> I'm trying to install Ubuntu 10.04 AMD64 with the netboot install on a
> >> Shuttle XS35GTV2 using unetbootin and an usb stick.
> >>
> >> Unfortunately the Ubuntu installation image can't set up the wired
> >> network.
> >> The module jme is missing.
> >
> > Could you report this as a bug against the 'linux' package in Ubuntu?
> > That's where this needs to be fixed.
>
> Yes, should I change the question here to a bug:
> https://answers.launchpad.net/ubuntu/+source/gnome-nettool/
> +question/174947

Yes. It should be reassigned to linux too - gnome-nettool has nothing
to do with this.

description: updated
Colin Watson (cjwatson) on 2011-10-24
affects: gnome-nettool (Ubuntu) → linux (Ubuntu)

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 880316

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete

Sorry for the late response.

I wasn't able to run the command because I couldn't change to a terminal while installing.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed

I can confirm this problem - it is not possible to get the ethernet interface detected with the netinstall set-up. We have seen this with both 10.04 and 11.10 as well. I've dug a little deeper and these are my findings:

- On a fully installed Kubuntu system (non-Shuttle/different NIC), the module "jme.ko" can be found in
/lib/modules/X.Y.Z-RR-generic/kernel/drivers/net/
- If I take the initrd.gz file from the netinstall that is found on a Kubuntu 11.10 alternate (i386) CD (path:
install/netboot/ubuntu-installer/i386/initrd.gz) and extract that, there is *no* jme.ko file in lib/modules/3.0.0-12-generic/kernel/drivers/net - in fact, there are quite a few network modules missing from that directory, so I would expect that this problems potentially affects other hardware as well.

The solution of this problem could therefore most likely be as simple as creating a new initrd.gz for the netinstall which does contain the necessary modules.

WORKAROUND/POSSIBLE SOLUTION

I have confirmed that the missing "jme.ko" module is indeed the culprit. I have done the following:

1) Take the original netinstall initrd.gz from a Kubuntu 11.10 i386 alternate CD and unpack it using the instructions in http://kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt
2) Copy jme.ko from a working Kubuntu 11.10 (take care to use the correct kernel version, should be 3.0.0-12) into the lib/modules/3.0.0-12-generic/kernel/drivers/net directory that was just created
3) Re-create initrd.gz using the mkinitramfs script described in http://kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt
4) Copy the new initrd.gz to the location where the netboot files are stored on the server
5) Start autoinstall and enjoy.

The same method should work for any other missing modules.

Karl Moik (karl-moik) wrote :

Same problem here with Shuttle XS35V2, tested 11.10 and 12.04, desktop 64 and server 64.

I could only fix it after the installation by using the recent jmebp-1.0.8.5 drivers from the JMicron site: ftp://driver.jmicron.com.tw/Ethernet/Linux/

untar, make, sudo make install, sudo update-initramfs, reboot and everything works

I think the recent drivers from JMicron should be integrated into the Ubuntu installer.

I can confirm that this bug has not been fixed for Kubuntu 12.04.1 (32bit), either.

Powderking, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please test for this with the latest development release of Ubuntu? ISO CD images are available from http://cdimage.ubuntu.com/daily-live/current/ .

Please let us know your results. Thank you for your understanding.

tags: added: lucid needs-kernel-logs oneiric
Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete

I have just downloaded and unpacked the netboot.tar.gz for Ubuntu 12.10 (i386) - there is no jme.ko module present in the initrd.gz, just like for the previous versions. This bug is not fixed.

tags: added: quantal
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Torsten Bronger (bronger) wrote :

Maybe I understood it wrongly, but I had to add jme.ko to /path/to/usb/stick/install/initrd.gz rather than .../install/netboot/ubuntu_installer/.../initrd.gz.

Anyway, the workaround worked for me. But it is a tedious task that not everybody is able to do. I've had to do the patch since Ubuntu 11.04. This is four Ubuntu versions up to now. Please include this single file into the installer.

Jabba56 (uzimm) wrote :

The bug still is in 12.10 installed on my Shuttle XS35V2.
After every Kernel-Update I have to install the driver to get network access, that's really annoying.
I use these commands to install, got them from the net:

> sudo apt-get install linux-headers-$(uname -r) build-essential
> wget ftp://driver.jmicron.com.tw/Ethernet/Linux/jmebp-1.0.8.5.tar.bz
> tar xvf jmebp-1.0.8.5.tar.bz
> cd jmebp-1.0.8.5
> make
> sudo make install
> sudo update-initramfs -u

Please fix it!

stefan (maim) wrote :

Hi!
I've got the same problem as Jabba56 and probably many other ubuntu users as well! I would be really glad, if you're able to help us!

Best wishes...

Fabio Marconi (fabiomarconi) wrote :

I can only suggest to run a live session of raring that ship the latest kernel:
http://cdimage.ubuntu.com/daily-live/current/
to update this report.
Thanks
fabio
---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Jabba56 (uzimm) wrote :

Hi,

Just loaded tha update to linux-headers-3.5.0.27-generic (3.5.0.27-46) , initramfs was updated and boom, my network connection didn't exist anymore.
After every update of initramfs the jme network driver has gone down the drain and I have to re-install it manually. :(

How could a live session help? I want to have a working system on my harddisk - also after any kernel updates.

Can anybody fix the problem or raise the priority?

Thx in advance!
Jabba

Jabba56 (uzimm) wrote :

I just did the upgrade to 13.04 and the problem continues. No network connection via cable.

Paul Hewlett (phewlett76) wrote :

I just added this driver to ubuntu 13.04. The current version does not compile as it still uses the __dev* macros for hotplug devices which have now been removed from the kernel. (cleanup of driver initialisation code to save memory is no longer done)

Kernel 3.8.0-26-generic -

I modified jme.c from the downloaded tarball:

- remove '__devinit' from declaration of jme_init_one() at about line 3444
- remove function 'jme_remove_one' in its entirety at about line 3732
- remove '.remove = __devexit_p(jme_init_one)' from 'jme_driver' structure at about line 3905

A better way to do the above changes is to add a conditional on the kernel version and define the '__dev*' macros as blank.

Issuing 'make' and 'make install' now works and the ethernet interface is active and functional after a reboot.

A complete script to do this(note that the download is commented out as I have now modified the driver and do not want to overwrite the changes:

#!/bin/sh
apt-get install linux-headers-$(uname -r) build-essential
if [ $? -ne 0 ]
then
 echo "Failure to install headers and build-essential"
 exit 1
fi
#wget ftp://driver.jmicron.com.tw/Ethernet/Linux/jmebp-1.0.8.5.tar.bz
#if [ $? -ne 0 ]
#then
# echo "Failure to wget jmicron drivers"
# exit 2
#fi
#tar xvf jmebp-1.0.8.5.tar.bz
#if [ $? -ne 0 ]
#then
# echo "Failure to untar jmicron drivers"
# exit 3
#fi
cd jmebp-1.0.8.5
if [ $? -ne 0 ]
then
 echo "Failure to cd to jmicron directory"
 exit 4
fi
make
if [ $? -ne 0 ]
then
 echo "Failure to make jmicron drivers"
 exit 5
fi
make install
if [ $? -ne 0 ]
then
 echo "Failure to install jmicron drivers"
 exit 6
fi
update-initramfs -u
if [ $? -ne 0 ]
then
 echo "Failure to regenerate initramfs file"
 exit 7
fi
echo "Try rebooting to see if eth0 comes up"
exit 0

tags: added: patch
Jabba56 (uzimm) wrote :

Hi Paul,

you're my hero.The script works. Thanks a lot for that!
Nonetheless I hope the network driver will be in any following Ubuntu version and the patch will not be needed. Until that, the bug isn't fixed.

Jabba56 (uzimm) wrote :

Hmm, this solution only works with working internet connection, otherwise it breaks at the first command:
apt-get install linux-headers-$(uname -r) build-essential
Thanks god the Shuttle XS35GTV2 can establish a wlan connection.
But how could I run this script completely without internet conn? I don't want to have the wlan switched on all the time as fallback for the patch. Any suggestions?

Jabba56 (uzimm) wrote :

I'm afraid its a problem not only in Ubuntu, its a LINUX problem. I just tried Fedora and Debian and have the same problem. How could the problem be addressed to the linux developers?

Even Onsager (even-onsager) wrote :

Problem still persists on daily 13.10 Saucy mini.iso. I have a slightly different computer (Shuttle XS35GSV3 with AMD GPU), but same network hardware. No point in posting logs or details, as problem is exactly as described here by several people over the last two years, and in other threads around the web, like this one: http://ubuntuforums.org/showthread.php?t=2153189.

Jabba56 (uzimm) wrote :

Problem consists on 13.10.
After installation the above script doesn't work any more. No cable conn available.
Following the logfile of the second attempt of runnning the jme installation script (See #16)

Paketlisten werden gelesen...
Abhängigkeitsbaum wird aufgebaut....
Statusinformationen werden eingelesen....
build-essential ist schon die neueste Version.
linux-headers-3.11.0-12-generic ist schon die neueste Version.
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
make[1]: Betrete Verzeichnis '/usr/src/linux-headers-3.11.0-12-generic'
  CC [M] /home/zimmermann/jmebp-1.0.8.5/jme.o
/home/zimmermann/jmebp-1.0.8.5/jme.c: In function ‘jme_alloc_and_feed_skb’:
/home/zimmermann/jmebp-1.0.8.5/jme.c:1121:4: error: too few arguments to function ‘__vlan_hwaccel_put_tagâ€
    __vlan_hwaccel_put_tag(skb, vid);
    ^
In file included from /home/zimmermann/jmebp-1.0.8.5/jme.c:45:0:
include/linux/if_vlan.h:236:31: note: declared here
 static inline struct sk_buff *__vlan_hwaccel_put_tag(struct sk_buff *skb,
                               ^
/home/zimmermann/jmebp-1.0.8.5/jme.c: At top level:
/home/zimmermann/jmebp-1.0.8.5/jme.c:3444:1: warning: return type defaults to ‘int’ [-Wreturn-type]
 jme_init_one(struct pci_dev *pdev,
 ^
/home/zimmermann/jmebp-1.0.8.5/jme.c: In function ‘jme_init_one’:
/home/zimmermann/jmebp-1.0.8.5/jme.c:3516:7: error: ‘NETIF_F_HW_VLAN_TX’ undeclared (first use in this function)
       NETIF_F_HW_VLAN_TX |
       ^
/home/zimmermann/jmebp-1.0.8.5/jme.c:3516:7: note: each undeclared identifier is reported only once for each function it appears in
/home/zimmermann/jmebp-1.0.8.5/jme.c:3517:7: error: ‘NETIF_F_HW_VLAN_RX’ undeclared (first use in this function)
       NETIF_F_HW_VLAN_RX;
       ^
make[2]: *** [/home/zimmermann/jmebp-1.0.8.5/jme.o] Fehler 1
make[1]: *** [_module_/home/zimmermann/jmebp-1.0.8.5] Fehler 2
make[1]: Verlasse Verzeichnis '/usr/src/linux-headers-3.11.0-12-generic'
make: *** [modules] Fehler 2
Failure to make jmicron drivers

Any suggestions?

Jabba56 (uzimm) wrote :

Corrected logfile for better readability:

Paketlisten werden gelesen...
Abhängigkeitsbaum wird aufgebaut....
Statusinformationen werden eingelesen....
build-essential ist schon die neueste Version.
linux-headers-3.11.0-12-generic ist schon die neueste Version.
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
make[1]: Betrete Verzeichnis '/usr/src/linux-headers-3.11.0-12-generic'
  CC [M] /home/zimmermann/jmebp-1.0.8.5/jme.o
/home/zimmermann/jmebp-1.0.8.5/jme.c: In function ‘jme_alloc_and_feed_skb’:
/home/zimmermann/jmebp-1.0.8.5/jme.c:1121:4: error: too few arguments to function ‘__vlan_hwaccel_put_tag’
    __vlan_hwaccel_put_tag(skb, vid);
    ^
In file included from /home/zimmermann/jmebp-1.0.8.5/jme.c:45:0:
include/linux/if_vlan.h:236:31: note: declared here
 static inline struct sk_buff *__vlan_hwaccel_put_tag(struct sk_buff *skb,
                                                      ^
/home/zimmermann/jmebp-1.0.8.5/jme.c: At top level:
/home/zimmermann/jmebp-1.0.8.5/jme.c:3444:1: warning: return type defaults to ‘int’ [-Wreturn-type]
 jme_init_one(struct pci_dev *pdev,
 ^
/home/zimmermann/jmebp-1.0.8.5/jme.c: In function ‘jme_init_one’:
/home/zimmermann/jmebp-1.0.8.5/jme.c:3516:7: error: ‘NETIF_F_HW_VLAN_TX’ undeclared (first use in this function)
       NETIF_F_HW_VLAN_TX |
       ^
/home/zimmermann/jmebp-1.0.8.5/jme.c:3516:7: note: each undeclared identifier is reported only once for each function it appears in
/home/zimmermann/jmebp-1.0.8.5/jme.c:3517:7: error: ‘NETIF_F_HW_VLAN_RX’ undeclared (first use in this function)
       NETIF_F_HW_VLAN_RX;
       ^
make[2]: *** [/home/zimmermann/jmebp-1.0.8.5/jme.o] Fehler 1
make[1]: *** [_module_/home/zimmermann/jmebp-1.0.8.5] Fehler 2
make[1]: Verlasse Verzeichnis '/usr/src/linux-headers-3.11.0-12-generic'
make: *** [modules] Fehler 2
Failure to make jmicron drivers

Jabba56 (uzimm) on 2013-11-03
description: updated
Jabba56 (uzimm) wrote :

Same errors with 3.11.0-13.

Jabba56 (uzimm) wrote :

Changing NETIF_F_HW_VLAN_RX, NETIF_F_HW_VLAN_TX to NETIF_F_HW_VLAN_CTAG_RX, NETIF_F_HW_VLAN_CTAG_TX fixes the last 2 errors, but I'm not able to figure out the parameters needed for __vlan_hwaccel_put_tag.
The problem also appears with the realtek network driver, see Bug #1216906

Edb (homemadejam) wrote :

Yes this a breaking change in the API. I don't really understand the reasoning behind it but will raise the issue on the mailing list.

Is this the same issue as the other reported in this thread? Seems like it simply doesn't build.

Jabba56 (uzimm) wrote :

The basic issue - the missing jme driver in the kernel (?) - still isn't resolved. But the patch of comment #16 doesn't work any more due to the API-change.

Jabba56 (uzimm) wrote :

Does anybody work on this issue?
Is it possible to overload the function __vlan_hwaccel_put_tag in if_vlan.h for downward compatibility?

wanthalf (wanthalf) wrote :

In 13.10 the driver is there, but it fails:

[ 1.909557] jme: JMicron JMC2XX ethernet driver version 1.0.8
[ 1.909611] jme 0000:02:00.5: can't disable ASPM; OS doesn't have ASPM control
[ 1.909625] jme 0000:02:00.5: enabling device (0000 -> 0001)
[ 1.909724] jme: No PCI resource region found
[ 1.909792] jme: probe of 0000:02:00.5 failed with error -12

finalwebsites (olaf-lederer) wrote :

I updated my driver like suggested by Jabba56 in comment #11 and voila it's fixed.

The strange thing in my situation was that I was able to connect using 1000mbit connection but not on a 100mbit connection.
Will say before the update an ethernet cable on a 1000mbit networks has worked and the same cable on a 100mbit didn't.

After the driver update this bug was fixed.

Burnrubber (frank-wynen) wrote :

Same Problem after Updating Ubuntu with Kernel 3.13.0.24-generic. Patch from Jabba56 in Comment 11 doesn't work. Is someone still working on these issue?

Cheers, Burn.

Robert Hrovat (robi-hipnos) wrote :

Same problem on Asus K52J that has JMicron ethernet. Right now I can't get ethernet working on 14.04.

Alex Cabal (acabal) wrote :

In 12.04 this problem was fixable by downloading and compiling the JME drivers (jmebp-1.0.8.5.tar.bz) from the JMicron web site.

However on 14.04 compiling the driver fails; it seems like there was an API change in a newer version of the kernel. Consequently I can't get ethernet working at all for my JMC250 Ethernet card on 14.04.

Alex Cabal (acabal) wrote :

FYI the driver I mentioned in #32 is here: ftp://driver.jmicron.com.tw/Ethernet/Linux/

Alex Cabal (acabal) wrote :

Re. #24, I was able to get the driver to compile, but not actually work, by adding your changes and additionally changing
__vlan_hwaccel_put_tag(skb, vid)
to
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);

I saw that they used the same value in fixing the Realtek driver here: https://bugs.launchpad.net/ubuntu/+source/r8168/+bug/1216906

The constant they use is defined in this block: http://lxr.free-electrons.com/source/drivers/staging/rtl8188eu/include/if_ether.h#L35

Admittedly I have no idea what that addition means or does, I'm just stabbing in the dark. And it obviously didn't work. But maybe it'll put someone on the right path.

I also tried contacting the author of the driver for guidance but no doubt he's moved on to other things by now.

Alex Cabal (acabal) wrote :

So after some more digging it turns out that the 3.14 kernel line has sources for the jme drivers, updated just 20 days ago, that can be compiled on 14.04: https://github.com/torvalds/linux/blob/master/drivers/net/ethernet/jme.c

These sources apply the fixes in #24 (weirdly committed over a year ago) and my own stab-in-the-dark in #34 along with many other differences.

So I downloaded the new jme.c and jme.h from there and was able to successfully compile and install the driver on Ubuntu 14.04. But it still doesn't work, eth0 still shows as disconnected.

Not sure what to do next.

Alex Cabal (acabal) wrote :

I opened a new Launchpad bug #1310798 because this one seems to be about missing drivers in an older Ubuntu version, not broken drivers. Maybe by getting this re-focused we can get some love for this almost 3-year-old bug.

Alex Cabal (acabal) wrote :

I think I may have found a possible workaround.

The stock drivers on 14.04 don't work out of the box for *gigabit ethernet*. If you're connecting to a gigabit router, then open a terminal and run:

$> sudo ethtool -s eth0 speed 100 duplex full

If you don't have ethtool installed, install with:

$> sudo apt-get install ethtool

Once you run that command, your link should be detected immediately. The catch is that you'll be running at 100Mbps, not gigabit.

I think what happened was that there was some kind of kernel networking API change between 12.04 and 14.04. Whatever changed broke this driver's ability to deal with gigabit connections. It's a bummer that this doesn't work out-of-the-box and that it's been ignored for so long, but at least we have a crappy workaround.

Thanks for comment #37

summary: - Ubuntu installer can't setup network on Shuttle XS35GTV2
+ Link not detected / cable seems unplugged with jme - JMicron JMC250
+ Gigabit Ethernet Controller
gevra (gevrapatapich) wrote :

switching to 100Mbps mentioned in comment #37 worked for me
thanks!

Lyosha (d-ubuntuone-k) wrote :

Interestingly jme in my Shuttle XS35V2 would establish a gigabit connection fine to a 8-port netgear switch, but not to 5-port netgear switch. 100mbit connection works with either. It is very strange.

Ben Hutchings (benh-debian) wrote :

I had a look at what JMicron's driver does differently from the version included with Linux. It appears that it periodically checks for link failure after autonegotiation and then automatically tries renegotiating with only lower speed(s) enabled.

So this is faulty hardware that can't maintain a 1000BASE-T link with some link partners. But since it works with others, disabling 1000BASE-T operation completely would cause a regression for some users.

Ben Hutchings (benh-debian) wrote :

Here's a patch with the changes relating to link management in the vendor driver version 1.0.5. Totally untested, but it applies and compiles against Linux 4.0.

Don't ask me for help; I'm only uploading this to save time for anyone else who wants to work on the bug.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Bug attachments