Friday, January 2, 2015

FreeBSD on an Intel Bay Trail Motherboard

Recently, I acquired an Asrock Q1900b-ITX motherboard, featuring an onboard Celeron J1900 CPU. Unlike previous iterations of Atom motherboards, the latest Bay Trail generation is an excellent performer while consuming very little power (about 10Watts).

This motherboard will be used in the Aiolos Project and so it has to run FreeBSD. Sound and graphics are not required for this specific use, but of course I set out to find whether the board is usable for a FreeBSD desktop.

Before purchasing the motherboard, I searched the Internet on FreeBSD and Bay Trail. And sure enough, I found a post of someone that has successfully installed FreeBSD on the very similar Q1900-ITX. And while FreeBSD 9.2-RELEASE needed extra patches to work with it, it seemed 10.1-RELEASE would need no extra work.

After performing the initial base install (without a hitch), I tried playing an mp3 file with mplayer. The sound card was recognized by the system:

cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC662 (Analog)> (play/rec) default
pcm1: <Realtek ALC662 (Analog)> (play/rec)
pcm2: <Realtek ALC662 (Front Analog Headphones)> (play)
pcm3: <Intel (0x2882) (HDMI/DP 8ch)> (play)


However, mplayer would not play:

Audio device got stuck!

I tried changing the default sound device from pcm0 to pcm1 and pcm2 to no avail. But then I discovered this post with an interesting sysctl:

dev.hdac.0.polling=1

For sound to work, the following two commands have to be executed (as root):

sysctl dev.hdac.0.polling=1
sysctl hw.snd.default_unit=1 

For the settings to persist across reboots, enter the following lines in /etc/sysctl.conf:

dev.hdac.0.polling=1
hw.snd.default_unit=1

This solves the sound problem once and for all!

Xorg Configuration

 

No matter what I tried, Xorg will only run in VESA mode. Using the current Intel driver (xf86-video-intel-2.21.15_5) in xorg.conf will give you a blank screen and unresponsive system. Running startx without a pre-generated xorg.conf file will use the VESA driver. I hope this will be fixed with a later version of the driver. Current linux distros have no problems with either sound or video on this board. And since you may ask, both Windows 7 and Windows 8.1 perform very well on the Q1900b-ITX.

Happy New Year and happy FreeBSDing too!

2 comments:

sirius_trader said...

You have no idea how long I tried to get my sound to work on my Aspire E 15 Start running FreeBSD 10.1 (upgraded from 10.0) THANK YOU THANK YOU THANK YOU...3 weeks!!! I learnt a lot in those 3 weeks though...THANK YOU!

Also running an Intel BayTrail, which I just found out and that lead me to google search and hit upon your post.

Khalil Gibran said...

Can you please check and post whether this SoC has EPT support? (the one required by Bhyve)
Thanks.