Replacing the Ubuntu network driver

(Update 10/15/2016: There is now an updated version of the driver package available on Github. Some of the changes described in the following post are no longer necessary)

I’ve been running a Shuttle mini PC for the past few years as a low-power Linux server / NAS. All was peachy, until I started noticing that the upload speed over the network kept dropping while uploading large files recently. My initial thought was that this had something to do with my router, but the problem persisted after replacing it.

It finally dawned on me that this was an issue on the server when I noticed that I was also no longer to use wake-on-lan to power on the server, which had worked in the past. Spoiler alert: upgrading Ubuntu to the latest LTS release (12.04) apparently deployed a new network driver which isn’t quite working with the on-board ethernet controller.

Checking the network device showed me the kernel module (sky2) which was causing the problems:

> lspci -k | grep -A5 Ethernet
02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8056 PCI-E Gigabit Ethernet Controller (rev 12)
	Subsystem: Holco Enterprise Co, Ltd/Shuttle Computer Device 3140
	Kernel driver in use: sky2
	Kernel modules: sky2

A quick google search revealed that there was a proprietary driver for the Marvell chip. It is available from here. Select “Linux 2.6 – Fedora” as the plaform, and download the Kernel 2.6.x Linux Driver package.

After downloading the package, unpack the archive and change the install script to use bash. For some reason, the installer wouldn’t run using the original /bin/sh. Finally start the installer:

> tar xjf install_v10.93.3.3.tar.bz2
> cd DriverInstall/
> sed '1s/.*/#!\/bin\/bash/' install.sh > install.sh
> ./install.sh

The installer found the existing driver and gave me the option to remove it, however that did not work for me. After the install is done, it is thus necessary to blacklist the old driver so it won’t get loaded again:

> echo 'blacklist sky2' > /etc/modprobe.d/blacklist-sky2.conf'
> update-initramfs -k all -u
update-initramfs: Generating /boot/initrd.img-3.2.0-40-generic

Upon rebooting, I checked the network adapter again:

> lspci -k | grep -A5 Ethernet
02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8056 PCI-E Gigabit Ethernet Controller (rev 12)
	Subsystem: Holco Enterprise Co, Ltd/Shuttle Computer Device 3140
	Kernel driver in use: sk98lin
	Kernel modules: sk98lin, sky2

Finally, I enabled wake-on-lan using ethtool:

> ethtool -s eth0 wol g
> ethtool eth0 | grep Wake-on
	Supports Wake-on: pg
	Wake-on: g

