Linux on the Intel Mac Mini

Submitted by samr7 on Tue, 2006-05-09 02:28.

My reasons for getting a Mac Mini had nothing to do with OS X or anything else Apple and Macintosh-like. It's a very nice piece of hardware and the bang-for-your-buck ratio is the best in that form factor. At least, it compares favorably to the two AOpen MiniPC models.

Particularly, I was hoping the Mini would make a nice Linux machine, and it certainly does. Almost all of the hardware works flawlessly. On the down side, there is no driver for the IR receiver presently (update: James McKenzie from the mactel-linux list created one), the suspend-to-RAM feature isn't all there, and the sound driver needs special support for Apple's custom mute hardware. The video works depending on how Linux is booted. When booting in BIOS mode -- a la Boot Camp -- the video works under Xorg using a beta i810 driver, and supports acceleration and custom resolutions. When booting in EFI mode using rEFIt and ELILO, the video only works in framebuffer mode and does not support resolution switching.

It's important to clarify here that Boot Camp does not enable PC BIOS boot mode on Intel Macs -- it merely depends on it. The magic that actually supports the BIOS mode boot process is part of the firmware update that Apple released about the same time as the Boot Camp beta. The firmware update is required for Boot Camp to work, but functions independently of Boot Camp. Without the firmware update, an Intel Mac will only boot in EFI mode from "blessed" HFS partitions. With the firmware update, the system will also enumerate disks with BIOS boot signatures and boot from them in BIOS mode. Boot Camp itself is an ~82MB download that contains two pieces: an assistant program for OS X that supports partitioning and boot selection, and a Windows driver CD image. That's all. However, it has become a buzz word symbolic of booting PC operating systems on a Mac.

The suspend-to-RAM problem may remain the most vexing. It works so smoothly on OS X and with OS X's automatic sleep and wake, it becomes difficult to tell if and when the machine actually goes to sleep. It would be nice if the process were so well supported under Linux and didn't cause the machine to get into unpleasant hung states.

The Mac Mini has Intel core logic. The audio is managed by its ICH7 "Azalia" HD audio controller in the southbridge. The controller's purpose is only to move bits around, the actual analog-to-digital and digital-to-analog conversion, and analog mixing is done in the codec chip, which is a Sigmatel STAC9220X5. This codec supports 8-channel analog output, 4-channel analog input, and bidirectional SPDIF/TOSLINK. Unfortunately, Apple only put two minijacks on the back -- a line-in and a line-out. The jacks support both stereo analog and TOSLINK optical digital connectors. Since they're targeting home theater applications this makes some sense.

The ALSA Linux hda-intel driver, in its current form, supports the ICH7 HDA controller 100%. It needs special support for Apple's custom mute hardware on the internal speaker and line-out jack, and may have problems configuring the input muxes to support analog capture. Why Apple chose to install a secondary mute switch remains a mystery. It doesn't suppress all popping -- disabling the mute does create a bit of a pop, but the pop sound it makes is much more pleasant than, say, a USB Sound Blaster. Ugh!

Read on for the solution...


*  »

The Genius Bar

Submitted by samr7 on Wed, 2006-05-03 22:04.

Today was my first experience with Apple's support division. I bought an Intel Mac Mini a little over a month ago and have been having a problem with it. The issue is that it would randomly hang at boot before POSTing. The power light would come on solid, but it wouldn't display anything, it wouldn't make the CD-ROM drive chirp quietly, and it wouldn't even make its startup chime. It would do this persistently if powered off by holding down the power button for six seconds and powering it on within a minute. The hang would also affect sleep, where one could put the machine to sleep in OS X and come back to find it in the same sort of hung state with no video and the power light on solid. The problem gets worse with OS X configured to automatically put the machine to sleep. This problem would occur on maybe three out of five boot attempts.

