# How good is support for Apple hardware in freebsd ATM?



## rusma (Mar 24, 2010)

Hi

How good is support for Mac computers/Apple hardware in FreeBSD? Is there some very "thin" areas to be considered? I'm considering buying maybe a Mac Mini or a Macbook when my dell dimension 5150 workstation fades away. 

Afterall, is not much of the freebsd core one of many ingredienses in Mac OS X?


----------



## gordon@ (Mar 26, 2010)

Installation looks to be a little bumpy, but doable.
http://wiki.freebsd.org/AppleMacbook

I haven't tried this myself, but those instructions might give you an idea.


----------



## ehwood (Apr 14, 2010)

I can only speak for my old iBook G4. The FreeBSD 8 installer wouldn't properly partition and format the hard drive. It had an odd way of trying to do it, but failing - it saw that there was a hard drive, but it wouldn't delete existing partitions (whether from Mac OS X or Fedora Linux), though it did try to make new partitions _within_ the an existing one. Very odd.


----------



## trev (Apr 14, 2010)

rusma said:
			
		

> Hi
> How good is support for Mac computers/Apple hardware in FreeBSD? [...] I'm considering buying maybe a Mac Mini or a Macbook when my dell dimension 5150 workstation fades away.



I'm running a late 2009 Mac Mini with FreeBSD 7.2-STABLE i386 with no real issues. I haven't tried the amd64 version... can't recall why. I did try FreeBSD 8 but it doesn't boot without reverting the kernel to an older pre-8 release version.

I've been meaning to write a userland driver for the Apple SMC (System management Controller) so I can control the fan and monitor the temps properly. Other than that, I've no issues at all. Enhanced Intel speedstep throttles the CPU down to 199MHz from 2260MHz depending on what I'm doing. It lasts almost forever on the APC 1500VA UPS   Current uptime is 134 days, 23:08 - not too shabby.

Here's the dmesg dump (I have a Lindy USB -> 4 rs232 ports plugged in - needed no driver).



```
Copyright (c) 1992-2009 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 7.2-STABLE #3: Tue Nov 10 23:50:12 EST 2009
    trev@:/usr/obj/usr/src/sys/MACMINI i386
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Core(TM)2 Duo CPU     P7550  @ 2.26GHz (2255.36-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x1067a  Stepping = 10
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36, 
-> CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x408e3bd<SSE3,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE>
  AMD Features=0x20100000<NX,LM>
  AMD Features2=0x1<LAHF>
  Cores per package: 2
real memory  = 2925850624 (2790 MB)
avail memory = 2860707840 (2728 MB)
ACPI APIC Table: <APPLE  Apple00>
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
ioapic0: Changing APIC ID to 1
ioapic0 <Version 1.1> irqs 0-23 on motherboard
kbd0 at kbdmux0
acpi0: <APPLE Apple00> on motherboard
acpi0: [ITHREAD]
acpi_ec0: <Embedded Controller: GPE 0x3f, ECDT> port 0x62,0x66 on acpi0
acpi0: Power Button (fixed)
unknown: I/O range not supported
Timecounter "HPET" frequency 25000000 Hz quality 900
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
acpi_button0: <Power Button> on acpi0
acpi_button1: <Sleep Button> on acpi0
pcib0: <ACPI Host-PCI bridge> on acpi0
pci0: <ACPI PCI bus> on pcib0
pci0: <memory, RAM> at device 0.1 (no driver attached)
isab0: <PCI-ISA bridge> port 0x2000-0x20ff at device 3.0 on pci0
isa0: <ISA bus> on isab0
pci0: <memory, RAM> at device 3.1 (no driver attached)
pci0: <serial bus, SMBus> at device 3.2 (no driver attached)
pci0: <memory, RAM> at device 3.3 (no driver attached)
pci0: <memory, RAM> at device 3.4 (no driver attached)
pci0: <processor> at device 3.5 (no driver attached)
ohci0: <OHCI (generic) USB controller> mem 0xd3488000-0xd3488fff irq 18 at device 4.0 on pci0
ohci0: [GIANT-LOCKED]
ohci0: [ITHREAD]
usb0: OHCI version 1.0, legacy support
usb0: SMM does not respond, resetting
usb0: <OHCI (generic) USB controller> on ohci0
usb0: USB revision 1.0
uhub0: <nVidia OHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb0
uhub0: 7 ports with 7 removable, self powered
ehci0: <EHCI (generic) USB 2.0 controller> mem 0xd3489200-0xd34892ff irq 19 at device 4.1 on pci0
ehci0: [GIANT-LOCKED]
ehci0: [ITHREAD]
usb1: EHCI version 1.0
usb1: companion controller, 12 ports each: usb0
usb1: <EHCI (generic) USB 2.0 controller> on ehci0
usb1: USB revision 2.0
uhub1: <nVidia EHCI root hub, class 9/0, rev 2.00/1.00, addr 1> on usb1
uhub1: 7 ports with 7 removable, self powered
ohci1: <OHCI (generic) USB controller> mem 0xd3487000-0xd3487fff irq 20 at device 6.0 on pci0
ohci1: [GIANT-LOCKED]
ohci1: [ITHREAD]
usb2: OHCI version 1.0, legacy support
usb2: <OHCI (generic) USB controller> on ohci1
usb2: USB revision 1.0
uhub2: <nVidia OHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb2
uhub2: 5 ports with 5 removable, self powered
ehci1: <EHCI (generic) USB 2.0 controller> mem 0xd3489100-0xd34891ff irq 21 at device 6.1 on pci0
ehci1: [GIANT-LOCKED]
ehci1: [ITHREAD]
usb3: EHCI version 1.0
usb3: companion controller, 12 ports each: usb2
usb3: <EHCI (generic) USB 2.0 controller> on ehci1
usb3: USB revision 2.0
uhub3: <nVidia EHCI root hub, class 9/0, rev 2.00/1.00, addr 1> on usb3
uhub3: 5 ports with 5 removable, self powered
pci0: <multimedia, HDA> at device 8.0 (no driver attached)
pcib1: <PCI-PCI bridge> at device 9.0 on pci0
pci1: <PCI bus> on pcib1
nfe0: <NVIDIA nForce MCP79 Networking Adapter> port 0x21e0-0x21e7 mem
-> 0xd3486000-0xd3486fff,0xd3489000-0xd34890ff,0xd3489300-0xd348930f irq 23 at device 10.0 on pci0
miibus0: <MII bus> on nfe0
rgephy0: <RTL8169S/8110S/8211B media interface> PHY 1 on miibus0
rgephy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
nfe0: Ethernet address: 00:26:bb:5a:ac:b4
nfe0: [FILTER]
atapci0: <nVidia ATA controller> port 0x21d8-0x21df,0x21ec-0x21ef, 0x21d0-0x21d7,
-> 0x21e8-0x21eb,0x21c0-0x21cf mem 0xd3484000-0xd3485fff irq 16 at device 11.0 on pci0
atapci0: [ITHREAD]
ata2: <ATA channel 0> on atapci0
ata2: [ITHREAD]
ata3: <ATA channel 1> on atapci0
ata3: [ITHREAD]
pcib2: <ACPI PCI-PCI bridge> at device 16.0 on pci0
pci2: <ACPI PCI bus> on pcib2
vgapci0: <VGA-compatible display> port 0x1000-0x107f mem 0xd2000000-0xd2ffffff,
-> 0xc0000000-0xcfffffff,0xd0000000-0xd1ffffff irq 17 at device 0.0 on pci2
pcib3: <ACPI PCI-PCI bridge> at device 21.0 on pci0
pci3: <ACPI PCI bus> on pcib3
pci3: <network> at device 0.0 (no driver attached)
pcib4: <ACPI PCI-PCI bridge> at device 22.0 on pci0
pci4: <ACPI PCI bus> on pcib4
pci4: <serial bus, FireWire> at device 0.0 (no driver attached)
cpu0: <ACPI CPU> on acpi0
est0: <Enhanced SpeedStep Frequency Control> on cpu0
p4tcc0: <CPU Frequency Thermal Control> on cpu0
cpu1: <ACPI CPU> on acpi0
est1: <Enhanced SpeedStep Frequency Control> on cpu1
p4tcc1: <CPU Frequency Thermal Control> on cpu1
pmtimer0 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
ata0 at port 0x1f0-0x1f7,0x3f6 irq 14 on isa0
ata0: [ITHREAD]
ata1 at port 0x170-0x177,0x376 irq 15 on isa0
ata1: [ITHREAD]
uhid0: <Apple Computer, Inc. IR Receiver, class 0/0, rev 2.00/0.16, addr 2> on uhub0
uhub4: <ALCOR Generic USB Hub, class 9/0, rev 1.10/3.12, addr 3> on uhub0
uhub4: 4 ports with 4 removable, self powered
ugen0: <FTDI USB HS SERIAL CONVERTER, class 0/0, rev 1.10/4.00, addr 4> on uhub4
ugen1: <FTDI USB HS SERIAL CONVERTER, class 0/0, rev 1.10/4.00, addr 5> on uhub4
ugen2: <FTDI USB HS SERIAL CONVERTER, class 0/0, rev 1.10/4.00, addr 6> on uhub4
ugen3: <FTDI USB HS SERIAL CONVERTER, class 0/0, rev 1.10/4.00, addr 7> on uhub4
uhub5: <Apple Inc. BRCM2046 Hub, class 9/0, rev 2.00/1.00, addr 2> on uhub2
uhub5: 3 ports with 0 removable, self powered
ugen4: <Apple Inc. Bluetooth USB Host Controller, class 224/1, rev 2.00/1.80, addr 3> on uhub5
ukbd0: <vendor 0x05ac product 0x820a, class 0/0, rev 2.00/1.00, addr 4> on uhub5
kbd1 at ukbd0
ums0: <vendor 0x05ac product 0x820b, class 0/0, rev 2.00/1.00, addr 5> on uhub5
ums0: 3 buttons.
ukbd1: <No brand KVM, class 0/0, rev 1.10/0.00, addr 6> on uhub2
kbd2 at ukbd1
ums1: <No brand KVM, class 0/0, rev 1.10/0.00, addr 6> on uhub2
ums1: 5 buttons and Z dir.
Timecounters tick every 1.000 msec
ad4: 152627MB <FUJITSU MHZ2160BH G1 00810009> at ata2-master UDMA33
acd0: DVDR <OPTIARC DVD RW AD-5670S/2AHI> at ata3-master UDMA33
SMP: AP CPU #1 Launched!
Trying to mount root from ufs:/dev/ad4s1a
nfe0: link state changed to UP
ugen3: at uhub4 port 4 (addr 7) disconnected
ugen3: detached
ugen3: <FTDI USB HS SERIAL CONVERTER, class 0/0, rev 1.10/4.00, addr 7> on uhub4
ugen2: at uhub4 port 3 (addr 6) disconnected
ugen2: detached
ugen2: <FTDI USB HS SERIAL CONVERTER, class 0/0, rev 1.10/4.00, addr 6> on uhub4
ugen3: at uhub4 port 4 (addr 7) disconnected
ugen3: detached
ucom0: <FTDI USB HS SERIAL CONVERTER, class 0/0, rev 1.10/4.00, addr 7> on uhub4
ugen2: at uhub4 port 3 (addr 6) disconnected
ugen2: detached
ucom1: <FTDI USB HS SERIAL CONVERTER, class 0/0, rev 1.10/4.00, addr 6> on uhub4
nfe0: link state changed to DOWN
nfe0: link state changed to UP
```