14 throughts on "Replacing the Ubuntu network driver"

  1. Hi there and thank you very much for your description of how to install proprietary driver. I happen to have a very similar problem:
    System: VAIO VGNC1S Notebook, Ubuntu 12.04 LTS + Marvell Yukon 88E8036 => no Wake on Lan ! It’s been tested under Windows XP, where it works fine.

    So I followed your instructions and even added

    sudo IGNORE_CC_MISMATCH=1 ./install.sh

    because of an error relating to different kernel version during compiling process.
    After that the install-script closed with success.

    Now after install, I also blacklisted sky2 and did update-initramfs & then rebooted.

    But, no joy: no eth0 interface, no network, no wake on lan after reboot.

    OUTPUT sudo ethtool eth0:

    Settings for eth0:

    Cannot get device settings: No such device
    Cannot get wake-on-lan settings: No such device
    Cannot get message level: No such device
    Cannot get link status: No such device
    No data available

    &

    OUTPUT lspci -k | grep -A5 Ethernet

    02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8036 PCI-E Fast Ethernet Controller (rev 13)
    Subsystem: Sony Corporation Device 820f
    Kernel modules: sky2
    04:00.0 System peripheral: JMicron Technology Corp. SD/MMC Host Controller (rev 30)
    Subsystem: JMicron Technology Corp. SD/MMC Host Controller
    Kernel driver in use: sdhci-pci

    After undoing the last two steps and rebooting, network connection is reestablished, but no wake on lan.

    Please help me. Why is this not working out ?

  2. Oh and I forgot: Ubuntu Version is LTS 12.04 x64. Kernel: 3.5.2-030502-generic.

    Is the proprietary linux driver only 32 bit ? Would this be a problem ?

    1. I didn’t see anything in the readme.txt that would indicate that this driver was 32 bit only. Did the install script produce any log output?

      Also, what do you get when you try to manually load the module via “modprobe sk98lin”?

      1. Hi there and thank you for your help.

        here’s the terminal output from install.sh:

        Action: 2

        Disconnect alternative devices: (done) [ OK ]
        Unload alternative driver (done) [ OK ]
        Create tmp dir (/tmp/Sk98IBBkrdbaRXaNcEHCDDijD) [ OK ]
        Check user id (0) [ OK ]
        Check kernel version (3.2.0-51-generic) [ OK ]
        Check kernel symbol file (/proc/kallsyms) [ OK ]
        Check kernel type (SMP) [ OK ]
        Check number of CPUs (2) [ OK ]
        Check architecture (found) [ OK ]
        Set architecture (x86_64) [ OK ]
        Check compiler (/usr/bin/gcc) [ OK ]
        Check mcmodel flags (kernel) [ OK ]
        Check module support (/sbin/insmod) [ OK ]
        Check make (/usr/bin/make) [ OK ]
        Check kernel gcc version (4.6.3) (Kernel:4.6.3 != gcc:(Ubuntu/Linaro)[ failed ]
        Check sk98lin driver availability (not loaded) [ OK ]
        Check kernel header files (/lib/modules/3.2.0-51-generic/build) [ OK ]
        Check driver location (/lib/modules/3.2.0-51-generic/build/drivers/net/ethernet/marvell) [ OK ]
        Check sources for .config file (/lib/modules/3.2.0-51-generic/build/.[ OK ]
        Copy and check .config file (done) [ OK ]
        Check the mem address space (lowmem) [ OK ]
        Change IOMMU (enabled) [ OK ]
        Create new .config file (done) [ OK ]
        Execute: make oldconfig (done) [ OK ]
        Check modpost availability (available) [ OK ]
        Unpack the sources (done) [ OK ]
        Check firmware availability (done) [ OK ]
        Check kernel header version (not recognized) [ warn ]
        Check kernel functions (Changed: nothing) [ OK ]
        Compile the kernel (done) [ OK ]
        Copy driver man page into /usr/share/man/man4/ (done) [ OK ]
        Check the driver (done) [ OK ]
        Delete old driver (done) [ OK ]
        Copying driver (done) [ OK ]
        Make dependency (done) [ OK ]
        Delete temp directories (done) [ OK ]
        All done. Driver installed and loaded.
        To load the module manually, proceed as follows:
        Enter “modprobe sk98lin”

        Have fun…

        and here’s the output of modprobe sk98lin & other commands AFTER REBOOT

        lsmod | grep sky
        lsmod | grep sk98lin
        sudo -s
        sudo modprobe sk98lin
        lsmod | grep sk98lin
        sk98lin 187175 0

        Even after manually loading the driver, I cannot get ethernet connectivity.

        I could also send the install.log file if that is of any help ?

        To me it would seem like the driver is not working at all. Or did I forget a command to activate it, besides modprobe sk98lin ?

        Thank you for your advice.

        1. sure, I can take a look at the logs – maybe I’ll spot something. feel free to email them to ben at afqa123 dot com.

          after you load the driver, does the device show when you run lspci? also, take a look at /var/log/kern.log as you load the driver – it might contain additional details on why the ethernet adapter isn’t working.

  3. Thanks for this blog post. I have spent over a day now trying to figure out how to address a problem on my system (desk top Acer Aspire T180) that a recently applied update for the Ubuntu LTS 12.04 operating system installation seemed to have caused, not once but twice — because I forgot to ignore the Update Manager’s prompts to install any until I had time to deal with ferreting out the real problem after having stumbled inadvertently on a workaround a few weeks ago when this happened the first time.

    I too have the infamously unsupported (or so a web search reveals) Marvell 88E8056 PCI-E Gigabit Etnernet Controller (rev 12). Was mystified as to what the heck could have happened when I updated but have much more urgent tasks for which I require my pc to have access to the net (no wireless access available where it is sitting right now).

    Had resolved to apply the fix you have documented here but just before doing so, thought I would re-read the whole of the post as well as the discussion you had with ‘bladerunner’. As a newbie I had not yet figured out more than I needed to to get my system up and running on Ubuntu, although I have used Linux-based systems before and I knew there must be better tools around than the Network Manager in Unity that would reveal why the interface was connecting/reconnecting every minute or so and maddeningly also was aware there were logs *somewhere* that would reveal the error messages that I knew would be created.

    Your last comment to bladerunner was the clue I needed. I looked into the kernel log and discovered that the sky2 driver was mainly reporting an error using IPv6. Okay. So what if I disabled that for a while? Bingo! I am now solidly connected to the net again, have made painstaking notes this time around (I know better but was in a rush last time and just happy I seemed to have fixed it but didn’t know how or why LOL).

    Eventually I know I must ditch this old hardware but no time or money for that adventure. So, thank you so much Ben. Your post was infinitely more help to me then all of the results of searching the Ubuntu forums — put together.

    1. Right on! Glad you found the post helpful – I mainly wrote it to save myself from the headache of having to figure it out all over again after the next Ubuntu update.

  4. Hi there. I wanted to share some information – this may help with your wakeonlan (WOL) issue with the Marvell device.

    I have a Shuttle device with Marvell Technology Group Ltd. 88E8056 PCI-E Gigabit Ethernet Controller (rev 12). I have been running Ubuntu 10.04 LTS and XBMC, with the Sky2 driver v1.25. WOL running just fine in this setup.

    I recently had to upgrade to 12.04 LTS as part of another story, and run into the WOL problem not working anymore with Sky2 v1.30

    The Sky2 driver fails because of parameter handling of Y2_HW_WOL_ON and Y2_HW_WOL_OFF and the register writes, during the sky2_wol_init function.

    I am by no means a Linux developer, but using a combination of lspci and setpci commands, I sniffed out the registers in the Marvell device that were set by the driver v1.25 and the driver v1.30, and now set the register manually with setpci when running the v1.30 driver. Wakeonlan works again with 12.04 LTS and v1.30 driver without any recompiling!

    The register (in my system) is at 0x41, and needs its value setting to 0x80. My Marvell chip is on the PCI bus at 02:00.0, found using lspci.

    I added this command in the same startup script used to run the ethtool sequence:

    setpci -s 02:00 41.b=80

    So, a nasty hack, but works fine. I would fix the sky2.c driver if I knew how to build a kernel driver on my system…

    1. Dave, thanks SO MUCH for sharing your fix! It is the only thing that worked for me after many hours of troubleshooting.

      I too have a Shuttle (XPC, model SG45H7) with the Marvell 88E8056 (rev-12) controller built-in. Mine was on the bus at 03:00 according to lspci, so that’s the only thing I had to change; 41.b=80 worked like a charm!

      And thanks to O.P. Ben for the article. There were all kinds of false leads out there about Ubuntu 12.04 LTS failing to enable WOL or shutting down the NIC when it shouldn’t. Finally a search for “88E8056 Wake on LAN” led me here. After about 4x trying to compile the proprietary drivers it became clear their install script just doesn’t understand the source for my kernel (3.11.0-18-generic).

    2. Thank you Dave! I too have spent the entire day scouring forums for an answer to this issue. My system is a Netgear ReadyNAS Pro that I installed Debian on and the WOL stopped working. Very hard to find any information on custom installed OS’s on this hardware in my situation… Tearing my hair out trying to track down the problem and your solution has also worked for me.
      Cheers to you!

  5. Thank you Dave! 4 years later your fix still works for my Shuttle (XPC, model SG33) with the Marvell 88E8056 (rev-12) controller built-in.
    This is a minimal install from scratch of Ubuntu 18.04 btw and apparently sky2 driver is still broken for WOL.

Leave a Reply to Ben Cancel reply

Your email address will not be published.