Anyway, I took it in and must have consumed 45 minutes of the poor guy's time just trying to get the machine to fail. When I first tried to reproduce the problem, it booted reliably more than ten times in a row. Argh!! Anyway, the guy was patient and eventually the problem started occurring as frequently as it did at home. Then he suspected that the software I had installed was causing problems. I had installed their firmware update, Boot Camp, and used Boot Camp to repartition the disk and install Linux alongside OS X. Boot Camp is a beta product that they don't support, at least not yet, so we did a clean install of OS X and lo and behold, it's still possible to get the machine to hang.

Apple is going to replace the logic board under warranty. They don't have parts at the retail store I took it to so it will take a week. Case closed for now. I walked out having traded my Mac Mini for a piece of paper.

While I was trying to convince the guy that it really was broken, he managed to fix issues for three other people, including dead iPods, corrupt filesystems, etc.. The guy wouldn't even bring up warranties until after diagnosing a problem as a hardware problem. This guy, and probably Apple's service divison as a whole really seem to take care of their customers and I'm quite impressed.

Aside from all of this, the Mac Mini is quite an impressive piece of hardware. It has cutting edge Pentium-M "Yonah", i945GM, and ICH7 silicon from Intel, two SODIMM sockets, a Marvell gigabit ethernet chip, a CSR BlueCore4 Bluetooth HCI, Atheros wifi, and a 2.5" Serial ATA hard drive. The integrated Intel video is less than impressive though. All of it is generally compatible with Linux using various open-source drivers, although due to how new the hardware is, some drivers are still in their infancy and have bugs.

The major Linux problems I have with it are:

  1. Suspend-to-RAM doesn't work, it seems to get stuck before successfully powering down. Hopefully this is related to my Mini having been broken.
  2. The Intel HD Audio driver can't output to the headphone jack, can't sample from the line-in jack, and can't use the built-in speaker. It *can* output to the line-in jack. WTF?

Also, during this whole experience I heard reference to at least one web hosting service provider that deals in rack-mounted Mac Minis. Whoa!!


*  »

Angel's Rest

Submitted by samr7 on Sun, 2005-11-27 03:37.

Yesterday was gorge hike day. Friends Nathan, John, and I tried to tackle the Angel's Rest trail. This trail isn't all that long, about 2.6 miles to the summit, but relatively steep, with about a 1500' ascent. We started at the trailhead around 3:30pm. We took the trail slowly, due to mud and slippery patches. At about 4:30, we were almost to the summit, but turned around due to diminishing daylight. By 5:00, night had fallen, and it had begun to rain lightly, making the already muddy and slippery trail even more difficult to tread. None of us, not even John the hiking master thought ahead enough to bring a flashlight, and through dumb luck we were rescued by a passing pair of hikers who gave us their spare. I didn't even think ahead enough to wear hiking boots, and went in Birkenstocks, but that really wouldn't have made any difference for this trail.

Earlier in the day, it was sunny and nice. Later some clouds moved in. When we started hiking, the weather radar showed only one or two precipitation blips over the whole northwest quarter of the state (and the western half of Washington). By the end of our hike, one of those blips nearly tripled in size and moved directly over our spot. How's that for luck?

John managed to jump out of the side of the trail near the end in the dark, briefly scaring the crap out of Nathan and I. We decided to rank this outing among the top ten stupid things attempted as a group.

Despite the low light levels, and cold, arm-shake-inducing temperatures, I managed to get one or two good photos. Also, cell phone reception was nearly perfect for most of the trail. There may be all sorts of pretty views, and the trail may not be paved, but this area isn't exactly wilderness.

Later, John showed off his new car. A few weeks ago his Escort was wrecked spinning around on the sharp 26W-217S ramp. He got a shiny new 2005 Corolla. He was also very quiet about this and managed to mislead Nathan and I until finally pointing out how someone had parked a new car in his spot. Go John!

[image:568 size=preview]


*  »

Welcome Back

Submitted by samr7 on Wed, 2005-10-26 06:19.

My apologies for having let things rot for two months. Since the last post, I have become a rabid cell phone and embedded device hacker. It's refreshing to see software run in your hand, rather than in a big noisy rack somewhere.

