December 30, 2006 at 7:29AM Setting up sound on an Inspiron 1300 running FreeBSD (with some notes on graphics too)
Update (Jan 25th, 2008): Now that FreeBSD 6.3 is out, the snd_hda driver is part of it, so I recommend upgrading to that instead.
Aside: Seeing as I’ve got a few links to this page about getting this to work, I’d better point out that I highly recommend using FreeBSD 6.2 rather than FreeBSD 6.1. It’s worth it if only because it supports the laptop’s graphics hardware better.
I’m setting up my laptop to dual boot FreeBSD 6.1 and Windows XP Home. Sound drivers aren’t installed by default, but it’s not too difficult to set them up.
My Inspiron 1300 (here’s a review) is a pretty good laptop considering how little I paid for it. My only complaint about it is that the battery supplied is a bit crap, but I did get an extra 512MB for free and I doubt I’ll be travelling too much with it, so I’m not too bothered, though I might think of getting a better battery in the future.
The sound card is a “SigmaTel STAC9200”, which, after running cat /dev/sndstat reports it as an “Intel 82801F High Definition Audio Controller”. A quick google tells me that FreeBSD doesn’t have any HDA drivers by default.
However, I discovered (and no, I can’t read japanese, but I do have some common sense) that a while back the audio drivers were updated and the updates are available for download. Log in as root and type the following:
mkdir snd cd snd fetch http://people.freebsd.org/~ariff/lowlatency/sndkld_releng6_i386_lowlatency.tar.gz fetch http://people.freebsd.org/~ariff/lowlatency/soundcard.h tar xf sndkld_releng6_i386_lowlatency.tar.gz cp *.ko /boot/kernel/ kldxref /boot/kernel/ cp soundcard.h /usr/include/sys/ cd .. rm -r snd
Now, add the following line to the /boot/loader.conf file:
snd_hda_load="YES"
And reboot. If you don’t want to reboot just yet, type kldload snd_hda at the shell prompt.
One other thing to note: if you want to run X at 1280x800 on it as Dog intended, install the 915resolution port. Add the following line to rc.local:
915resolution 38 1280 800
Yes, I know rc.local is deprecated, but this is a hack and I can’t be bothered to put a proper script in /usr/local/etc/rc.d just yet. You’ll also need to hack your xorg.conf file to add the appropriate resolution. Some day such hacks won’t be needed, but here’s my xorg.conf file:
Section "Module"
Load "dbe"
SubSection "extmod"
Option "omit xfree86-dga"
EndSubSection
Load "type1"
Load "freetype"
Load "glx"
Load "dri"
EndSection
Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/TTF/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/local/"
FontPath "/usr/X11R6/lib/X11/fonts/TrueType/"
EndSection
Section "InputDevice"
Identifier "Keyboard1"
Driver "kbd"
Option "AutoRepeat" "500 30"
Option "XkbRules" "xorg"
Option "XkbLayout" "ie"
EndSection
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "Auto"
Option "Device" "/dev/sysmouse"
Option "ZAxisMapping" "4 5 6 7"
Option "Emulate3Buttons"
EndSection
Section "Monitor"
Identifier "LCD Monitor"
# Not really meaningful on an LCD monitor.
HorizSync 31.5 - 64.3
VertRefresh 50-100
EndSection
Section "Device"
Identifier "Onboard Card"
Driver "i810"
VideoRam 8192
EndSection
Section "Screen"
Identifier "Screen 1"
Device "Onboard Card"
Monitor "LCD Monitor"
DefaultDepth 24
Subsection "Display"
Depth 8
Modes "1280x800"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 16
Modes "1280x800"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 24
Modes "1280x800"
ViewPort 0 0
EndSubsection
EndSection
Section "ServerLayout"
Identifier "Simple Layout"
Screen "Screen 1"
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection
And for reference’s sake, I put mine at /etc/X11/xorg.conf.
I haven’t attempted to put it in standby or hibernation, but I expect horrible stuff to happen when I do. If something does go wrong, I can use this Gentoo-oriented guide a sconce.
Update: Hurray! I upgraded to FreeBSD 6.2 yesterday, and the problems I’d been having with the graphics card kernel driver disappeared. That means I’ve 90% of the hardware working just fine. Unfortunately the other 10%---the wireless networking card---is still a bit of a problem. I ran the Windows NDIS driver through ndiscvt to wrap them for use on Free, but on boot, it caused a kernel panic. They’re the same drivers I’m using in WinXP, so they ought to have worked ok. Oh well, with any luck this post, which uses different drivers for the same type of Mini-PCI card, might help.
Yet More: Excellent! I’ve the wireless card up and running! Now I can head to Barcamp Ireland South East with my laptop.
Update: Corrected a typo if the listing for installing the sound drivers. Remember kids, if you spot something, tell me.
1 On July 4, 2007 at 9:11, Steve wrote:
This was very helpful! The wireless card has been a pain in my butt for a year, but I thought that audio chipset was not even possible. I hadn’t even tried it, but your steps were spot on! Rockin’!
You might want to link to the directions that you found for getting the wireless card to work too. I only today got mine working (super productive day, eh?), and could probably have used a good point in the right direction to some working drivers.