Recently in Guides Category

It's been quite a while since I wrote a post about getting flash working under firefox in FreeBSD. It's gotten fairly popular, but I've also gotten a lot of emails and comments telling me that it was out of date. I hadn't set up flash on my computer at home yet, so I just went through the steps and revised them a little.

linuxpluginwrapper will prompt you with a config menu for multimedia/linux-realplayer and print/acroread7 support. I suggest not enabling acroread - as of mid 2006, linuxpluginwrapper was having some issues with unresolved symbols. It appears this is still the case.

# cd /usr/ports/www/linuxpluginwrapper
# make install clean

If you try to compile linuxpluginwrapper with acroread support, you'll get something like this when you try to use it later:

LoadPlugin: failed to initialize shared library /usr/local/Adobe/Acrobat7.0/ENU/Browser/intellinux/nppdf.so [/usr/local/Adobe/Acrobat7.0/ENU/Browser/ intellinux/nppdf.so: Undefined symbol "__ctype_b_loc"]

rltd has to be patched if we want any chance of getting flash7 to work properly.

# cd /usr/src
# fetch -o - http://people.freebsd.org/~nork/rtld_dlsym_hack.diff | patch
# cd libexec/rtld-elf
# make clean && make && make install

Install www/linux-flashplayer7. Do not use flashplugin-mozilla.

# cd /usr/ports/www/linux-flashplayer7
# make install clean

Although linuxpluginwrapper does supply an example libmap.conf, it's old. I mean, just look at the version number. 2005? I'm going to assume that you actually bother to run somewhat updated software, so here's a libmap.conf that will work with the prefix change for X.Org when we bumped major versions.

# My sample /etc/libmap.conf
# Flash 7 with Mozilla/Firefox
[/usr/local/lib/npapi/linux-flashplugin/libflashplayer.so]
libpthread.so.0 libpthread.so.2
libdl.so.2 pluginwrapper/flash7.so
libz.so.1 libz.so.3
libm.so.6 libm.so.4
libc.so.6 pluginwrapper/flash7.so
# Helix RealPlayer
[/usr/local/lib/linux-mozilla/plugins/nphelix.so]
libstdc++.so.5 libstdc++.so.5
libc.so.6 pluginwrapper/realplayer.so
libm.so.6 libm.so.4
libgcc_s.so.1 pluginwrapper/realplayer.so

We're almost done. Create a symlink for the flash player.

# ln -s /usr/local/lib/npapi/linux-flashplugin/libflashplayer.so /usr/local/lib/browser_linux_plugins/

Run firefox and go to about:plugins to verify plugin installation. It should look something like this. If you see it listed, you can test to see if it's working by coming to freebsdgirl.com and seeing if my meebo app loads.

I've heard rumors of proper flash 9 support soon, so keep your fingers crossed.

Due to popular request, here's how I did it. These guidelines assume you've got an nvidia video card. If you don't... well, I can't help you. ;)

FreeBSD tart.freebsdgirl.com 6.2-RELEASE-p2 FreeBSD 6.2-RELEASE-p2 #4: Sun Mar 11 03:36:58 PDT 2007 root@tart.freebsdgirl.com:/usr/obj/usr/src/sys/DESKTOP i386

esound 0.2.37_1
nvidia-driver 1.0.9746
wine-0.9.33,1
xorg-clients 6.9.0_3
xorg-libraries 6.9.0_1
xorg-server 6.9.0_6

Enable glx under the Module section of your xorg,conf, and run xdpyinfo from an xterm to verify your configuration. You should see both GLX and NV-GLX in the list of enabled extensions.

After installing wine, run winecfg to bring up the graphical configuration editor. Click to see a screenshot of my Applications Tab, Audio Tab, and Graphics Tab. The audio tab won't display a checkbox for esound unless the daemon is running. It's not required that you use esound, but that was the method I decided on. Use what works for you.

The only way I could install WoW was by copying over the directory from my old windows installation. I had a lot of issues with the installer from the CD, but your mileage may vary. Unless you've got a non-standard wine directory configuration, you'll want to copy/install to ~/.wine/drive_c/Program Files/World of Warcraft.

Using your favorite text editor, open WTF/Config.WTF inside the World of Warcraft directory. This file contains most of the general audio/video configuration options. See WoWWiki: Config.wtf Defaults for more information.

Add/change these variables.

SET gxApi "opengl"
SET gxWindow "1"

Here's some Config.wtf tips from WoWWiKi: Linux/Wine.

If you experience poor performance, graphical glitches, or the game doesn't run at all, then add the following options as well:

SET ffxDeath "0"
SET ffxGlow "0"

