Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Macmini6,2 network driver not working

  1. #1
    Join Date
    Oct 2012
    Beans
    5

    Macmini6,2 network driver not working

    Howdy All,

    I've been pulling my hair out trying to get the network working with my new mac mini. Any one else having issues installing Ubuntu 12.04 server on a macmini6,2 (Late 2012)?

    Running lspci I see that the ethernet card is a Broadcom BCM57765.

    I tried loading the tg3 driver, but it doesn't seem to do anything.

    Code:
    modeprobe tg3
    Code:
    dmesg | grep eth
    reports nothing.

    Any thoughts on where to go from here?

    Thanks in advance.

  2. #2
    Join Date
    Oct 2012
    Beans
    5

    Re: Macmini6,2 network driver not working

    I was able to get it to work with newer drivers from Broadcom.

    http://www.broadcom.com/support/ethe...me_desktop.php

    Compiled against kernel 3.2.0-32-generic works just fine.

  3. #3
    Join Date
    Feb 2007
    Beans
    291

    Re: Macmini6,2 network driver not working

    I have this same problem, I have the base model 2012 mac mini, neither wired or wireless works.

    Would you kindly post instructions for how you got the module loaded?

  4. #4
    Join Date
    Oct 2012
    Beans
    5

    Re: Macmini6,2 network driver not working

    Quote Originally Posted by superyounan1 View Post
    Would you kindly post instructions for how you got the module loaded?
    Sure.

    I actually used a 2nd Ubuntu 12.04 install to do the follow steps, but you should be able to do it all on the mac mini if that is all you have access to. You will for sure need another computer though to download the driver.

    First, make sure you have a build environment setup. You can do this on the mac mini during the install process. It will ask what packages to install, you need to select the last option to choose additional packages.

    Find the build-essentials package and hit +, then g to install it. You will also need the unzip package.

    You will also need the linux-source package. I'm not sure if that's on the install iso or not. If it is not, then you'll need to download it from another machine and copy it over and then install it.

    At this point the machine should be installed and you should have a sane build environment with the linux kernel sources.

    Download the Broadcom drivers from here:
    http://www.broadcom.com/support/lice...nux-3.124c.zip

    Unzip the downloaded file.

    Under the Server/Linux/Driver directory untar this file: tg3-3.124c.tar.gz

    Then, inside that directory run
    Code:
    make
    If that all works then you should have a tg3.ko file in that directory.

    Copy that file to /lib/modules/`uname -r`/kernel/drivers/net/ethernet/broadcom/tg3.ko

    Then run
    Code:
    modprobe tg3
    You should be able to see that it worked by checking
    Code:
    dmesg | grep eth0
    If you see some text after that command you're good to go.

    Let me know if you have any questions.

  5. #5
    Join Date
    Feb 2007
    Beans
    291

    Re: Macmini6,2 network driver not working

    Sigh, I never once compiled something from source in linux without running into a dozen errors or coming up against an endless list of missing dependencies.

    I'm using a live session with persistence (casper), so I popped it into a dell laptop (goes online fine, btw) and tried to compile, got this:

    Code:
    ubuntu@ubuntu:~/Downloads/Server/Linux/Driver/tg3-3.124c$ make
    make -C /lib/modules/3.5.0-17-generic/build SUBDIRS=/home/ubuntu/Downloads/Server/Linux/Driver/tg3-3.124c modules
    make[1]: Entering directory `/usr/src/linux-headers-3.5.0-17-generic'
      CC [M]  /home/ubuntu/Downloads/Server/Linux/Driver/tg3-3.124c/tg3.o
    /home/ubuntu/Downloads/Server/Linux/Driver/tg3-3.124c/tg3.c:96:24: fatal error: asm/system.h: No such file or directory
    compilation terminated.
    make[2]: *** [/home/ubuntu/Downloads/Server/Linux/Driver/tg3-3.124c/tg3.o] Error 1
    make[1]: *** [_module_/home/ubuntu/Downloads/Server/Linux/Driver/tg3-3.124c] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-17-generic'
    make: *** [default] Error 2
    I do have linux headers installed, but somehow system.h is missing? I did some googling and found a very similar issue affecting nvidia drivers, though I don't think they're related.

    Anyway I have small intel atom / ion htpc running 12.04, tried compiling there and got this:

    Code:
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c: In function ‘tg3_phy_autoneg_cfg’:
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:4338:2: error: implicit declaration of function ‘ethtool_adv_to_mii_adv_t’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:4346:3: error: implicit declaration of function ‘ethtool_adv_to_mii_ctrl1000_t’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c: In function ‘tg3_phy_pull_config’:
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:4614:3: error: implicit declaration of function ‘mii_adv_to_ethtool_adv_t’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:4631:4: error: implicit declaration of function ‘mii_ctrl1000_to_ethtool_adv_t’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:4642:4: error: implicit declaration of function ‘mii_adv_to_ethtool_adv_x’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c: In function ‘tg3_phy_copper_fetch_rmtadv’:
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:4787:3: error: implicit declaration of function ‘mii_stat1000_to_ethtool_lpa_t’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:4793:2: error: implicit declaration of function ‘mii_lpa_to_ethtool_lpa_t’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c: In function ‘tg3_setup_fiber_mii_phy’:
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:5913:3: error: implicit declaration of function ‘ethtool_adv_to_mii_adv_x’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c: In function ‘tg3_tx’:
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:6684:2: error: implicit declaration of function ‘netdev_tx_completed_queue’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c: In function ‘tg3_start_xmit’:
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:8263:2: error: implicit declaration of function ‘netdev_tx_sent_queue’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c: In function ‘tg3_free_rings’:
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:8705:3: error: implicit declaration of function ‘netdev_tx_reset_queue’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c: In function ‘tg3_rss_init_dflt_indir_tbl’:
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:9903:3: error: implicit declaration of function ‘ethtool_rxfh_indir_default’ [-Werror=implicit-function-declaration]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c: At top level:
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:14512:2: error: unknown field ‘get_rxfh_indir_size’ specified in initializer
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:14512:2: warning: initialization from incompatible pointer type [enabled by default]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:14512:2: warning: (near initialization for ‘tg3_ethtool_ops.set_rxnfc’) [enabled by default]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:14514:2: warning: initialization from incompatible pointer type [enabled by default]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:14514:2: warning: (near initialization for ‘tg3_ethtool_ops.get_rxfh_indir’) [enabled by default]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:14515:2: warning: initialization from incompatible pointer type [enabled by default]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:14515:2: warning: (near initialization for ‘tg3_ethtool_ops.set_rxfh_indir’) [enabled by default]
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c: In function ‘tg3_init_one’:
    /home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.c:17926:2: error: unknown type name ‘netdev_features_t’
    cc1: some warnings being treated as errors
    make[2]: *** [/home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c/tg3.o] Error 1
    make[1]: *** [_module_/home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-32-generic'
    make: *** [default] Error 2
    I'll do some searching tomorrow for more options.

  6. #6
    Join Date
    Jun 2009
    Beans
    9

    Re: Macmini6,2 network driver not working

    Quote Originally Posted by superyounan1 View Post
    I'm using a live session with persistence (casper), so I popped it into a dell laptop (goes online fine, btw) and tried to compile, got this:

    Code:
    ubuntu@ubuntu:~/Downloads/Server/Linux/Driver/tg3-3.124c$ make
    make -C /lib/modules/3.5.0-17-generic/build SUBDIRS=/home/ubuntu/Downloads/Server/Linux/Driver/tg3-3.124c modules
    make[1]: Entering directory `/usr/src/linux-headers-3.5.0-17-generic'
      CC [M]  /home/ubuntu/Downloads/Server/Linux/Driver/tg3-3.124c/tg3.o
    /home/ubuntu/Downloads/Server/Linux/Driver/tg3-3.124c/tg3.c:96:24: fatal error: asm/system.h: No such file or directory
    compilation terminated.
    make[2]: *** [/home/ubuntu/Downloads/Server/Linux/Driver/tg3-3.124c/tg3.o] Error 1
    make[1]: *** [_module_/home/ubuntu/Downloads/Server/Linux/Driver/tg3-3.124c] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-17-generic'
    make: *** [default] Error 2
    I do have linux headers installed, but somehow system.h is missing? I did some googling and found a very similar issue affecting nvidia drivers, though I don't think they're related.
    Note that you're compiling against a different version of the kernel than the example above. I'm guessing you are using quantal, whereas the other example was using precise. It seems that asm/system.h was removed somewhat recently, at least on x86.

    Anyway I have small intel atom / ion htpc running 12.04, tried compiling there and got this:

    Code:
    [...]
    make[1]: *** [_module_/home/(replaced)/Desktop/Server/Linux/Driver/tg3-3.124c] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-32-generic'
    make: *** [default] Error 2
    Here you're back to 3.2.0, which I imagine is on precise.

    I have not tried building the tg3 driver on precise, but I did manage to get it working on quantal on my macmini6,1. I made the following changes to the driver sources:

    1. At line 96 of tg3.c, simply comment out the inclusion of asm/system.h:
    Code:
    /* #include <asm/system.h> */
    2. At line 14534 of tg3.c, I surrounded the following two lines of code ...
    Code:
    	.get_sg			= ethtool_op_get_sg,
    	.set_sg			= ethtool_op_set_sg,
    ... with a preprocessor directive reflecting the fact that get_sg and set_sg were deprecated in (I believe) Linux 3.0 and removed sometime after that. Here's what that looks like:
    Code:
    #if (LINUX_VERSION_CODE < 0x30000)
    	.get_sg			= ethtool_op_get_sg,
    	.set_sg			= ethtool_op_set_sg,
    #endif
    3. Finally, since the API the driver tries to use to do TCP Segment Offloading went through the same deprecation and removal as get_sg and set_sg, and since I have no idea how to modify the driver to use the new API, I attempted to remove the TSO support entirely by changing line 3 of tg3_firmware.h from ...
    Code:
    #ifdef NETIF_F_TSO
    ... to ...
    Code:
    #ifdef XXXXNETIF_F_TSO
    That resulted in a driver that's working for me. Clearly it's just a quick hack, but it got the network up on my new Mac mini, so it's good enough for me for now. Hopefully someone who knows more about Ethernet drivers can provide a proper patch, or perhaps Broadcom will update their driver sometime soon.

  7. #7
    Join Date
    Oct 2012
    Beans
    5

    Re: Macmini6,2 network driver not working

    Quote Originally Posted by superyounan1 View Post
    Sigh, I never once compiled something from source in linux without running into a dozen errors or coming up against an endless list of missing dependencies.
    I hear ya. I redid what I did before and wrote down everything this time, maybe this will help:

    Starting with a fresh install of Ubuntu 12.04 Server on a x86_64 VM

    Code:
    apt-get install build-essential linux-source linux-server unzip
    
    wget !snip!
    
    unzip linux-3.124c.zip?dl=1
    
    cd Server/Linux/Driver/
    tar zxf tg3-3.124c.tar.gz
    
    cd tg3-3.124c
    
    make
    At that point the build was successful and I had a tg3.ko file ready to go. The only other problem was that this was compiled against kernel version 3.2.0-32-generic. This is not the standard kernel installed with the 12.04 install CD, so you have to upgrade the kernel before you can use the .ko file.

    I installed the kernel on the mac mini and copied the tg3.ko file to /lib/modules/3.2.0-32-generic/kernel/drivers/net/ethernet/broadcom/tg3.ko

    Here is a zip file that contains the compiled tg3.ko module as well as the deb packages to upgrade the mac mini to the right kernel.

    !snip!

    Good luck!
    Last edited by ianneub; November 1st, 2012 at 03:59 PM. Reason: removed links to dropbox files that are no longer present

  8. #8
    Join Date
    Feb 2007
    Beans
    291

    Re: Macmini6,2 network driver not working

    So before I checked this thread this morning I installed "firmware-b43-installer" and "linux-firmware-nonfree" - one of these two got me onto wifi, although scans weren't finding 802.11n networks. Wired networking also was still not working.

    I tried compiling the module again with rcsheet's advice (post #6) to simply comment out the include of asm/system.h and the the other changes, this worked. I moved the binary tg3.ko to /lib/modules/`uname -r`/kernel/drivers/net/ethernet/broadcom/, ran
    Code:
    sudo modprobe tg3
    and viola, a "wired connection established" notification popped up.

    Code:
    ubuntu@ubuntu:~$ dmesg | grep eth0
    [  736.089264] pcieport 0000:00:1c.0: eth0: Tigon3 [partno(BCM957766a) rev 57766001] (PCI Express) MAC address (redacted)
    [  736.089271] pcieport 0000:00:1c.0: eth0: attached PHY is 57765 (10/100/1000Base-T Ethernet) (WireSpeed[1], EEE[1])
    [  736.089275] pcieport 0000:00:1c.0: eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] TSOcap[1]
    [  736.089280] pcieport 0000:00:1c.0: eth0: dma_rwctrl[00000001] dma_mask[64-bit]
    I'll try this more often... missing header file? Missing library? Fine, just erase or comment that part of the code calling it.

    Thank you both, ianneub and rcsheets.
    Last edited by superyounan1; November 1st, 2012 at 03:29 PM.

  9. #9
    Join Date
    Feb 2007
    Beans
    291

    Re: Macmini6,2 network driver not working

    Additional information:

    Based on ianneub's instructions for 12.04 in post #7 I went back to my 12.04 pc and installed linux-source and linux-server, then tried compiling again the source I downloaded originally from broadcom directly and got the same warnings and errors I posted in post #5. I'm using kernel version 3.2.0-32-generic on that machine.

    I didn't want to install kernel 3.2.0-32 on the persistent live session I'm using on the mac mini because that's 12.10 with 3.5.0-17-generic.

    Thanks for going through the trouble of posting the package and compiled kernel to dropbox, but I doubt I would've felt comfortable doing that even if I hadn't gotten it going.

  10. #10
    Join Date
    Oct 2012
    Beans
    5

    Re: Macmini6,2 network driver not working

    Quote Originally Posted by superyounan1 View Post
    Thanks for going through the trouble of posting the package and compiled kernel to dropbox, but I doubt I would've felt comfortable doing that even if I hadn't gotten it going.
    No sweat, I totally understand that. I wouldn't either

    I ended up throwing in the towel on getting this macmini6,2 working under 12.04. I also had problems with the SD card reader not working as well as some USB issues.

    Unfortunately I don't have the time to work through the issues and I'll just use OS X for this server

    If anyone ever gets a good working system and wants to post info on how to duplicate it I'd love to try it!

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •