Present Location: News >> Blog >> Linux on Mac mini 1.42

Blog

> Linux on Mac mini 1.42
Posted by prox, from Charlotte, on February 17, 2008 at 17:21 local (server) time

Background

I use my Mac mini as an HTPC, connected to my Westinghouse LVM-37w1 HDTV via DVI-D.

I got sick of OS X 10.5 the other day because it's too darn slow, and decided to upgrade it to Debian/GNU Linux.

I'd tried this once before between OS X 10.4 and 10.5, and it had resulted in failure, mostly because I was unable to get Xorg 7.x outputting 1920x1080@60, although the Linux FB console worked just fine.  Anyway, I continued…

Installation

I burned a copy of the latest testing image (currently Lenny), and booted the installer by pressing C after pressing the power button.  Yes, this works with Bluetooth HIDs since the host adapter operates in HID mode by default (requires an hid2hci after booting).

Unfortunately, each time the installation tried to install Yaboot, the kernel would oops when apparently trying to mount an HFS partition:

hfsplus

I thought it was odd, since I didn't create any.  So, I wrote about 128MiB of zeroes to /dev/hda, rebooted, and modprobe -r'ed hfsplus before the installation of Yaboot.  That seemed to work.

X11

Upon bootup, the Linux framebuffer console appeared in 1920x1080 at 60Hz.  So X11 should work, right?  Well, that's what I thought last time, and turned out to not.  Here's what fbset said:

mode "1920x1080-60"
    # D: 138.504 MHz, H: 66.589 kHz, V: 59.936 Hz
    geometry 1920 1080 1920 1080 32
    timings 7220 80 48 24 2 32 5
    rgba 8/16,8/8,8/0,0/0
endmode

I didn't bother trying the X11 fbdev server, since that didn't work last time.  I then spent hours playing with various modelines, and trying lots of things, but couldn't get anything to come up on the screen with the ATI driver.

Now, normally, the LVM-37w1 will display a message stating "invalid mode" when it can't handle the signal received.  However, this time it kept saying "no signal detected" and then going to sleep.  I thought this was odd, but kept going.

Since the Linux framebuffer worked, I thought it might help to convert the geometry and timings from the fbdev output to a modeline.  There's a utility, modeline2fb to convert X11 modelines to a fb.modes-style format, but not the other way around.  Maker from lily helped me out with this, and did the following:

* pixtime = 7220
* left = 80
* right = 48
* top = 24
* bottom = 2
* hsynclen = 32
* vsynclen = 5
*
* clock = 1000000 / pixtime = 138.5
*
* xres = 1920
* xsyncstart = xres + right = 1968
* xsyncend = xsyncstart + hsynclen = 2000
* xfres = xsyncend + left = 2080
*
* yres = 1080
* ysyncstart = yres + bottom = 1082
* ysyncend = ysyncstart + vsynclen = 1087
* yfres = ysyncend + top = 1111

So, the modeline for my Westinghouse LVM-37w1 that will display 1920 by 1080 pixels at 60Hz should be:

Modeline "1920x1080" 138.5 1920 1968 2000 2080 1080 1082 1087 1111

Unfortunately, this didn't work initially, although the Xorg.0.log said it was outputting 1920x1080.  x11vnc worked, too.  So, out of the blue I substituted Driver "ati" for Driver "fbdev" and got something on the screen.  Woo, success.  Maybe?  Not entirely…

fbdev issues

Unfortunately, the fbdev driver doesn't support anything fancy like XVideo, 3D, or proper DPMS.  So, basically, no 3D games (this is not an issue for me) but more importantly, no XVideo overlay capability.  This means that I can't watch any videos in fullscreen.  MPlayer with the -zoom option plays VOBs at no more than 10fps at 100% CPU.

Conclusions

So, failure again.  But this time, I'm not going back to OS X (would have been 10.4, not 10.5), so I think I'm going to start looking around for a real HTPC, and see if I can co-lo my mini somewhere cheap (where cheap is defined as $10/month..).

> Add Comment

New comments are currently disabled for this entry.