If you experience stuttering, bad sound or no sound what so ever, then add the following options as well:

SET SoundOutputSystem "1"
SET SoundBufferSize "150"

Download the Apply to Forehead Addon, and unzip it to Interface/Addons in your World of Warcraft directory. Make sure you keep this addon enabled, as it's unlikely you'll be able to change your Video Options without the game crashing without it.

From the author's page:

This add on makes it possible for Linux users to change the Video Options in-game (except resolution). This is done by killing off the following functions:
    * SetMultisampleFormat
    * SetScreenResolution
    * RestartGx

Ready to play? Cross your fingers, and run:

wine "c:\program files\world of warcraft\wow.exe"

It's working, after a bit of playing with.

1. Download the iSync Plugin from Mactomster.

2. Copy mactomster.phoneplugin to the /Applications/iSync.app/Contents/Plugins/ApplePhoneConduit.syncdevice/Contents/Plugins directory.

3. Open up the MetaClasses.plist file inside mactomster.phoneplugin/Contents/Resources with the Property List Editor.

4. Scroll down to the entry for com.nokia.E61 and copy (or rename) it to com.nokia.E62. A few small changes need to be made for this to work with the E62.

Identification.com.apple.cgmi+cgmm: Nokia+Nokia E62
Services.0.ServiceProperties.ModelName: E62

6. Open the Bluetooth Preferences Pane in Systems Preferences.

7. Go through the process of setting up a new device. If you need help with this, look in my blog archives for the entry on setting up a Motorola V600 with T-Mobile.

8. Start iSync, go to Devices > Add New Device.

9. Select the E62.

10. Sync

This isn't so much of a guide as a status page as to what's working and what isn't. Post your experiences here.

Versions able to boot: 7.0-CURRENT

SMP: broken.

AP #1 (PHY# 1) failed!
panic y/n? [y]

To get rid of this problem, disable APIC/SMP in your kernel. There have been some reports of getting this working by pushing the power button at the exact right moment in the boot process. This somehow forces the MacBook to initialize the second processor properly so FreeBSD can see it during the intial probe. I had limited success with this. If you somehow get lucky and have it see the second CPU, you're still going to see some funky messages that make me think things still aren't quite working right.

cpu0: <ACPI CPU> on acpi0
acpi_throttle0: <ACPI CPU Throttling> on cpu0
acpi_throttle0: P_CNT from P_BLK 0x410
cpu1: <ACPI CPU> on acpi0
acpi_throttle1: <ACPI CPU Throttling> on cpu1
acpi_throttle1: failed to attach P_CNT
device_attach: acpi_throttle1 attach returned 6

Here's some shiny cpuid output.

eax in eax ebx ecx edx
00000000 0000000a 756e6547 6c65746e 49656e69
00000001 000006e8 01020800 0000c1a9 bfe9fbff
00000002 02b3b001 000000f0 00000000 2c04307d
00000003 00000000 00000000 00000000 00000000
00000004 00000000 00000000 00000000 00000000
00000005 00000040 00000040 00000003 00022220
00000006 00000001 00000002 00000001 00000000
00000007 00000000 00000000 00000000 00000000
00000008 00000000 00000000 00000000 00000000
00000009 00000000 00000000 00000000 00000000
0000000a 07280201 00000000 00000000 00000000
80000000 80000008 00000000 00000000 00000000
80000001 00000000 00000000 00000000 00100000
80000002 756e6547 20656e69 65746e49 2952286c
80000003 55504320 20202020 20202020 54202020
80000004 30303532 20402020 30302e32 007a4847
80000005 00000000 00000000 00000000 00000000
80000006 00000000 00000000 08006040 00000000
80000007 00000000 00000000 00000000 00000000
80000008 00002020 00000000 00000000 00000000

Vendor ID: "GenuineIntel"; CPUID level 10

Intel-specific functions:
Version 000006e8:
Type 0 - Original OEM
Family 6 - Pentium Pro
Model 14 -
Stepping 8
Reserved 0

Extended brand string: "Genuine Intel(R) CPU T2500 @ 2.00GHz"
CLFLUSH instruction cache line size: 8
Initial APIC ID: 1
Hyper threading siblings: 2

