FreeBSD and Intel Bay Trail

My old Core 2 Duo server from 2007 has been with me for a little too long now. Its an old workstation from a previous job. But I haven’t really found any alternatives that fit both my requirements and budget, until now.

My requirements were a passively cooled(low TDP) mITX board with an integrated CPU(with decent performance), at least 4 SATA ports,  an HDMI port and DDR3 SO-DIMM slots. For no more than about 80 USD. Until Intel released the Bay Trail CPU family there was nothing that could fill those requirements. So when I saw that Asrock released their Q1900-ITX board, I ordered one.

Bleeding edge hardware and FreeBSD requires some tweaking though…

The plan was to simply replace my current C2D motherboard with the new one. With my C2D I ran FreeBSD 9.2 RELEASE. Some research before mounting the new Bay Trail board told me that there was a flaw in ACPI that required patching, or I’d get a kernel panic straight away.

So for the first time in about 10 years I ran through the process of Rebuilding World. I checked out the source, applied the ACPI patch, and after a few hours I had a fresh 9.3 STABLE. Remember, I did this on the C2D in preparation. You can’t do this after mounting the board, as it won’t boot.

Then, I mounted the board. I had some old DDR3 SO-DIMMs around that I used. Hit the power button, the thing powered on, but there was nothing but a blank screen. Did I get a DOA board?

Removed all the headers and SATA connectors to see if that would help. Nope. Removed one of the DIMMs. Nope. Swapped to the other DIMM. YES.

Ok, so now I knew that it didn’t like one of my DIMMs. Turns out it was an 800mhz one, while the working one was 1333mhz. Luckily I had another 1333mhz one around, so I popped in both of them and voila, it finally booted.

Booted into FreeBSD and began to start my applications. Noted that it rather quickly started to behave strangely, apps wouldn’t power on propperly, they kind of stuck. And the CPU usage in top got stuck, as well as the load avg.

Hmm Ok. Time to disable all power saving stuff and other “modern” things in the BIOS. So I rebooted and disabled pretty much everything that I could. C-states, SpeedStep etc etc. Back in FreeBSD it seemed better. But after about 15 minutes it began to behave strange again. Noticed that the clock jumped backwards as well.

Allright, maybe there is something strange with this board… This is were I remembered I had done some power saving tweaks on my old C2D. I looked in /etc/rc.conf , /boot/loader.conf and /boot/device.hints and found this:

loader.conf:
hint.p4tcc.0.disabled=1
hint.acpi_throttle.0.disabled=1
hint.apic.0.clock=0
kern.hz=100
hint.atrtc.0.clock=0
hint.pcm.0.buffersize=65536
hint.pcm.1.buffersize=65536
hw.snd.feeder_buffersize=65536
hw.snd.latency=7
rc.conf:
powerd_enable=”YES”
performance_cx_lowest=”C2″
economy_cx_lowest=”C2″
device.hints:
hint.fdc.0.at=”isa”
hint.fdc.0.port=”0x3F0″
hint.fdc.0.irq=”6″
hint.fdc.0.drq=”2″
hint.fd.0.at=”fdc0″
hint.fd.0.drive=”0″
hint.fd.1.at=”fdc0″
hint.fd.1.drive=”1″
hint.atkbdc.0.at=”isa”
hint.atkbdc.0.port=”0x060″
hint.atkbd.0.at=”atkbdc”
hint.atkbd.0.irq=”1″
hint.psm.0.at=”atkbdc”
hint.psm.0.irq=”12″
hint.sc.0.at=”isa”
hint.sc.0.flags=”0x100″
hint.uart.0.at=”isa”
hint.uart.0.port=”0x3F8″
hint.uart.0.flags=”0x10″
hint.uart.0.irq=”4″
hint.uart.1.at=”isa”
hint.uart.1.port=”0x2F8″
hint.uart.1.irq=”3″
hint.ppc.0.at=”isa”
hint.ppc.0.irq=”7″
hint.atrtc.0.at=”isa”
hint.atrtc.0.port=”0x70″
hint.atrtc.0.irq=”8″
hint.attimer.0.at=”isa”
hint.attimer.0.port=”0x40″
hint.attimer.0.irq=”0″
hint.wbwd.0.at=”isa”

Basically I’d followed the power consumption tuning on the FreeBSD WIKI and apparantly the settings that worked on the C2D didn’t work on the Bay Trail. So I removed all that and rebooted once more. This seems to have done the trick. The machine now seems to behave nicely, no strangeness anymore.

So, to sum this all up. If you plan on running FreeBSD on an Intel Bay Trail, make sure you patch for the ACPI bug(or run the development branch 11-CURRENT where its implemented), disable all power saving stuff in the BIOS, and make sure you disable any previous power saving tweaks in FreeBSD. Then you should have a stable machine, that still consumes very little power.

I may eventually, when I get my power meter back, end up tweaking powerd etc for this board as well, but for now I’m happy with it running without any hickups.

UPDATE: It seems the strangeness experienced was indeed caused by my previous power optimizations. I’ve now enabled most power saving stuff and speedstep etc in the BIOS, as well as enabled powerd again, and the system is stable!

I have also spoken to the FreeBSD team, and they have now merged the ACPI patch into the 9 and 10 STABLE branches, as well as 9.3 RELEASE. So 9.3 which is due in a few days should work “out of the box” with no tweaks or patching required. And 10.1 which is due in a few months should work as well.

 

This entry was posted in FreeBSD and tagged , , , , , , , , , , . Bookmark the permalink.
  • Pingback: max()