----------



## klanger (Apr 14, 2010)

trev said:
			
		

> I've been meaning to write a userland driver for the Apple SMC (System management Controller) so I can control the fan and monitor the temps properly. Other than that, I've no issues at all. Enhanced Intel speedstep throttles the CPU down to 199MHz from 2260MHz depending on what I'm doing. It lasts almost forever on the APC 1500VA UPS   Current uptime is 134 days, 23:08 - not too shabby.



Could you share that script? 

I would like to do similar thing for eeepc - its fan speed is not well set - it stays up to 63-65oC at 1400 rpm, so I adjust its speed manually. It would be great to have a spript for that...


----------



## trev (Apr 15, 2010)

klanger said:
			
		

> Could you share that script?



It's needs to be a driver to read/set values for the Apple SMC and I haven't written it yet as noted.



> I would like to do similar thing for eeepc - its fan speed is not well set - it stays up to 63-65oC at 1400 rpm, so I adjust its speed manually. It would be great to have a spript for that...



As the EEEPC does not have an Apple SMC, it would not work anyway  

To control the fan on my EEEPC 701 I used to use acpi_asus which exposed the temperature and fan speed via sysctl variables. Unfortunately the SD card on which FreeBSD resided died so I no longer have that script  but it's not too difficult to do - check the temp, set the fan speed, sleep 5 minutes, loop.


----------