Feature flags: bfe9fbff:
FPU Floating Point Unit
VME Virtual 8086 Mode Enhancements
DE Debugging Extensions
PSE Page Size Extensions
TSC Time Stamp Counter
MSR Model Specific Registers
PAE Physical Address Extension
MCE Machine Check Exception
CX8 COMPXCHG8B Instruction
APIC On-chip Advanced Programmable Interrupt Controller present and enabled
SEP Fast System Call
MTRR Memory Type Range Registers
PGE PTE Global Flag
MCA Machine Check Architecture
CMOV Conditional Move and Compare Instructions
FGPAT Page Attribute Table
CLFSH CFLUSH instruction
DS Debug store
ACPI Thermal Monitor and Clock Ctrl
MMX MMX instruction set
FXSR Fast FP/MMX Streaming SIMD Extensions save/restore
SSE Streaming SIMD Extensions instruction set
SSE2 SSE2 extensions
SS Self Snoop
HT Hyper Threading
TM Thermal monitor
31 reserved

Feature flags set 2: 0000c1a9:
SSE3 SSE3 extensions
MONITOR MONITOR/MWAIT instructions
5 - unknown feature
EST Enhanced Intel SpeedStep Technology
TM2 Thermal Monitor 2
xTPR Send Task Priority messages
15 - unknown feature

Extended feature flags: 00100000:
XD-bit Execution Disable bit

TLB and cache info:
b0: Instruction TLB: 4-KB Pages, 4-way set associative, 128 entries
b3: Data TLB: 4-KB Pages, 4-way set associative, 128 entries
02: Instruction TLB: 4MB pages, 4-way set assoc, 2 entries
f0: 64-byte prefetching
7d: 2nd-level cache: 2-MB, 8-way set associative, 64-byte line size
30: 1st-level instruction cache: 32-KB, 8-way set associative, 64-byte line size
04: Data TLB: 4MB pages, 4-way set assoc, 8 entries
2c: 1st-level data cache: 32-KB, 8-way set associative, 64-byte line size
Processor serial: 0000-06E8-0000-0000-0000-0000

Wireless: working.

ath0: <Atheros 5424> mem 0x98100000-0x9810ffff irq 11 at device 0.0 on pci3
ath0: Ethernet address: 00:16:cb:b6:fd:b7
ath0: mac 10.3 phy 6.1 radio 10.2

This detected during the install. Nothing special about it. Yay.

Although it's none too functional, at least I've got a kernel I know will boot 100% of the time.

After I managed to get FreeBSD booted again (by rebooting about 20 times), I recompiled my kernel without APIC and without SMP. Even on the rare instances when I could get both CPU's to initalize properly, the second one still wouldn't report properly later. (cpuid)

dmesg from latest -CURRENT build

It's detecting two mice and two keyboards on the USB bus, although only the first detected has the proper product ID. moused won't work with /dev/ums1 at all, and if I specify /dev/ums0, it doesn't work properly. The pointer only appears if I hit the mouse button, and it slowly moves down the screen until it hits the bottom, randomly highlighting things along the way. The same behaviour occurs in X, even if I tell it not to use sysmouse.

ACPI isn't really functional, either. ASL and DSDT.

The internet wireless showed up as ath0 with no problems at all. yay! Internal gigabit ethernet wasn't quite so lucky. I think the sk(4) driver could be easily modified to support the Marvell Yukon 88E8053 driver, since the sky2 driver in Linux seems to be handling it properly.

I've been trying to get the ng_ubt(4) driver working with the internal bluetooth for a few days now, but Apple has quite a bit of weirdness when it comes to how their USB devices report. I have got it working in linux with a one line edit to the usb bluetooth driver, but FreeBSD I haven't been quite so lucky with. Maksim Yevmenkin, the author of ng_ubt(4), has been kind enough to take a look at what I've come up with so far, so hopefully we'll be able to come up with a working patch.

There's a few more files I've posted about the MacBook Pro - sysctl -a, smartctl, and pciconf -lv output.

Here's what I've been through so far today:

Tried to boot with new 6.1 ISO. Locked after pretty loader boot menu. Reboot.

Tried disabling ACPI. No luck. No text at all is displayed after the menu. Reboot.

Popped in a 7 snapshot CD. The laptop actually boots past the menu this time, yay! But then it gets a message about how AP #1 (PHY# 1) has failed, and asks me if I'd like to panic. Hell no, I don't want to panic. I press n - Nothing happens. D'oh. The keyboard is handled over USB. Go figure. Reboot.

Do a little bit of poking around on teh google, and decide to disable ACPI. Laptops without ACPI are completely pointless, but so's having a laptop that can't boot FreeBSD. I boot with ACPI disabled, and it gets past the initial processor magic. Everything appears to be going fantastic, then it panics with some screwed up mutex error from sys/vm/vm_fault.c. Whatever. Reboot.

Boot up again, and forget to hit any buttons on the keyboard because I'm talking to someone on IRC on my desktop. I look down, and I've got an installer screen.

Today is just full of weird stuff. I'll update again on my progress later.