This isn't renouncing my complaints about cell phones -- I still stand behind every one.


*  »

Working all night again

Submitted by samr7 on Wed, 2005-08-10 02:23.

Lately I'm in the middle of a project at work that's extremely uninteresting. As sort of a defense mechanism, I try to find the most interesting and elaborate way to carry out the task. This defense mechanism is only partially effective, and I wind up staring off into space, or typing up blog articles for a good chunk of the time I try to spend on the project. This sort of behavior has always come across as a lapse of self-discipline, but sometimes I wonder if it's no ADHD.

Staying up late at night to ensure that some specified amount of time actually winds up being spent on the project requires caffeine. Lately I ran across an interesting article over at Lindsay Brown's site L-Factor about the mechanics of caffeine. Lindsay is a microbiologist and revels in this stuff. Apparently the blood concentration of caffeine follows an exponential function with a half-life of about 3.5 hours for an adult, and works by altering the concentrations of cyclic AMP within cells. Whoa! Thanks Lindsay...


*  »

Top Ten Cellular Phone Gripes

Submitted by samr7 on Wed, 2005-08-03 04:06.

As many know, I have a very low opinion of cellular phones. I've tried to summarize some of the reasoning below:

  1. A phone is as much a fashion statement as a contemporary gadget, and phones become obsolete faster than computer equipment. If the technology behind a phone isn't replaced in a year, count on it going out of style.
  2. To maintain the balance of flashy new phones, and support of the American culture of purchasing on credit, service providers use shell games to subsidize and conceal the cost of new phones, and service contracts as enforcement. Their accounting is their own business, but this makes them seem less like champions of inexpensive luxuries and more like deceitful price discriminators.
  3. When a phone is purchased through a provider subsidy, the phone is typically "locked" and made to work only with the subsidizing provider. An industry has sprung up around the (uncommon) need to remove the protection on these "locked" phones. This industry is arguably illegitimate in that the protection should not exist in the first place, should be freely removable, or should only be removable by the manufacturer or the provider that set it. "Business opportunities" for third parties make absolutely no sense.
  4. If the last three points aren't enough of a deterrant to switching providers without buying a new phone, incompatible standards may be. While the rest of the world has standardized on GSM, the U.S. providers Sprint and Verizon insist on CDMA. No GSM phone can be used with these providers, and no CDMA phone can be used with Cingular or T-Mobile.
  5. Service providers pad their revenues with a substantial amount of nickel-and-diming. This practice I find reprehensible. Features that providers charge extra recurring fees for, such as instant messaging, tend to have profit margins on the order of 90%. Service providers also have the balls to charge people $3 for a lousy ring tone, and almost everybody goes along with it! It's no wonder those bastards refuse to cooperate with Apple on an iPod phone. A number of media companies and even Motorola also engage in nickel-and-dime practices for mobile adaptations of services that are otherwise free on the Web.
  6. For some reason, cellular phone owners feel the need to talk on the phone while driving. Research suggests that a 20-year-old driver talking on the phone has the reaction time of a 70-year-old, and can behave as if more impaired than a legally drunk driver.
  7. Service providers build their voice service from a conglomeration of low-bandwidth data services, in a very restrictive and inflexible way. The stack of services that they sell seems entrenched, and irreflective of more modern methods, such as layered internet service and VOIP service. Mobile internet service is inherently more valuable than mobile voice service. I hope something like WiMax destroys them all.
  8. Depending on how you add it up, U.S. providers are sales and marketing machines, not the technology powerhouses they might have you believe. As a good example, take Verizon. According to their 2004 SEC filing, their wireless division received $24.4B in monthly service revenues. During the same period, they spent $7.74B on "Cost of services and sales," including expansion and maintenance of their infrastructure, their FCC licenses, and their long distance operations. However, they spent a whopping $9.59B on "Selling, general and administrative" expenses, including sales, marketing, billing, and customer service. That's 39.3% of their monthly revenues. The other U.S. providers have similar figures between 25-40%. Perhaps this sector needs some federal regulation.
  9. Service providers seem to have little regard for their customers' privacy, given the apparent ease of obtaining calling records.
  10. Having a cellular phone has become a social requirement in most circles, and the combination of the phone and its adornments has become part of the impression one makes. Compare this to the near requirement of having a car in southern California.

*  »

Grand Theft Hemoglobin

Submitted by samr7 on Tue, 2005-08-02 21:10.

Despite being almost nine months old, Activision's Vampire: The Masquerade Bloodlines is a PC game title worthy of attention. This title is of the role-playing genre, but has much in common with action/adventure titles such as Grand Theft Auto. It is apparently based closely on a pen-and-paper role playing game, and has a predecessor, Vampire: The Masquerade Redemption which was released four years prior.

In Bloodlines, you play an initiate vampire. The vampire who made you a vampire, termed your sire, was your lover at the time. This otherwise anonymous person is executed in the prologue by the acting prince. Rather than execute you as well, the prince decides to send you to Santa Monica.


*  »

LCD Monitor Reviews

Submitted by samr7 on Thu, 2005-06-23 08:40.

Recently I was in the market for a new monitor -- see the dead CRT article. CRTs are still quite a bit cheaper than LCDs, and still have advantages, but the remaining advantages are for usages that I don't care about. Needless to say, an LCD monitor seemed the most attractive option.

»

Party at Matthew's

Submitted by samr7 on Sun, 2005-06-19 11:52.

Matthew Bradburn threw a house party last night. I was fortunate enough to have been on the guest list. For those who don't know Matthew, he is a co-worker, and a hard core Windows kernel hacker.

Everything about this party was well arranged. Matthew's swank house in SE made an excellent venue. The guest list seemed well-balanced in terms of those known and unknown to each other. There was a diverse selection of food and beverage, including an OLCC-licensed beer keg. The live music, although slightly loud for the acoustics of the venue, was excellent. Matthew's later accordion show was also quite good.

A number of neighborhood cats must have also been on the guest list, as they came and went, and seemed some of the more social at the party.

Afterwards, a smaller group, including Greg Fuller and myself, hung out at the Night Light pub three blocks away.

I took a few photos, but beware that all are products of flash photography.


*  »

Fedora Core 4

Submitted by samr7 on Mon, 2005-06-13 13:57.

Fedora Core 4 was released today. This release is a standard refresh, featuring gcc 4.0, KDE 3.4, and GNOME 2.10.

This said, it has quietly been available on various bittorent networks since Friday, apparently due to a leak from one of the mirror sites. Oops. There are also a total of six updated packages available as of now on release day.

If faced with the need for both the CD and DVD images, and download speeds under 1MB/sec, don't bother downloading the DVD ISO. Instead, download the CD ISOs and use a simple shell script to generate a bootable DVD ISO.

KDE 3.4 has been available for some three months now. The KDE-RedHat Project packages new KDE releases for Fedora Core shortly after they are released. In the past, and in the case of KDE 3.4, their releases exhibit many bugs that never appear in the official Fedora KDE packages. Examples of this for KDE 3.4 might include Konqueror's support for removable media and hotplug devices on the desktop, and the kio_smb CIFS protocol module. In this case, the best decision would have been to skip KDE-RedHat and wait for the next release of Fedora.

Something to be commended in Fedora Core 4 would be improvements to the yum update program. For those who don't know, yum is the automatic updater, which downloads and installs software updates for Fedora and other Red Hat based distributions. Yum is complete and conveinent, but has a reputation for being memory-inefficient. A typical session of the Fedora Core 3 yum would reach a virtual size over 100MB, and the host system shows all the symptoms of "thrashing." This seems quite excessive. Fedora Core 3 also included the up2date tool, which was just as bad. The Fedora Core 4 yum seems greatly improved, reaching a mere 50MB virtual size for a task that would inflate the Fedora Core 3 yum to 90MB.

For the limited tasks that I use it for, Fedora Core 4 seems to be an improvement over its predecessor.


*  »